-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add support for multiple forks to the bank #2689
Conversation
yoink of #2640 |
a757bd2
to
e822d6c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2689 +/- ##
========================================
Coverage ? 74.3%
========================================
Files ? 117
Lines ? 18791
Branches ? 0
========================================
Hits ? 13980
Misses ? 4811
Partials ? 0 |
What's the point of Bank after this PR? Why not delete the existing Bank and call the new thing Bank? And all these unit-tests that have been updated to bank.active_fork(), how about passing them the thing that's currently called BankFork? |
I will explore that approach, thanks. |
81e3ac2
to
c825e7f
Compare
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.
I marked this approved while it was still WIPed. Not sure how to remove that, so marking it as Request Changes.
11883e2
to
709cc0a
Compare
fmt rebase forkup fixing build all leave the last block open more tests rebase fix replay test fix rollback depth parameter cleanup better replay stage s/finalized/frozen for bank_checkpoints that are no longer able to write transactions or ticks remove println disconnect blob sender so that TVU isn't replyaing onto TPU's fork finalize()->freeze(), code review comments rebased fix window_send_test remove entries_to_blocks() guard against too many ticks in a slot limiting ticks, take #2 more info fix test_replay_stage_poh_error_entry_receiver fix leader_scheduler::test_update_height s/bank_state/bank_fork/g s/bank_checkpoint/bank_delta/g fix up stragglers from rename get it building again. num_ticks_left_in_slot() should not assume slot from tick_height fixups ignore leader rotation tests until ledger is turned around renames, compile fixes simplify PohService, initialize and freeze TPU bank, skip TPU slot in TVU compiling again replay_stage cleanup move banking_stage done back to banking_stage use closure in test, too cleanup poh_service, freeze() TPU's slot from banking_stage()
5ab02d8
to
775b3b4
Compare
the bank after this PR holds Forks and pubsub still to do: replace process_ledger() with another startup function that populates the bank with the correct forks |
Time to remove noCI? |
@garious not yet, still some failing multinode tests that need the "to do" implemented from Rob's comment. |
Should we just remove process_ledger, can replay_stage just handle starting from 0 and run through the bank that way? |
@sakridge, I believe @rob-solana proposed something similar, one of the chief issues being ignoring/not sending leader rotation signals from replay stage while processing the ledger. |
@carllin Yea, there's the voting, sending leader rotation, also the whole bit about ignoring the ledger when you are the leader. Would have to figure out how to handle that stuff. |
Passed back to #2782 |
* make shrink use in-mem idx info * fix cli arg typo * remove has_written_abnormal_entry_to_disk_flag. * pr reviews: local counter * remove the field that hold index entry in memory for shrinking * clippy * default test/bench config to use onlyabnormalwithverify scan option * remove comments * share shrink account populate code --------- Co-authored-by: HaoranYi <[email protected]>
* make shrink use in-mem idx info * fix cli arg typo * remove has_written_abnormal_entry_to_disk_flag. * pr reviews: local counter * remove the field that hold index entry in memory for shrinking * clippy * default test/bench config to use onlyabnormalwithverify scan option * remove comments * share shrink account populate code --------- Co-authored-by: HaoranYi <[email protected]>
Problem
Validators may receive different, valid blobs targeting the same slot height. Those blobs represent forks in the ledger and are stored as forks in the data structure Blocktree. Likewise, the slot leader may want to build entries on its own fork so that it can roll back if later it decides there's a better fork to vote on. In either case, the current Bank does not support forks in the ledger (aka, interpreting Blocktree). It doesn't offer a way to checkpoint its state or refer back to previous checkpoints to implement its methods.
Summary of Changes
live
androot
BankState is reachable from the bankWhat is not done (at the time of this writing):
last_id
for a client should probably come fromroot
, but for a vote needs to come from the live branch that is being voted on.Fixes #2555
Fixes #2210