Skip to content

fix(runner): relax Starknet RPC spec version check#429

Open
kariy wants to merge 1 commit into
mainfrom
fix/relax-rpc-spec-version-check
Open

fix(runner): relax Starknet RPC spec version check#429
kariy wants to merge 1 commit into
mainfrom
fix/relax-rpc-spec-version-check

Conversation

@kariy
Copy link
Copy Markdown
Member

@kariy kariy commented May 14, 2026

Summary

A node reporting a non-0.9 spec_version (or failing to respond to spec_version at all) currently aborts torii startup at crates/runner/src/lib.rs:294-302. In practice most JSON-RPC methods torii uses are stable across minor spec bumps, so a strict prefix check blocks valid setups whenever a node ships a newer spec.

This PR replaces the hard error with a tracing::warn! and continues. The same softening also covers the spec_version() RPC call itself failing — that's downgraded from ? to a warning, since a transient or malformed response shouldn't take down the indexer at startup. If the node really is incompatible, the failure will still surface at the actual RPC call site with a more specific error.

Mirrors dojoengine/dojo#3402 for sozo.

Why warn instead of bumping the constant

The supported spec stays "0.9". Bumping it requires verifying every RPC method torii calls against the new spec; warning + continuing is the safer way to unblock users today without committing to claims about untested specs.

Test plan

  • cargo build -p torii-runner clean
  • cargo install --path bin/torii --locked --force clean
  • Manual smoke: point torii at an RPC reporting a non-0.9 spec; expect a WARN torii:runner line followed by normal startup

🤖 Generated with Claude Code

A node reporting a non-0.9 spec_version (or failing to respond to
spec_version at all) currently aborts torii startup. In practice most
JSON-RPC methods torii uses are stable across minor spec bumps, so a
strict check blocks valid setups whenever a node ships a newer spec.

Replace the hard error with a tracing warning and continue. Real
incompatibilities will still surface at the actual RPC call site with a
more specific error. Mirrors dojoengine/dojo#3402 for sozo.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant