Repository navigation
Add single-node consensus trace validation mode - #8916
Draft
cjen1-msft wants to merge 1 commit into
Draft
cjen1-msft wants to merge 1 commit into
cjen1-msft wants to merge 1 commit into
Conversation
This was referenced Dec 3, 2026
cjen1-msft
changed the base branch from
main
to
cjen1-msft-fictional-broccoli
December 3, 2026 00:16
cjen1-msft
force-pushed
the
cjen1-msft-special-fortnight
branch
from
December 3, 2026 00:16
98ec14e to
397e17a
Compare
cjen1-msft
force-pushed
the
cjen1-msft-special-fortnight
branch
from
December 3, 2026 11:13
397e17a to
b3d84b8
Compare
Keep complete mode (the global scheduler) as the default and add --mode=single-node (with optional --node=NODE) to reduce and validate nodes independently on Consensus.Model.Node.step without modeling the network. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cjen1-msft
force-pushed
the
cjen1-msft-special-fortnight
branch
from
December 4, 2026 15:30
b3d84b8 to
1d533d4
Compare
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 #8925, which traces what a follower applies and a joiner's term history, and reads them in the reducer.
Adds
--mode=single-node(with optional--node=NODE) alongside the existing complete mode (--mode=complete, the default). Complete mode, the global scheduler, all existing fixtures, and CI policy are unchanged.In single-node mode,
consensus-replaydoes not model the network and does not require a bootstrap node or other peers in the capture:reduceNodereduces one node's event stream into its groups.validateNoderuns those groups onConsensus.Model.Node.stepfrom the node's initial state, sharing the snapshot, send-matching, and input checks with complete mode.execute_append_entries_sync), using placeholders for trailing unread entries that the model must not apply.init_as_backup's term history and snapshot hooks.--lenient, stops before a node's final group if that group is incomplete (the model queued sends the trace does not show); contradictions remain errors in either mode.Multi-node partial mode (
--mode=partial) and mid-trace cut support (--cut) are separate follow-up layers.Verification
lake build --wfail(95 jobs, includingReplayDelivery),lake exe check-imports, andlake exe fmt --checkpass.lean/consensus/replay/check-single-node.pypasses: full trace (--mode=single-node,--mode=complete,--node=0,--node=1), lone-follower trace with no bootstrap node, repeated receive holding entries, torn final send/entry, join cut mid-rule, non-final incomplete rejection, untraced entry with ACK rejection, gap/mixed-view/wrong-sender/out-of-snapshot rejections, and bad flag combinations.black,ruff,prettier,doc-newline-checks.sh,ascii-checks.sh,release-notes-checks.sh, andcopyright-checks.shpass.