Skip to content

replay: verify Alpenglow block sequence - #11330

Open
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/ag-verify
Open

replay: verify Alpenglow block sequence#11330
ripatel-fd wants to merge 1 commit into
mainfrom
ripatel/ag-verify

Conversation

@ripatel-fd

Copy link
Copy Markdown
Contributor

Agave has a state machine verifying that the pieces of an
Alpenglow block appear in a particular order

Agave has a state machine verifying that the pieces of an
Alpenglow block appear in a particular order
Copilot AI balanced review requested due to automatic review settings September 7, 2026 09:43
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-424669000-perf per slot 0.049702 s 0.049703 s 0.002%
backtest mainnet-424669000-perf snapshot load 2.617 s 2.638 s 0.802%
backtest mainnet-424669000-perf total elapsed 64.413451 s 64.414617 s 0.002%
firedancer mem usage with mainnet.toml 173.41 GiB 173.41 GiB 0.000%

Copilot AI left a comment

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.

🟡 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!=1 and hash_cnt!=1, but not the new txn_cnt!=0 rejection. 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 ));
}
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.

3 participants