Skip to content

chore(pipeline): shorten last block in checkpoint build duration to allow checkpoint construction#21591

Open
Maddiaa0 wants to merge 1 commit intomd/update-latency-explorerfrom
md/further-pipeline-overlapping
Open

chore(pipeline): shorten last block in checkpoint build duration to allow checkpoint construction#21591
Maddiaa0 wants to merge 1 commit intomd/update-latency-explorerfrom
md/further-pipeline-overlapping

Conversation

@Maddiaa0
Copy link
Copy Markdown
Member

Overview

Small compromise to smoothen checkpoint construction, the last block should really be shorter. Palla's pr's with the multiplier also address this, however
I think that realistically we are only concerned with the last block being shorter.

@Maddiaa0 Maddiaa0 force-pushed the md/update-latency-explorer branch from 3850b5a to 94d5685 Compare March 16, 2026 18:08
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from e636f49 to 3a1ba92 Compare March 16, 2026 18:08
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from 3a1ba92 to 6b3361c Compare March 18, 2026 11:33
@Maddiaa0 Maddiaa0 force-pushed the md/update-latency-explorer branch from 94d5685 to 5c7471a Compare March 18, 2026 11:33
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from 6b3361c to 94cdd36 Compare March 18, 2026 11:59
@Maddiaa0 Maddiaa0 force-pushed the md/update-latency-explorer branch from 5c7471a to 2e68fe2 Compare March 18, 2026 11:59
@Maddiaa0 Maddiaa0 changed the base branch from md/update-latency-explorer to graphite-base/21591 March 19, 2026 22:03
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from 94cdd36 to 6da9164 Compare March 19, 2026 22:19
@Maddiaa0 Maddiaa0 force-pushed the graphite-base/21591 branch from 2e68fe2 to 191d1bb Compare March 19, 2026 22:19
@Maddiaa0 Maddiaa0 changed the base branch from graphite-base/21591 to md/update-latency-explorer March 19, 2026 22:19
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from 6da9164 to dea8538 Compare March 19, 2026 23:57
@Maddiaa0 Maddiaa0 force-pushed the md/update-latency-explorer branch from 191d1bb to 63f38ed Compare March 19, 2026 23:57
checkpoint build time

Add a new optional `lastBlockDurationMs` config field to SequencerConfig.
When set and less than blockDurationMs, the last block in a multi-block
slot gets a shorter window, causing the checkpoint to broadcast earlier.
This gives the next proposer more usable early-start time.
@Maddiaa0 Maddiaa0 force-pushed the md/update-latency-explorer branch from 63f38ed to df9a22b Compare March 20, 2026 13:21
@Maddiaa0 Maddiaa0 force-pushed the md/further-pipeline-overlapping branch from dea8538 to 3009e59 Compare March 20, 2026 13:21
@Maddiaa0 Maddiaa0 marked this pull request as ready for review March 30, 2026 14:15
Copy link
Copy Markdown
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

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

Reading the PR I'm not sure I understand the rationale for this. Why do we need to shorten specifically the last block? If we want to allow more time at the end of the slot for assembling the checkpoint, we can bump the CHECKPOINT_ASSEMBLE_TIME, and reduce the time for all blocks proportionally (or the number of blocks for that matter), so we don't have an edge case when handling the very last block.

Comment on lines +182 to +184
const pendingCheckpoint = await this.getPendingCheckpoint();
const pendingCheckpointNumber =
pendingCheckpoint?.checkpointNumber ?? CheckpointNumber(INITIAL_CHECKPOINT_NUMBER - 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this change? Do we need to deserialize an entire checkpoint (which iirc includes its blocks and its tx effects) just to get its number?

enableProposerPipelining: true, // <- yehaw
mockGossipSubNetwork: true,
mockGossipSubNetworkLatency: 500, // 200 ms delay in message prop - adverse network conditions
mockGossipSubNetworkLatency: 200, // 200 ms delay in message prop - adverse network conditions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, good

Comment on lines +83 to +85
blockDurationMs: 5800,
lastBlockDurationMs: 3000,
maxTxsPerCheckpoint: 24,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd appreciate a comment on why these values, 5800 looks odd

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