Repository navigation
solver: stage-3 diagnostics show the timestamp choice and the block the network stored - #176
Merged
Merged
Conversation
… block the network stored Logging only, on the failure path (info level only when a peer's stage 3 fails the final check, debug level otherwise); nothing signed, sent or stored changes. - "stage3 timestamp": alongside SolverCore::chooseTimeStamp(), without touching its arithmetic or order, the last block timestamp used, every stage-1 timestamp held for the round with its fate (in, outlier, masked, not-after-last, empty, invalid), N, mean, dispersion, the chosen timestamp and the fallback taken, so two nodes can compare the set of stamps they averaged. - "stage3 inputs" gains the hashed fields the line did not show: the confirmation mask bits, a hash of the round-confirmation signatures (with the number of zero slots), the real-trusted mask written, the block version, the round cost and the bootstrap flag. - "stage3 network block": when the stage 3 of this node failed, the block the network stores for that sequence is logged once with the same fields and the names of the fields that differ, so a failing node's log alone shows which mask-independent input differed. - docs/consensus-diagnostics.md: how to read and compare the new lines, and why ts and reward of the stored block differ anyway when the writer retried stage 3 with a smaller mask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Logging only, on the failure path (info level only when a peer's stage 3 fails the final check, debug level otherwise). Nothing signed, sent or stored changes;
chooseTimeStamp()keeps its arithmetic and order, the diagnostics read the same values alongside it. Follows #167/#168.Motivation: a community.17 node on mainnet (key 6ZW39KmR) is the minority in stage 3 in about half of the rounds it is trusted (
failed=block+round,key ok, trusted hash agreed), then gray-listed. Itsstage3 inputsline differs from the written block only ints(2–5 ms lower), but the written block is the writer's second stage-3 iteration with a 6-member mask, sotsandrewarddiffer for that reason alone and the first-iteration cause is still unknown. These lines make a failing node's own log sufficient for the mask-independent inputs, and comparable with a peer's for the timestamp.What is logged:
stage3 timestamp(new, right afterstage3 inputs): the last block timestamp used, every stage-1 timestamp held for the round with its fate (in,outlier,masked,not-after-last,empty,invalid,sender-out-of-range),N,mean,disp, the chosen timestamp and any fallback. Bounded by the confidant count.stage3 inputsgains the hashed fields it did not show:confMask(confirmation mask bits),confSigs(hash of the round-confirmation signatures, with the number of zero slots),realTrusted,version,roundCost,bootstrap.stage3 network block(new): when this node's stage 3 failed, the block the network stores for that sequence is logged once with the same fields anddiffers=naming the fields that differ (armed by the first failure, read and cleared bystoreBlockEvent/lastBlockReplacedEvent; at most one line per diagnosed round).docs/consensus-diagnostics.md: how to read and compare the lines (sections 1a and 1b).Tests: Linux build; testnet.yml runs on this branch (official peers + contracts, and a timestamp-skew run from the
test/stage3-skewhook) listed in the comments below.🤖 Generated with Claude Code