fix: wait builder's final bid during the peak time#2892
Merged
zzzckck merged 1 commit intobnb-chain:developfrom Feb 14, 2025
Merged
fix: wait builder's final bid during the peak time#2892zzzckck merged 1 commit intobnb-chain:developfrom
zzzckck merged 1 commit intobnb-chain:developfrom
Conversation
buddh0
approved these changes
Feb 14, 2025
zzzckck
approved these changes
Feb 14, 2025
Collaborator
zzzckck
left a comment
There was a problem hiding this comment.
LGTM, as a short term solution, we can check later if the mine logic can be improved further in the future.
zzzckck
pushed a commit
that referenced
this pull request
Feb 15, 2025
zzzckck
pushed a commit
that referenced
this pull request
Feb 15, 2025
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.
Description
When the block gas limit is reached in the miner's local building loop, the packing process stops prematurely, even though there might be still much time till the block.timestamp. At that time, some builders may not have provided their best bids, leading to suboptimal block selection.
On February 14th, during a peak usage period on the BNB Chain mainnet, builders struggled to have their bids accepted by validators, making it difficult for bundles and private transactions to finalize.
This PR adds a simple mechanism: if there's still ample time before sealing, introduce a short wait. This ensures the validator makes full use of the 3-second window to pack transactions and wait for potentially better bids.
Rationale
Example
Changes
Note: This is one of many possible approaches; for example, a separate Go routine could be used to wait for builder bids. This PR offers a simple solution.