Repository navigation
Check consensus traces across nodes - #8924
Draft
cjen1-msft wants to merge 4 commits into
Draft
cjen1-msft wants to merge 4 commits into
cjen1-msft wants to merge 4 commits into
Conversation
cjen1-msft
marked this pull request as draft
December 3, 2026 00:05
cjen1-msft
force-pushed
the
cjen1-msft-animated-fortnight
branch
from
December 3, 2026 00:18
5583ae2 to
2582715
Compare
Reduce one node's events, run its groups on Node.step, and report the least fraction of any node's events that were reduced and validated. The interpreter's global scheduler becomes a per-node validate, which builds a received message and a joiner's log from the node's own events; checking nodes against each other is left to a later change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… signatures align After each node validates alone, validate matches every receive against the sends its source traced, as a multiset, and requires nodes holding the same signature (index, term) to hold the same entries behind it. With --lenient a receive with no traced send is counted as unsent rather than rejected, since a node's trace can end before its last sends. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A node that exits cleanly logs how many events each trace sink dropped; a killed node logs nothing. If every node of a network reports none for the capture's sink, the test infrastructure ends the capture with a capture.complete record, and cft_trace_validation.py then requires unsent to be 0. Other captures still only report it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per-node validation accepts it; nodes holding the same signature must now hold the same entries behind it, which rejects it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
cjen1-msft
force-pushed
the
cjen1-msft-animated-fortnight
branch
from
December 3, 2026 11:15
2582715 to
63acaaf
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 #8916, which validates each node's consensus trace alone and so cannot show that a received packet was ever sent, or that two nodes hold the same log.
This is a first increment of the cross-node checks, run by
validateafter the nodes validate alone.What it checks
Step.receiveof a validated group must match aNativeSendtraced by its source, as a multiset of (source, destination, packet). A sent packet need not be received, and one send received twice is an error.Cut-short captures
A killed node can lose the tail of its trace although its packets were delivered.
With
--lenient, a receive with no traced send is therefore not an error; the result reports the number in a newunsentfield (0 without--lenient).Log alignment only compares what nodes did observe, so a disagreement is an error with
--lenienttoo.Per-node validation and the watermark are unchanged.
Enforcement in e2e CI
A node that exits cleanly logs
Fluentd exporter shutdown: N dropped eventsonce per trace sink; a killed node logs nothing.When a network stops,
tests/infra/network.pyreads the stdout log of every node that was given the capture's sink (always the node's last sink) and, if each one's last report is 0, appends acapture.completerecord to the capture.Replay skips it like any record of another tag.
tests/cft_trace_validation.pystill runs every capture with--lenient, and now fails a capture that ends with that record and hasunsent > 0; other captures only reportunsent.The Lean workflow runs the scenario captures without
--lenient, so the check is always enforced there.New surface: the
unsentresult field,Result.unsent, one private Lean helpersignatures, and thecapture.completerecord. No new flags, files or statuses.Evidence
cft_scenario_testcaptures validate without--lenient.check-per-node.pygains three cases that fail on Add single-node consensus trace validation mode #8916: a receive whose send was removed (error;unsent == 1with--lenient), a packet received twice but sent once, and a follower applying a different configuration than the leader appended behind a shared signature (error in both modes).applied-configuration-mismatchfixture, which Add single-node consensus trace validation mode #8916 removed because it passes per node, is restored and rejected.e2e_logging,governance_test,code_update_testandreconfiguration_test_suiteproduced 29 captures, all marked complete, all accepted withunsent0 and watermark 1; validating all 29 took about 1.4 s.lake build --wfail,check-imports,fmt --check, and the doc, ASCII, release-note, prettier, black and ruff checks pass.Not done
applied-signature-mismatchin Check applied entries and snapshots against the consensus trace #8925) is accepted.snapshot-configuration-mismatchandsnapshot-term-history-mismatchfrom Check applied entries and snapshots against the consensus trace #8925 are accepted.tsis not used, so a receive "before" its send, or a joiner starting from a signature not yet committed (uncommitted-snapshot), is not detected.--lenientleaves unvalidated is not matched against sends.