miner: retry immediately when block building is interrupted#33837
Closed
jrhea wants to merge 1 commit into
Closed
Conversation
eaf7d1e to
f2e8985
Compare
Contributor
Author
|
closing this in favor of: #33908 |
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.
Problem
When the build loop's
fillTransactions()is interrupted by the recommit timer before all pending transactions are included, the next build iteration waits the full Recommit interval (default 2s) before retrying. This trace shows the issue:The span with the red dot was interrupted and returned an error because it didn't finish including all the txs. You can see there is almost 2s of empty space left over where it could have been including more txs.
Fix
Here is a trace showing that it now retries immediately and includes more transactions:
In this particular case, it included all 34 transactions available on the second iteration; whereas it would have only had 30 from the first iteration with the old logic.