Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: pending block construction #13109

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Dec 3, 2024

Right now the logic assumes that we might have an actual pending block but not its receipts which is not possible.

This PR changes it so that we only fallback to manual block building when we are deriving it from the latest header.

Additionally, this delegates the pending block env construction to next_cfg_and_block_env to avoid manually changing header fields as it's not possible for generic headers.

This should now make it easier to delegate all of this to payload builder, as we no longer have to build a block given a header from CL

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Comment on lines +107 to +113
.next_cfg_and_block_env(
&latest,
NextBlockEnvAttributes {
timestamp: latest.timestamp() + 12,
suggested_fee_recipient: latest.beneficiary(),
prev_randao: B256::random(),
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great

@klkvr klkvr added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit 4e73bb0 Dec 4, 2024
41 checks passed
@klkvr klkvr deleted the klkvr/use-pending-with-receipts branch December 4, 2024 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants