Skip to content

good-first-issue: --timeout flag for onchain-verify / onchain-audit RPC #23

Description

@ToryMic

Goal

All RPC calls share a hardcoded 60s timeout in rpc_agent() (src/onchain.rs:128-136). Add a configurable --timeout flag so onchain-verify and onchain-audit can be tuned for slow/fast networks and CI time budgets.

Scope

  • Add --timeout <secs> (default 60) to OnchainVerify and OnchainAudit in src/main.rs.
  • Thread the duration into rpc_agent() so it is honored by every call made from src/onchain.rs and src/audit.rs (keep the current default behavior identical).
  • Validate the value: reject 0 and unreasonably large values with a clear error; document the flag in README.

Why

The hardcoded timeout makes the CLI unusable on constrained RPCs and can stall CI past its budget. Making it a flag is small and removes a support annoyance, and it is the prerequisite for later per-request budgets.

Success criteria

  • sorseal onchain-verify --timeout 5 uses a 5s budget (verifiable via a quick failure against an unreachable --rpc).
  • Default behavior is byte-for-byte unchanged.
  • --timeout 0 is rejected with a clear message.
  • Tests pass under cargo test --locked; fmt and clippy stay clean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood-first-issueGood entry point for new contributors

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions