-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry remote contract calls for unsupported block number errors #2563
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2563 +/- ##
===================================================
+ Coverage 54.71489% 54.81403% +0.09914%
===================================================
Files 95 95
Lines 19852 19869 +17
===================================================
+ Hits 10862 10891 +29
+ Misses 8385 8373 -12
Partials 605 605
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one comment. Other than that LGTM 👍
a444bcc
to
fa007c8
Compare
Rebased to re-order commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this pull request do? Explain your changes. (required)
We've occasionally observed an
unsupported block number
error for RPC requests which can cause problems for node operation (see #2560).According to an Offchain Labs team member, an Arb node can return this error if the node is not synced. This situation could occur if:
The
unsupported block number
error appears to originate from the getSnapshot() and getSnapshotForNumberForHash() functions inoffchainlabs/arbitrum/packages/arb-rpc-node/web3
which are called by many of the functions implementing the ETH JSON-RPC API [1].From reviewing Discord conversations, it appears that this error is more likely to happen when sending concurrent RPC requests.
The solution in this PR is to add the
unsupported block number
error to the list of errors that will be retried when sending requests for remote contract calls. Note: This change only applies to contract calls and not other RPC requests which could be affected by this error as well. Addressing this issue with all RPC requests requires additional code changes, but since this error is primarily affecting contract calls right now, I've opted to just address this for contract calls.Specific updates (required)
See commit history.
How did you test each of these updates (required)
unsupported block number
errorsDoes this pull request close any open issues?
Addresses the root cause of #2560 although it could still make sense to update the behavior of the node following the suggestion in the issue.
Checklist:
make
runs successfully./test.sh
pass