Repository navigation
Accept real node bootstrap in consensus replay - #8733
Open
cjen1-msft wants to merge 1 commit into
Open
cjen1-msft wants to merge 1 commit into
cjen1-msft wants to merge 1 commit into
Conversation
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 10, 2026 15:57
8916a80 to
4c03d6f
Compare
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 10, 2026 18:47
4c03d6f to
211a95c
Compare
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 11, 2026 16:23
211a95c to
be90c99
Compare
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 12, 2026 12:37
be90c99 to
3715b5d
Compare
cjen1-msft
changed the base branch from
cjen1-msft-didactic-guacamole
to
cjen1-msft-expert-dollop
November 12, 2026 12:38
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 12, 2026 12:44
3715b5d to
fcb0692
Compare
Amaury Chamayou (achamayou)
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 12, 2026 19:21
fcb0692 to
acb7e2f
Compare
cjen1-msft
marked this pull request as ready for review
November 13, 2026 10:56
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the bootstrap trace replay changes.
No open issues 🎉
What changed in this PR
Updates the Lean consensus replayer to accept real CCF node bootstrap traces, extending replay support beyond the driver's immediate, small genesis entry.
Changes:
- Accepts bare ticks before genesis and one optional genesis flush, while rejecting sends from that flush.
- Adds valid and invalid fixtures covering the bootstrap sequence.
- Documents the expanded bootstrap contract and fixture expectations.
Custom instructions used
Applied the CCF repository guidance supplied in the review context. No additional instruction files were loaded.
| File | Description |
|---|---|
lean/consensus/replay/README.md |
Documents accepted pre-genesis ticks and genesis flushing. |
lean/consensus/replay/fixtures/valid/bootstrap.ndjson |
Adds a valid real-node-style bootstrap trace. |
lean/consensus/replay/fixtures/README.md |
Describes the new bootstrap fixtures. |
lean/consensus/replay/fixtures/invalid/bootstrap-flush-send.ndjson |
Covers rejection of sends during the genesis flush. |
lean/consensus/replay/fixtures/invalid/bootstrap-event.ndjson |
Covers rejection of non-tick events before genesis. |
lean/consensus/Consensus/Replay/Reduction.lean |
Allows pre-genesis ticks and an optional bootstrap flush. |
Review effort: Balanced
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 13, 2026 15:48
acb7e2f to
2f29451
Compare
Amaury Chamayou (achamayou)
approved these changes
Nov 13, 2026
Amaury Chamayou (achamayou)
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 13, 2026 16:22
2f29451 to
34187c0
Compare
Real nodes trace ticks between becoming leader and the asynchronous genesis transaction, then flush the large genesis entry. Bootstrap now accepts bare ticks before genesis, unobserved, and an optional flush, which must send nothing because no bootstrap action claims a send. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cjen1-msft
force-pushed
the
cjen1-msft-scaling-tribble
branch
from
November 13, 2026 18:02
34187c0 to
abd4907
Compare
Amaury Chamayou (achamayou)
approved these changes
Nov 13, 2026
This branch has not been deployed
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.
Stacked on #8728.
The consensus replayer rejects every trace captured from a real CCF node at its second record; this lets it check them. A real node runs genesis asynchronously after
force_become_primary, so it traces ticks betweenbecome_leaderand the genesisreplicate. Its genesis entry carries the constitution and exceedsappend_entries_size_limit, soreplicate()also traces abatch_flush.cft_driverwrites a small genesis entry immediately, so driver captures never showed either.Bootstrap now accepts only those bare ticks, unobserved because the model starts after genesis, and one optional flush that must send nothing.
Why skipping pre-genesis ticks is sound
Before genesis the leader has no peers or configurations (the traced
become_leaderlists none), so a tick sends nothing and its check-quorum passes trivially; the next observation still checks the state the ticks leave.replicate()holds the consensus lock across the genesis batch, from itsreplicateevent throughadd_configurationandbatch_flush, so no other event on that node falls between them. A send after the flush is rejected as an ungrouped event, since no rule claims it.