fix(arbitrum): ensure unique batch RPC request IDs - #16
Merged
Conversation
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
Why
The Robinhood Chain deployment uses an Ethereum L1 JSON-RPC endpoint that enforces the JSON-RPC 2.0 batch requirement that every request ID be unique. Several Arbitrum workers intentionally use a batch number as their semantic request ID, so multiple requests for blocks in the same batch can produce duplicate IDs.
The endpoint rejects those batches with:
That prevents the Arbitrum batches and L1 message trackers from populating deposits and transaction-batch data. Fixing this centrally preserves the existing caller contract while making requests valid for strict JSON-RPC servers.
Validation
CHAIN_TYPE=arbitrum mix test apps/indexer/test/indexer/fetcher/arbitrum/utils/rpc_test.exs— 1 test, 0 failuresmix deps.compile && mix compile— passedmix format— passedmix credo --stricton the changed files — no new findings (one pre-existing TODO suggestion remains)git diff --check— passedDeployment
After merge, publish the updated Blockscout and Firehose images, update the Kubernetes image tag, and verify that the live Arbitrum batch/message trackers progress without duplicate-ID errors.