Start saving/loading prior_roots(_with_hash) to snapshot#23844
Start saving/loading prior_roots(_with_hash) to snapshot#23844jeffwashington merged 4 commits intosolana-labs:masterfrom
Conversation
fdd065b to
6f812a3
Compare
|
This should handle what @carllin needs. What @brooksprumo needs is already merged in master. This handles what I need for eliminating rewrites. |
|
@AshwinSekar Tagging you to make sure you're in the loop. I think you've already seen this PR, but here it is, if not! |
brooksprumo
left a comment
There was a problem hiding this comment.
Looks good to me. I'd feel best to make sure @mvines takes a look too.
| /* | ||
| todo in future pr: | ||
| deserialize prior_roots and prior_roots_with_hash | ||
| example: | ||
| { | ||
| let mut writer = accounts_db.accounts_index.roots_tracker.write().unwrap(); | ||
| for x in snapshot_prior_roots { | ||
| writer.roots_original.insert(x); | ||
| } | ||
| } | ||
| */ |
There was a problem hiding this comment.
nit: Maybe this is just me, but I'd prefer if this were removed. Not a strong conviction though.
There was a problem hiding this comment.
I'm a fan of removing as well. Issues can be used to track the details of future PRs better than littering in the code
| /* | ||
| todo in future pr: | ||
| deserialize prior_roots and prior_roots_with_hash | ||
| example: | ||
| { | ||
| let mut writer = accounts_db.accounts_index.roots_tracker.write().unwrap(); | ||
| for x in snapshot_prior_roots { | ||
| writer.roots_original.insert(x); | ||
| } | ||
| } | ||
| */ |
There was a problem hiding this comment.
I'm a fan of removing as well. Issues can be used to track the details of future PRs better than littering in the code
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Michael Vines <mvines@gmail.com>
Pull request has been modified.
* Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a)
…ut does load them. Original: Start saving/loading prior_roots(_with_hash) to snapshot (#23844) * Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a)
…ut does load them. Original: Start saving/loading prior_roots(_with_hash) to snapshot (#23844) * Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a)
…ut does load them. (#24074) Original: Start saving/loading prior_roots(_with_hash) to snapshot (#23844) * Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a) Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
…ut does load them. (#24074) Original: Start saving/loading prior_roots(_with_hash) to snapshot (#23844) * Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a) Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com> (cherry picked from commit b157a91)
…ut does load them. (#24074) (#24078) Original: Start saving/loading prior_roots(_with_hash) to snapshot (#23844) * Start saving/loading prior_roots(_with_hash) to snapshot * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * Update runtime/src/accounts_index.rs Co-authored-by: Michael Vines <mvines@gmail.com> * update comment Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 396b49a) Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com> (cherry picked from commit b157a91) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Problem
previous work: #23331
The idea is this is a non-breaking change to the snapshot file format. New fields are added to the end on save. The fields are loaded as empty on default by everyone atm.
https://discord.com/channels/428295358100013066/950515661862498354/955897214683734048
Summary of Changes
Fixes #