Introduce a timeout for the evaluation of a single tx during block creation#6089
Closed
fab-10 wants to merge 76 commits intohyperledger:mainfrom
Closed
Introduce a timeout for the evaluation of a single tx during block creation#6089fab-10 wants to merge 76 commits intohyperledger:mainfrom
fab-10 wants to merge 76 commits intohyperledger:mainfrom
Conversation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # plugin-api/build.gradle
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
This reverts commit e89a244. Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/selectors/PriceTransactionSelector.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java # consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeReorgTest.java # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/PoWMinerExecutor.java # plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
to avoid that a long running tx processing invalidates the already computed world state Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
… mining-options-refactor
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # CHANGELOG.md # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # plugin-api/build.gradle
# Conflicts: # CHANGELOG.md
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
[skip ci] Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # CHANGELOG.md # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # plugin-api/build.gradle
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…ssing-block-creation # Conflicts: # CHANGELOG.md # besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java # besu/src/test/java/org/hyperledger/besu/cli/options/MiningOptionsTest.java # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/LondonFeeMarketBlockTransactionSelectorTest.java # plugin-api/build.gradle
5ffbc3a to
ae9dbd1
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # CHANGELOG.md # besu/src/main/java/org/hyperledger/besu/controller/CliqueBesuControllerBuilder.java # consensus/clique/src/main/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueMinerExecutor.java # consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueMinerExecutorTest.java
…ssing-block-creation
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…ssing-block-creation # Conflicts: # CHANGELOG.md
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
a4ccdb5 to
677ecbd
Compare
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
677ecbd to
8fab043
Compare
# Conflicts: # CHANGELOG.md # plugin-api/build.gradle
…ssing-block-creation # Conflicts: # plugin-api/build.gradle
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
2baf2ad to
1b2f62f
Compare
# Conflicts: # CHANGELOG.md # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # plugin-api/build.gradle
…ssing-block-creation # Conflicts: # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java # plugin-api/build.gradle
…meout Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
# Conflicts: # CHANGELOG.md # besu/src/main/java/org/hyperledger/besu/cli/options/MiningOptions.java # besu/src/test/java/org/hyperledger/besu/cli/options/MiningOptionsTest.java # consensus/merge/src/test/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinatorTest.java # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockTransactionSelectorTest.java # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/LondonFeeMarketBlockTransactionSelectorTest.java # ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/MiningParameters.java # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/EthScheduler.java # plugin-api/build.gradle # plugin-api/src/main/java/org/hyperledger/besu/plugin/data/TransactionSelectionResult.java
Contributor
Author
|
Closing since implementing this require making tx processing thread safe, implemented a lighter version of this in #6163 |
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
This PR is built on top of #6044, so please check it first. Diff between PRs
This PR is a continuation of #6044, and introduce the possibility to configure a max amount of time the evaluation of a single tx could take during block creation, this to avoid that a single slow processing tx consumes all the time dedicated to the block creation.
If a tx evaluation hit the timeout, the tx is removed from the txpool, to avoid that it will tried again on a future block creation.
This timeout is configurable using the new experimental option:
--Xtxs-selection-per-tx-max-timein millisecondsthat by default is set to the same value of
--Xtxs-selection-max-time, so by default a single tx is allowed to use all the time reserved for block creation, but could be set to a lower value.In case of a tx evaluation timeout a warning is logged: