-
Notifications
You must be signed in to change notification settings - Fork 4.2k
fix: prevent updating check state before mempool insert #25550
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
Open
beer-1
wants to merge
20
commits into
cosmos:main
Choose a base branch
from
beer-1:fix/issue-25543
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+62
−4
Open
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
18d46ba
prevent updating check state before mempool insert
beer-1 b9f65ae
update readme
beer-1 95c6b58
use switch
beer-1 8c2bef8
Merge branch 'main' into fix/issue-25543
aljo242 7a19e39
fix lint
beer-1 a8bf470
Merge branch 'main' into fix/issue-25543
aljo242 bf29c81
Merge branch 'main' into fix/issue-25543
beer-1 09b7f4a
Merge branch 'main' into fix/issue-25543
aljo242 1d76a14
Merge branch 'main' into fix/issue-25543
aljo242 74c8e4a
Merge branch 'main' into fix/issue-25543
aljo242 de602e7
Merge branch 'main' into fix/issue-25543
aljo242 79ce651
Merge branch 'main' into fix/issue-25543
aljo242 2320333
Merge branch 'main' into fix/issue-25543
aljo242 bd58441
Merge branch 'main' into fix/issue-25543
aljo242 d697577
Merge branch 'main' into fix/issue-25543
beer-1 f605988
Merge branch 'main' into fix/issue-25543
aljo242 2840052
Merge branch 'main' into fix/issue-25543
mattac21 e7d3c85
Merge branch 'main' into fix/issue-25543
aljo242 b3fb45f
Merge branch 'main' into fix/issue-25543
aljo242 ffea6a6
Merge branch 'main' into fix/issue-25543
aljo242 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
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.
confirming my understanding here, we need to set the multistore for
mempoolCtxback to tomsCachesince we are now not writingmsCachebefore callingmempool.Insertwhen inmodeCheck. So if we do not usemsCacheas our multistore,mmempool.Insertmay operate on a stale multistore. Once we do callcommitAnteCachethough, we are safe to usectxagain since itsmshas now been updated.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 modified the
mempool.Insertcall locally to usectxinstead ofmempoolCtxand all of our unit tests still passed. Could you think of a unit test that would demonstrate thismsrequirement? imo its not super clear from this logic that that is required (would probably be easiest with a mock mempool and ante handler just checking values in the ms).