replay: do not set block_id for leader_blocks#11613
Merged
AshwinSekar merged 1 commit intoanza-xyz:masterfrom Mar 27, 2026
Merged
replay: do not set block_id for leader_blocks#11613AshwinSekar merged 1 commit intoanza-xyz:masterfrom
AshwinSekar merged 1 commit intoanza-xyz:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #11613 +/- ##
=======================================
Coverage 83.1% 83.1%
=======================================
Files 850 850
Lines 320849 320900 +51
=======================================
+ Hits 266759 266836 +77
+ Misses 54090 54064 -26 🚀 New features to boost your workflow:
|
bw-solana
approved these changes
Mar 27, 2026
bw-solana
reviewed
Mar 27, 2026
| }; | ||
| bank.set_block_id(block_id); | ||
|
|
||
| if block_id.is_some() { |
There was a problem hiding this comment.
would probably be nice to have a comment explaining the race between broadcast/replay in setting block ID
Author
There was a problem hiding this comment.
i'm planning to upstream the alpenglow code which splits this out in a separate fn soon, will add the comment then
This was referenced Mar 30, 2026
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.
Problem
For leader banks, broadcast is responsible for setting the
block_idonce the block has finished shredding:agave/turbine/src/broadcast_stage/broadcast_utils.rs
Lines 200 to 209 in a7c8d68
In replay we accidentally set the
Noneblock id for leader blocksagave/core/src/replay_stage.rs
Lines 3525 to 3558 in fb1208f
In rare cases, shredding can complete before bank freeze on a leader block. This will lead to:
Some(block_id)block_idback toNoneSummary of Changes
Do not set
block_idin replay for leader blocks.This was found and correctly addressed in the alpenglow repo - just didn't fix it here
https://github.com/anza-xyz/alpenglow/blob/8a139cd8c68b7ee9582b55f6f9c472cb9444917b/core/src/replay_stage.rs#L3689-L3690