Adding ParentReadyUpdate BlockMarker for Optimistic Block Packing in Alpenglow
#336
ksn6
started this conversation in
SIMD Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Adding
ParentReadyUpdateBlockMarkerfor Optimistic Block Packing in AlpenglowContext
The Alpenglow consensus protocol introduces an optimistic block packing mechanism that allows leaders to begin constructing blocks before their parent blocks are fully finalized. This optimization significantly reduces block production latency by enabling parallel processing of block construction and parent finalization.
In Alpenglow's optimistic block packing, a leader slot can start producing a block on a tentative parent while the network is still finalizing the actual parent through the notarization process. When the
ParentReadyevent occurs (indicating that all necessary skip certificates have been collected and aNotarizeFallbackcertificate exists for a parent), the leader may need to switch to a different parent block than initially assumed. This parent switching mechanism is critical for maintaining consensus integrity while achieving the performance benefits of optimistic packing.Problem
When a leader's optimistic block packing results in a parent switch (Algorithm 3, Line 7 in the Alpenglow protocol), there needs to be a special marker disseminated within the block to signal this parent change. Currently, the block structure lacks a standardized way to include this critical metadata that indicates when
ParentReadyhas triggered a switch to a new parent block.Without this marker, downstream validators and block processors cannot properly track parent switches that occur during optimistic block packing, potentially leading to consensus issues or inability to properly validate the block's construction timeline. The marker needs to contain both the new parent slot and the new parent block ID to fully specify the parent switch event.
Solution
NOTE: for context, this solution makes use of the PR here: anza-xyz/alpenglow#364 as well as the SIMD here: #307.
We propose adding a new
ParentReadyUpdatevariant to theBlockMarkerV2enum in the block component system. This leverages the extensibleBlockMarkerframework introduced in SIMD 307, which provides a versioned, variant-based approach to adding block-level metadata.The implementation in
entry/src/block_component.rsintroduces:1.
VersionedParentReadyUpdateStructure2.
BlockMarkerV2Extension3. Serialization Layout
The
ParentReadyUpdateV1serializes as:This design directly builds upon SIMD 307's foundational work, which established:
BlockMarkerconcept with a 64-bit flag indicatorThe key design decisions from SIMD 307 that enable this extension are:
ParentReadyUpdatestructureBlockMarkervariant is self-contained and independently parseableBy utilizing
BlockMarkerV2(version 2 of theBlockMarkerformat), we maintain backward compatibility while adding the newParentReadyUpdatevariant. Validators running older software can still process blocks with these markers by skipping unknown variants, while updated validators can properly interpret and validate parent switch events in optimistically packed blocks.This solution provides a clean, extensible mechanism for tracking parent switches in Alpenglow's optimistic block packing algorithm, ensuring that the consensus protocol can efficiently reduce latency while maintaining full auditability of block construction decisions.
Beta Was this translation helpful? Give feedback.
All reactions