-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Adopt heaviest subtree fork choice rule #10441
Conversation
@aeyakovenko thinking through the best way to migrate onto this new fork choice rule. I think the problem with immediate unlocking this feature is if both rules choose different blocks:
It seems the safest thing to do is a rolling upgrade, which unlocks the new for choice rule when the root is greater than some slot
Sucky part is that means I have to reintroduce the old fork choice logic :P |
21aa1f1
to
0a36b17
Compare
Codecov Report
@@ Coverage Diff @@
## master #10441 +/- ##
=========================================
+ Coverage 81.6% 81.7% +0.1%
=========================================
Files 296 299 +3
Lines 69320 69794 +474
=========================================
+ Hits 56608 57078 +470
- Misses 12712 12716 +4 |
da8f8e2
to
ed9249b
Compare
i think i need you to walk me through this :) |
b38475c
to
ed96850
Compare
@@ -1812,6 +1751,14 @@ impl ReplayStage { | |||
} | |||
} | |||
|
|||
pub fn get_unlock_heaviest_subtree_fork_choice(operating_mode: OperatingMode) -> Slot { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvines, fyi, one more of our favorite rolling upgrades 😄 . This one should be done before any of the switching proof features are enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg, just tag me again when this lands so I can manage the rollout as clusters upgrade to 1.3
a11c681
to
1a85abc
Compare
@carllin - I removed the v1.2 tag, this appears way to risky for v1.2. This can ride the v1.3 train |
we would really like to test this in 1.2, otherwise the whole optimistic conf train gets pushed back a month. |
The code churn in here is huge. |
The problem is that optimistic conf basically missed the 1.2 train. It's a feature that didn't come in by the branch date, or even a day or two later. Ramming in a ton of new code weeks after the branch date isn't a good way to stabilize a release. |
v1.2 label restored. I'm still quite nervous about enabling this in the v1.2 timeframe, but given that this can be landed disabled I'll 🙈 and 🙏 for the best. We can discuss a timeline for actually enabling on v1.2 once testnet upgrades to v1.2 and is running well |
* Add HeaviestSubtreeForkChoice * Make replay stage switch between two fork choice rules Co-authored-by: Carl <carl@solana.com> (cherry picked from commit 2e1d59f) # Conflicts: # core/src/consensus.rs # core/src/replay_stage.rs
* Add HeaviestSubtreeForkChoice * Make replay stage switch between two fork choice rules Co-authored-by: Carl <carl@solana.com>
* Add HeaviestSubtreeForkChoice * Make replay stage switch between two fork choice rules Co-authored-by: Carl <carl@solana.com>
Problem
Old fork selection mechanism was hard to reason about and could cause liveness problems when
interacting with switching proofs: #10343 (comment)
Summary of Changes
fork_weight_tracker.rs
to keep track of the best subtreereplay_stage.rs
andconsensus.rs
Fixes #