Store and compute node/stake state in EpochStakes struct#8958
Store and compute node/stake state in EpochStakes struct#8958carllin merged 7 commits intosolana-labs:masterfrom
Conversation
|
😢 we'll need to halt and restart devnet, tds, and mainnet-beta with a snapshot rewrite. I'll look more closely at this PR tomorrow @carllin |
Ugh, I know hehe. I debated stashing this info elsewhere but it started getting really ugly/hacky, so I bit the bullet. |
afd3865 to
d68b0f4
Compare
| .get_authorized_voter(leader_schedule_epoch) | ||
| .expect("Authorized voter for current epoch must be known"); | ||
|
|
||
| node_id_to_vote_accounts |
There was a problem hiding this comment.
@aeyakovenko, fyi, the mapping from the node_id used in gossip to the set of vote_account's is fixed here at leader_schedule_epoch boundaries (Aka the mappinig for epoch n+2 is fixed halfway through epoch n). Hopefully that should be ok
51ec328 to
c1cfad7
Compare
mvines
left a comment
There was a problem hiding this comment.
I'd like to find a way to roll this out without having to hard fork mainnet-beta
+1, these kinds of things are just kind of a cache/wrapper over some account state, we need to figure out how to handle that sooner than later I think. |
|
@aeyakovenko, because the EpochStakes for the current epoch are saved off from the |
| pub const TAR_VERSION_FILE: &str = "version"; | ||
|
|
||
| pub const SNAPSHOT_VERSION: &str = "1.0.0"; | ||
| pub const SNAPSHOT_VERSION: &str = "1.1.0"; |
85601a5 to
e343480
Compare
Codecov Report
@@ Coverage Diff @@
## master #8958 +/- ##
========================================
- Coverage 80.4% 80.3% -0.1%
========================================
Files 267 268 +1
Lines 58543 58684 +141
========================================
+ Hits 47073 47174 +101
- Misses 11470 11510 +40 |
Problem
Stakeson every new bank, potentially expensiveSummary of Changes
EpochStakesinArc's to prevent expensive clones on each Bank, only needs to be recomputed when crossingleader_schedule_epochboundariesNote @mvines this breaks the ABI (serializing/deserializing the bank), I've add this to track here: https://github.com/solana-labs/solana/projects/45
Fixes #