[r3.5] execution: build payloads until the slot they are for - #23102
Open
lystopad wants to merge 1 commit into
Open
[r3.5] execution: build payloads until the slot they are for#23102lystopad wants to merge 1 commit into
lystopad wants to merge 1 commit into
Conversation
A payload builder stopped after a fixed fraction of a slot, measured from when the attributes arrived. A consensus layer may send attributes well ahead of the slot the payload is for and then call getPayload against the cached payload id without sending fresh attributes, in which case the builder has already stopped and returns a payload missing every transaction that arrived in between. Derive the budget from the payload's own timestamp instead, so the builder survives until shortly into the target slot however early it was asked. Floor it at the previous fixed budget so a late request is no worse off, and cap it so an implausible timestamp cannot pin a builder and its resources.
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.
Cherry-pick of #23098 to release/3.5.
r3.5-specific adaptations
NewBlockBuilderdiffers on this branch: it usessyncCondand aterminatedchannel where main uses adonechannel, andStop()takes no context. Only the signature change (maxBuildTimeSecs uint64→maxBuildTime time.Duration) was applied — the branch's own builder internals are untouched.buildDurationand its tests are byte-identical to #23098.