feat(consensus): cluster supermajority root tracking#1230
Draft
prestonsn wants to merge 11 commits intoadamw/implement-getSlot-in-rpcfrom
Draft
feat(consensus): cluster supermajority root tracking#1230prestonsn wants to merge 11 commits intoadamw/implement-getSlot-in-rpcfrom
prestonsn wants to merge 11 commits intoadamw/implement-getSlot-in-rpcfrom
Conversation
- Add SlotTree.tip() to get highest slot among fork leaves (bypass mode) - Update latest_processed_slot inside vote handling to match Agave behavior - Update latest_processed_slot in bypassConsensus() from SlotTree.tip() - Change ForkChoiceProcessedSlot to use store() since slot can decrease Note: Bypass mode uses highest fork tip, while consensus mode matches Agave's semantics where processed slot only updates when voting.
Condense nested if statements into single-line conditional return.
…AndHandleNewRoot test
0059060 to
899c221
Compare
- Add RootedStake struct and collectRootedStake to gather root slots from vote accounts - Add getHighestSuperMajorityRoot to find slot rooted by >2/3 stake - Add HighestSuperMajorityRoot tracker with atomic updates - Update SlotTracker to use highest_super_majority_root for finalized commitment - Compute and update super majority root in handleVotableBank after voting
899c221 to
7ea7cde
Compare
7d84370 to
8279fe0
Compare
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.
The way we track the finalized slot for RPC differs from Agave.
Currently, Sig returns the local tower root for getSlot with finalized commitment. Agave instead returns the highest slot that >2/3 of cluster stake has rooted, computed by aggregating root_slot from all vote accounts weighted by stake.
This gets calculated every time a bank is deemed "votable" (in handleVotableBank, after selectVoteAndResetForks).
This PR ports this functionality to Sig by:
Agave References: