-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
core: properly reset the statedb on sethead #22247
core: properly reset the statedb on sethead #22247
Conversation
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.
Semantically, this totally LGTM, and it's correct.
However, it would be totally possible to rewrite this a bit, so that instead of updating the things inside of the nested clause, you reorder the clauses a bit so that this case can just fall through. That way we don't need to increase the code size, and you would also get that pool fork update fixed.
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, minor nitpick
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
I think part of this issue is unresolved: |
fixes an issue where local transactions that were included in the chain before a SetHead were rejected if resubmitted, since the txpool had not reset the state to the current (older) state.
This pr fixes an issue where local transactions that were included in the chain before a
SetHead
could not be replayed since the txpool still had the old statedb after thesetHead
and would reject them withnonce to low
.For a repro see the linked issue
resolves: #19346