Fix for tx incorrectly discarded when there is a timeout during block creation#6563
Merged
fab-10 merged 6 commits intobesu-eth:mainfrom Feb 16, 2024
Conversation
… creation Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
|
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
gauravahuja
reviewed
Feb 15, 2024
Contributor
gauravahuja
left a comment
There was a problem hiding this comment.
lgtm, just the one comment.
...n/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
reviewed
Feb 16, 2024
Contributor
macfarla
left a comment
There was a problem hiding this comment.
I think it makes sense. couple of comments
...n/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java
Outdated
Show resolved
Hide resolved
...n/java/org/hyperledger/besu/ethereum/blockcreation/txselection/BlockTransactionSelector.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
macfarla
approved these changes
Feb 16, 2024
suraneti
pushed a commit
to suraneti/besu
that referenced
this pull request
Feb 24, 2024
… creation (besu-eth#6563) 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
In case the selection of transactions during block creation goes in timeout, it is possible that some txs are incorrectly dropped from the txpool, since marked as invalid.
When the timeout occurs the block is created with all the txs selected until that moment, after that the world state is closed, while it is possible that a tx was still processing, in that case the processing tx validation could fail due fact that is no more possible to get the account from the closed world state, and the tx is wrongly tagged as invalid with UPFRONT_COST_EXCEED_BALANCE, that cause the tx to be dropped from the pool.
This PR, improves the handling of timeout and not selected txs, avoiding that them can be incorrectly dropped in case of timeout
Fixed Issue(s)