Skip to content

Update proposervm summary to roll forward only #3950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aaronbuchwald
Copy link
Collaborator

Why this should be merged

This PR fixes #3948 caused by #3831 violating an invariant that the ProposerVM index must always be >= the innerVM index.

How this works

Rather than the proposerVM always accepting the state sync summary, this PR ensures the ProposerVM index only moves forward. This means that if the accepted state sync summary is below the proposerVM's last accepted height, it allows the ProposerVM and InnerVM to diverge.

This will be corrected when state sync finishes and SetState is called and the ProposerVM re-aligns the two. Since we keep the ProposerVM roll forward only, we are still able to roll it back and guarantee that they are re-aligned before we entre consensus.

How this was tested

Existing unit tests

Need to be documented in RELEASES.md?

No

Comment on lines +56 to +59
innerVM.GetBlockF = func(_ context.Context, blkID ids.ID) (snowman.Block, error) {
if blkID != snowmantest.Genesis.ID() {
return nil, database.ErrNotFound
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the default test setup does not silently ignore the blkID parameter and return the genesis

@aaronbuchwald aaronbuchwald self-assigned this May 8, 2025
fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Failed to Repair ProposerVM Height after C-Chain State Sync on Fuji
1 participant