Skip to content
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

Need a way to track root and live bank state in the system and handle rollback. #2677

Closed

Conversation

rob-solana
Copy link
Contributor

Summary of Changes

  • bank split into BankCheckpoint and BankState that composes the checkpoints
  • live and root BankState is reachable from the bank
  • made the RpcSubscriptions explicit. Trait objects are really not great in rust. They require a dynamic allocation, the compiler implements them as dynamic dispatch, and they cannot really compose the traits up through the Box, so you end up passing a bunch of trait level descriptions through every api that uses them.
  • Checkpoints module that implements a dag to keep track of the checkpoints
  • Forks that merges and purges the live chain as it moves along

What is not done:

  • refactoring the system to not use a global bank. I think in a lot places, the expected BankState instance should be passed in as a function parameter. Instead of using a bank instance to reach for the live or root fork. The problem that there are some things that should be computed from the root, and others from the live fork. last_id for a client should probably come from root, but for a vote needs to come from the live branch that is being voted on.

Fixes #2555

leave the last block open
replay test fix
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
fix window_send_test
remove entries_to_blocks()
guard against too many ticks in a slot
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
@rob-solana rob-solana self-assigned this Feb 6, 2019
@rob-solana rob-solana closed this Feb 7, 2019
@rob-solana
Copy link
Contributor Author

something lost in squash

@rob-solana rob-solana deleted the checkouts_4_squashed branch February 7, 2019 00:12
@rob-solana rob-solana added the noCI Suppress CI on this Pull Request label Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
noCI Suppress CI on this Pull Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants