vrank: read epoch candidates from the header when state is gone - #1019
Open
hyunsooda wants to merge 1 commit into
Open
vrank: read epoch candidates from the header when state is gone#1019hyunsooda wants to merge 1 commit into
hyunsooda wants to merge 1 commit into
Conversation
newCPMatrix seeded the CP matrix from GetCandTesting, which resolves the node states one block below its argument. Computing the transition for an epoch block therefore needed the state two blocks below it, while a node that synced the range without executing it holds only the pivot state. The read failed there and the caller treated the missing scores as "no candidate failed". The epoch-start header carries the same list, so it is used when the state read fails. Constraint: GetCandTesting itself is unchanged - encodeEpochStartVRank builds the expected value for verifying an epoch-start header, and serving that from the header would compare it to itself Constraint: CandTesting is set only in applyEpochTransition, so the header list and the state list cannot disagree within an epoch Confidence: high Scope-risk: narrow Not-tested: a live node syncing across an epoch boundary at the pivot Co-Authored-By: Claude Opus 5 (1M context) <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.
Proposed changes
newCPMatrixseeded the CP matrix fromGetCandTesting, which reads node statesone block below its argument — so an epoch block's transition needed the state two
blocks below it, which a node that synced the range without executing it does not
have. The epoch-start header carries the same candidate list and is now used when
the state read fails.
Types of changes
Checklist
$ make test)Related issues
Further comments