replay: verify Alpenglow block sequence - #11330
Open
ripatel-fd wants to merge 1 commit into
Open
Conversation
Agave has a state machine verifying that the pieces of an Alpenglow block appear in a particular order
Performance Measurements ⏳
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical handling gaps reject or crash on protocol-valid Alpenglow components.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds replay validation for Alpenglow block-component ordering and reports malformed sequences through replay events.
Changes:
- Adds scheduler state-machine validation and a new dead reason.
- Extends block-completion event schemas and generated constants.
- Adds valid and invalid sequence tests.
File summaries
| File | Review |
|---|---|
src/discof/replay/test_sched.c |
Adds ordering tests. Nit (1 vote): Missing coverage for rejecting transaction-bearing alpenticks. |
src/discof/replay/fd_sched.h |
Defines the new dead reason. No issues found. |
src/discof/replay/fd_sched.c |
Implements sequence validation. Critical (2 votes): Valid genesis-certificate markers cannot be accepted. Critical (1 vote): Valid UPDATE_PARENT components terminate replay instead of reparenting/resetting state. |
src/discof/replay/fd_replay_tile.c |
Maps the dead reason to replay events. No issues found. |
src/disco/events/schema/events.proto |
Extends the event enum. No issues found. |
src/disco/events/schema/block_completed.json |
Documents the new completion reason. No issues found. |
src/disco/events/generated/fd_event_gen.h |
Adds the generated event constant. No issues found. |
Review details
Suppressed comments (1)
src/discof/replay/test_sched.c:768
- The invalid-alpentick cases cover
mblk_cnt!=1andhash_cnt!=1, but not the newtxn_cnt!=0rejection. Add a one-microblock transaction-entry component after the footer so a regression that accepts a transaction-bearing “alpentick” is caught.
CASE( "wide entry after footer", BAD, AG_HEADER, AG_FOOTER, AG_WIDE_ENTRY );
CASE( "fat entry after footer", BAD, AG_HEADER, AG_FOOTER, AG_FAT_ENTRY );
- Files reviewed: 6/7 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+288
to
+290
| /* GENESIS_CERTIFICATE never reaches here: fd_block_marker_de rejects | ||
| it as unsupported. UPDATE_PARENT is unhandled and crashes below, | ||
| rather than being staged. */ |
Comment on lines
+2548
to
+2550
| if( FD_UNLIKELY( marker->variant==UPDATE_PARENT ) ) { | ||
| FD_LOG_CRIT(( "UNHANDLED alpenglow update parent: slot %lu, new_parent_slot %lu", block->slot, marker->update_parent.new_parent_slot )); | ||
| } |
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.
Agave has a state machine verifying that the pieces of an
Alpenglow block appear in a particular order