Add create_v4_account_with_authorized and actually populate bls_pubkey_to_rank_map in EpochStakes.#8103
Conversation
…y_to_rank_map in EpochStakes.
|
The Firedancer team maintains a line-for-line reimplementation of the |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8103 +/- ##
========================================
Coverage 82.9% 82.9%
========================================
Files 823 823
Lines 360972 361121 +149
========================================
+ Hits 299404 299672 +268
+ Misses 61568 61449 -119 🚀 New features to boost your workflow:
|
buffalojoec
left a comment
There was a problem hiding this comment.
Sure, works for me if this is an unblocker.
| let vote_state = VoteStateV4 { | ||
| node_pubkey: *node_pubkey, | ||
| authorized_voters: AuthorizedVoters::new(0, *authorized_voter), | ||
| authorized_withdrawer: *authorized_withdrawer, | ||
| bls_pubkey_compressed, | ||
| inflation_rewards_commission_bps, | ||
| ..VoteStateV4::default() | ||
| }; |
There was a problem hiding this comment.
Since we don't have VoteStateV4::new yet, this might be useful as a standalone helper.
There was a problem hiding this comment.
You mean add a helper in this file? okay I've done that, is this what you want?
Since we don't have most of votor upstreamed yet, the former is more important than latter.
Of course, if there is a better API to create v4 vote accounts later, we can totally switch to that. But could we maybe submit this for now to unblock upstreaming Alpenglow?
To illustrate how we use v4 vote accounts in tests, I've also ported rest of bls_pubkey_to_rank_map in
EpochStakes and ported associated tests.