Layered txpool: do not send notifications when moving tx between layers#7539
Merged
fab-10 merged 5 commits intobesu-eth:mainfrom Sep 5, 2024
Merged
Conversation
0a770d5 to
cb4b59f
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
cb4b59f to
b032acc
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
0ded40e to
26bcb4d
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
26bcb4d to
77e238c
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
8 tasks
pinges
approved these changes
Sep 5, 2024
Contributor
pinges
left a comment
There was a problem hiding this comment.
Just one question, otherwise LGTM.
| assertThat(pendingTransactions.size()).isEqualTo(1); | ||
|
|
||
| assertThat(getAddedCount(REMOTE, NO_PRIORITY, layers.prioritizedTransactions.name())) | ||
| assertThat(getAddedCount(REMOTE, NO_PRIORITY, NEW, layers.prioritizedTransactions.name())) |
Contributor
There was a problem hiding this comment.
I noticed that you are only using the reason "NEW" in this file. Is that because other reasons don't make a difference here? Do the tests in LayersTest cover all the functionality that has changed with the "reasons"?
Contributor
Author
There was a problem hiding this comment.
Using only NEW here because we are only adding new txs to the pool, and not moving existing txs between layers. Will review if more tests are needed to cover everything.
Contributor
Author
There was a problem hiding this comment.
added tests to cover also the move of txs between layers
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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.
PR description
Notifications for tx added to the layered txpool were incorrectly sent also when the tx was already added and was just internally moved between layers, potentially resulting in duplicated notifications.
Tests for this change are part of the following PR #7538 that is also fixing the drop notifications.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests