-
Notifications
You must be signed in to change notification settings - Fork 837
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
Stop evaluating txs for sender after the first skipped one #5498
Merged
fab-10
merged 36 commits into
hyperledger:main
from
fab-10:layered-txpool-skip-sender-opt
May 31, 2023
Merged
Stop evaluating txs for sender after the first skipped one #5498
fab-10
merged 36 commits into
hyperledger:main
from
fab-10:layered-txpool-skip-sender-opt
May 31, 2023
Conversation
This file contains 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
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
…tion Signed-off-by: Fabio Di Fabio <[email protected]>
…-selection-metrics
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
# Conflicts: # consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/PostMergeContext.java # ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineGetPayload.java # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactions.java
# Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/BlockTransactionSelector.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/sorter/AbstractPendingTransactionsTestBase.java
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
…x-selection-metrics # Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/BlockTransactionSelector.java
Signed-off-by: Fabio Di Fabio <[email protected]>
…txpool-tx-selection-metrics" This reverts commit 1a899b4, reversing changes made to fba82c8. Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]> # Conflicts: # plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
|
fab-10
changed the title
Stop evaluating sender txs after there is a skipped one for the sender
Stop evaluating txs for sender after the first skipped one
May 25, 2023
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
fab-10
force-pushed
the
layered-txpool-skip-sender-opt
branch
from
May 25, 2023 10:42
f04312c
to
d2e8bb2
Compare
# Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/BlockTransactionSelector.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactionsTest.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/sorter/AbstractPendingTransactionsTestBase.java # plugin-api/build.gradle # plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java # plugin-api/src/main/java/org/hyperledger/besu/plugin/services/txselection/TransactionSelector.java
fab-10
force-pushed
the
layered-txpool-skip-sender-opt
branch
from
May 26, 2023 14:22
97a0a56
to
630ff82
Compare
…l-skip-sender-opt # Conflicts: # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactions.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactionsTest.java # plugin-api/build.gradle # plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
fab-10
force-pushed
the
layered-txpool-skip-sender-opt
branch
from
May 26, 2023 15:05
630ff82
to
0c31ae1
Compare
macfarla
reviewed
May 30, 2023
.../java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactions.java
Outdated
Show resolved
Hide resolved
…ransactions/layered/LayeredPendingTransactions.java Co-authored-by: Sally MacFarlane <[email protected]> Signed-off-by: Fabio Di Fabio <[email protected]>
# Conflicts: # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactions.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactionsTest.java # plugin-api/build.gradle # plugin-api/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionSelectionResult.java
…su into layered-txpool-skip-sender-opt
macfarla
approved these changes
May 30, 2023
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
elenduuche
pushed a commit
to elenduuche/besu
that referenced
this pull request
Aug 16, 2023
…er#5498) Signed-off-by: Fabio Di Fabio <[email protected]>
eum602
pushed a commit
to lacchain/besu
that referenced
this pull request
Nov 3, 2023
…er#5498) Signed-off-by: Fabio Di Fabio <[email protected]>
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
This PR is built on top of #5492 and #5491 so check them first.
This PR introduce a simple optimization to avoid to waste time validating transactions that will not be selected during the current block creation process.
Basically if a sender have more than one prioritized candidate transactions, and for some reason any of them is not selected during the block creation process, it make no sense to keep evaluating any more transaction after the skipped one, since it will not be selected due to the nonce gap.
Enabling the selection stats implemented in #5492 is it possible to see the difference before and after this PR, the wasted validation work that we are removing is represented by the
INVALID_TRANSIENT(NONCE_TOO_HIGH)
label.Before
After