-
Notifications
You must be signed in to change notification settings - Fork 180
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
[Execution] Return OutOfRange instead of Internal when account block is not cached #4917
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #4917 +/- ##
==========================================
+ Coverage 52.97% 55.83% +2.85%
==========================================
Files 754 945 +191
Lines 68131 88261 +20130
==========================================
+ Hits 36095 49279 +13184
- Misses 29316 35273 +5957
- Partials 2720 3709 +989
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Co-authored-by: Leo Zhang <zhangchiqing@gmail.com>
[Execution] Return OutOfRange instead of Internal when account block is not cached
"this error usually happens if the reference "+ | ||
"block for this script is not set to a recent block.", | ||
blockID.String(), | ||
ErrStateCommitmentPruned, |
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.
This is not the only place returning this error, queryExecutor.ExecuteScript
could also possibly return pruned error, because it's possible state commitment is pruned after this execState.HasState
check and before the queryExecutor.ExecuteScript
call.
In other words, we also need to handle the pruned error from e.queryExecutor.ExecuteScript
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.
I can handle it in storehouse
Closes: #4916
Currently, when an Access node calls
GetAccount*
with a block that is no longer in the EN's trie, it returnscodes.Internal
. This PR adds a sentinel and updates the handler to instead returncodes.OutOfRange
.This will ensure that the new grpc circuit breaker available on ANs does not incorrectly classify these responses.