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.
Goal
All RPC calls share a hardcoded 60s timeout in
rpc_agent()(src/onchain.rs:128-136). Add a configurable--timeoutflag soonchain-verifyandonchain-auditcan be tuned for slow/fast networks and CI time budgets.Scope
--timeout <secs>(default 60) toOnchainVerifyandOnchainAuditin src/main.rs.rpc_agent()so it is honored by every call made from src/onchain.rs and src/audit.rs (keep the current default behavior identical).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 5uses a 5s budget (verifiable via a quick failure against an unreachable--rpc).--timeout 0is rejected with a clear message.cargo test --locked; fmt and clippy stay clean.