You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
This file contains 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
Need to detect if cluster has confirmed some alternate version V of a duplicate slot (Imagine a validator has a dead slot, or a valid, playable version of a slot, but rest of the cluster confirmed a different slot). Can this be done by having another version of EpochSlots, but for confirmed slots instead of completed slots?
If you see a slot is confirmed by supermajority in 1) and your version of the slot is dead or unconfirmed for some expiration time, then dump your version of the slot and download another version from a trusted validator OR random stake weighted validator who claims they have a confirmed version of the block. For v2 we can ask for a proof with an RSA accumulator that this version of the slot is the one included in a future confirmed block
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
4 participants
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.
Problem
Duplicate versions of a slot potentially partition and stall the cluster
Summary of Changes
Here's how I imagine the full fix working:
What's in this PR (goal is to prevent voting on duplicate slots asap):
a) If the duplicate fork is already confirmed, we (eventually) signal the cluster here which version of this slot we have: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-5984b6b0429f857c13a2a362669ab37cR543. This is because only 1 fork should be confirmed unless > 1/3 of the cluster is malicious.
b) If ReplayStage processes and marks those duplicates/entire fork descended from those duplicate slots here: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-5984b6b0429f857c13a2a362669ab37cR559-R563
In 1b) after a fork has been marked duplicate, we remove it as a candidate for voting here:
https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-5984b6b0429f857c13a2a362669ab37cR1326-R1331. However, if you've already voted on this fork, and you can't generate a switching prof, then you will continue to generate banks on this fork
to avoid liveness issues (more details here: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-5984b6b0429f857c13a2a362669ab37cR1271-R1278)
If a duplicate slot is confirmed, the entire fork is added back into the candidate set by clearing the duplicate flag here: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-fb925e9cb1a6c2044ceaa55aa7c8f255R393
What's in follow-up PR:
Need to detect if cluster has confirmed some alternate version
V
of a duplicate slot (Imagine a validator has a dead slot, or a valid, playable version of a slot, but rest of the cluster confirmed a different slot). Can this be done by having another version of EpochSlots, but for confirmed slots instead of completed slots?If you see a slot is confirmed by supermajority in 1) and your version of the slot is dead or unconfirmed for some expiration time, then dump your version of the slot and download another version from a trusted validator OR random stake weighted validator who claims they have a confirmed version of the block. For v2 we can ask for a proof with an RSA accumulator that this version of the slot is the one included in a future confirmed block
When a confirmed version of a duplicate slot with hash
V
is found, and it's not the same as your currently played version:a) Clear the currently played version from
i) status cache: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-92c739d9ad61135b886d1a44957fe485R83
ii) and progress map in replay stage: https://github.com/solana-labs/solana/compare/master...carllin:FixReplayStage?expand=1#diff-5984b6b0429f857c13a2a362669ab37cR486
b) Set the confirmed blockhash in blockstore.
Fixes #