Skip to content

feat(payload): separate builder interrupt and wait deadlines#2939

Merged
shekhirin merged 8 commits intomainfrom
alexey/payload-builder-interrupt-wait-deadlines
Mar 9, 2026
Merged

feat(payload): separate builder interrupt and wait deadlines#2939
shekhirin merged 8 commits intomainfrom
alexey/payload-builder-interrupt-wait-deadlines

Conversation

@shekhirin
Copy link
Member

@shekhirin shekhirin commented Mar 2, 2026

Supersedes #2787

Problem

Payload building is currently limited by a 500ms deadline. Builder can only enforce the time it spends on transaction execution, but there's always an additional overhead of state root calculation.

Solution

Lower the time we give payload builder to execute transactions to 200ms, but wait until 450ms before returning the built block back to consensus to ensure the ~ stable block time at 500ms.

image

Changes

@shekhirin shekhirin force-pushed the alexey/payload-builder-interrupt-wait-deadlines branch from e27430f to f7a56d6 Compare March 2, 2026 20:00
@shekhirin shekhirin added C-enhancement New feature or request A-block-building Related to block building labels Mar 2, 2026
@shekhirin shekhirin marked this pull request as ready for review March 2, 2026 20:26
Copy link
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Just a few naming nits so that it's easier for operators to understand what the settings do.

shekhirin and others added 3 commits March 3, 2026 10:56
Co-authored-by: Richard Janis Goldschmidt <github@aberrat.io>
Co-authored-by: Richard Janis Goldschmidt <github@aberrat.io>
@jenpaff jenpaff requested a review from mattsse March 3, 2026 11:01
@shekhirin shekhirin force-pushed the alexey/payload-builder-interrupt-wait-deadlines branch from 4851359 to 4a27861 Compare March 3, 2026 17:59
…d future

Use explicit deadline tracking (context.current() + sleep_until) instead
of a pre-started sleep future, as suggested by Matthias. This is clearer
and avoids depending on when the sleep future starts timing.

Co-Authored-By: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
@shekhirin shekhirin force-pushed the alexey/payload-builder-interrupt-wait-deadlines branch from 4a27861 to 4d19c33 Compare March 3, 2026 18:00
.wrap_err_with(|| format!("failed getting payload for payload ID `{payload_id}`"))?;

// Keep waiting for `self.payload_return_time`, if there's anything left after building the block.
context.sleep_until(payload_return_time).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

This reads like a proper sentence, which is nice.

@tempoxyz tempoxyz deleted a comment from decofe Mar 9, 2026
@shekhirin shekhirin added this pull request to the merge queue Mar 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 9, 2026
@shekhirin shekhirin added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 49f5c56 Mar 9, 2026
24 checks passed
@shekhirin shekhirin deleted the alexey/payload-builder-interrupt-wait-deadlines branch March 9, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-block-building Related to block building C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants