-
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
Blocktree now only loads complete blocks (err, slots) #2928
Conversation
where's the proposal to change last_id to a block's last_id? |
b9e8ad2
to
9015e0e
Compare
@mvines, why do we want to delete a partial slot, rather than just stopping processing at the end of the previous slot and letting replay stage detect the forks? |
I’d love to not delete anything. Hmmm, yeah I think you’re probably right. If startup processing just stops at the last fully completed slot, replay stage should be able to read the partial last slot and pick up from there. I’ll give that a shot |
this change will eliminate a couple of parameters to replay_stage startup, but is the main goal simplification of TPU startup? |
Main goal is to make most of the code base stop caring about last_entry_id, which definitely includes both TPU and TVU startup. |
Codecov Report
@@ Coverage Diff @@
## master #2928 +/- ##
========================================
+ Coverage 76.7% 76.8% +<.1%
========================================
Files 130 130
Lines 19993 20039 +46
========================================
+ Hits 15352 15403 +51
+ Misses 4641 4636 -5 |
bad18e5
to
04fb5f5
Compare
7ebe218
to
7758fc4
Compare
a TPU will slash itself if restarted during its slot, I think? |
We might want to add some logic later where if a node that tries to restart as slot leader skips it's slot entirely and lets the cluster move to the next leader (well once we can do that!) |
Loading a Blocktree at node startup is tedious because the code needs to care about a
last_entry_id
, as the ledger may halt at any entry. But once the node is running it never needs to care about alast_entry_id
again as rotation always occurs on a last_id boundary (eg,bank.last_id()
).By restricting Blocktree to only load complete blocks, we can remove the usage of
last_entry_id
from all ledger processing at fullnode startupNote that at present the same effect could have been accomplished by halting ledger loading at the last tick of a partially filled block. However this approach would break when we move from a tick-based last_ids to a block-based last_ids.
TODO: