Skip to content

CLI: nirium verify should retry and fall back to another gateway #135

Closed

Description

@Eras256

nirium verify fetches from a single gateway (gateway.pinata.cloud by default) and fails on the first non-200. A freshly anchored CID isn't always served right away: on 12 Oct a test anchor returned 404 on the first read and 200 about 30 seconds later. Right now that shows up as VERIFICATION FAILED, which reads like tampering when it's just propagation.

Proposal:

  • accept --gateway more than once and try them in order, with a sensible default list
  • retry a 404 a few times with backoff (--retries, --timeout)
  • report "not yet available" separately from "hash mismatch", in both the text output and --json

Done when: fetchAndVerifyCid has tests for 404-then-200, first gateway down and second up, and all gateways down, with an injected fetch (it already takes fetchFn). Exit codes stay as they are: non-zero on any failure.

Owner: @M0nsxx

Disclosure: drafted with AI assistance under my direction and reviewed by hand.

Activity

  1. ravimahatonp commented on Oct 14, 2026

    @ravimahatonp

    Hello team,

    I examined the issue "CLI: nirium verify should retry and fall back to another gateway" in nirium-protocol/nirium and would be glad to implement the required changes.

    Technical Implementation Outline:

    1. Review target data structures, error handling (Result/custom errors), and concurrency safety.
    2. Implement resilient, idiomatic Rust logic with zero panics and defensive boundary checks.
    3. Add comprehensive unit and regression tests covering expected behavior and edge cases.
    4. Ensure cargo check, cargo test, and cargo clippy -- -D warnings pass cleanly.

    Please assign this issue to me. I will submit a clean, well-tested, and production-ready PR promptly!

  2. grantfox-oss commented on Oct 15, 2026

    @grantfox-oss

    🦊 GrantFox — @M0nsxx has been assigned to this issue!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #135)
    2. Your PR will be reviewed by the nirium-protocol maintainers

    Good luck! Track your progress on GrantFox.

  3. added a commit that references this issue on Nov 7, 2026
    071f7bf
  4. grantfox-oss commented on Nov 7, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @M0nsxx's PR #265 was approved and merged by @Eras256.

    🏆 @M0nsxx: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (608 total points). Track your full progress on GrantFox.

    👏 Great work, @M0nsxx! Keep contributing to nirium-protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions