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

rebased #2640 #2667

Closed
wants to merge 15 commits into from
Closed

rebased #2640 #2667

wants to merge 15 commits into from

Conversation

rob-solana
Copy link
Contributor

Problem

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

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

@rob-solana rob-solana added the noCI Suppress CI on this Pull Request label Feb 5, 2019
@rob-solana rob-solana closed this Feb 5, 2019
@rob-solana rob-solana deleted the checkpoints_4 branch February 5, 2019 19:27
alessandrod pushed a commit to alessandrod/solana that referenced this pull request Aug 20, 2024
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