-
Notifications
You must be signed in to change notification settings - Fork 659
replay: refactor set-root to enable alpenglow to take over #7452
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
base: master
Are you sure you want to change the base?
Conversation
aa3e0aa
to
b001c53
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7452 +/- ##
=========================================
- Coverage 83.2% 83.2% -0.1%
=========================================
Files 800 801 +1
Lines 362783 362869 +86
=========================================
+ Hits 302195 302239 +44
- Misses 60588 60630 +42 🚀 New features to boost your workflow:
|
.read() | ||
.unwrap() | ||
.highest_super_majority_root(), | ||
); | ||
Self::check_and_handle_new_root( |
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.
Out of paranoia, I inlined all of this and plugged into a diff checker. Code looks identical except for the following:
- We pass in
parent_slot
instead ofvote_bank
<-- seems like a good change - We pass in
highest_super_majority_root
instead ofblock_commitment_cache
<-- again, seems good - Reverting to positional formatting of arguments for
err
<-- I think we should go back to string capture style - Printing out
pubkey
when setting root <-- we passpubkey
through a couple API layers just for this.. is it worth it?
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.
Reverted 3 189593b
As for 4, it makes debugging local-cluster tests easier. Perhaps a bit overboard but in alpenglow i've made every log print pubkey so that we can see what's going on.
If you prefer it removed I can keep a log w/ pubkey in event_handler when we call set root instead.
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.
It feels weird tunneling down through a couple API layers just for local cluster test, but I agree it's soooo valuable to have for understanding those tests. I'm fine with it
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.
agreed, would be nice if we could have some log magic to tag on pubkey in local cluster haha
I was out today and saw @bw-solana already approved - can you give me the chance to review tomorrow (Tue) before merging |
Problem
In alpenglow, replay will no longer be the thread setting root. To prepare for this we refactor the set root to the votor crate.
Summary of Changes
This pulls in the votor crate from the Alpenglow repo but only for the
root_utils
file. The full upstreaming of this crate will take place after VoteStateV4 has landed in sdk master (bunch of dependencies to resolve that need this 😅 ).The callgraph is
This extra
callback
will take care of rooting the TowerBFT specific structures to maintain compatibility. In the future Alpenglow will call the root_utils function without the callback