fix(runner): relax Starknet RPC spec version check#429
Open
kariy wants to merge 1 commit into
Open
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A node reporting a non-
0.9spec_version(or failing to respond tospec_versionat all) currently aborts torii startup atcrates/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 thespec_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-runnercleancargo install --path bin/torii --locked --forceclean0.9spec; expect aWARN torii:runnerline followed by normal startup🤖 Generated with Claude Code