move fork-able, checkpoint-able state into BankState#1773
move fork-able, checkpoint-able state into BankState#1773rob-solana wants to merge 1 commit intosolana-labs:masterfrom
Conversation
|
|
||
| /// FIFO queue of `last_id` items | ||
| last_ids: RwLock<LastIds>, | ||
| checkpoints: RwLock<HashMap<Hash, BankState>>, |
There was a problem hiding this comment.
this is the interesting part (along with heads), but has turned into a huge mess, where everything's now implemented by BankState...
| #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] | ||
| pub struct Entry { | ||
| /// The SHA-256 hash we started from, i.e. the previous Entry ID. | ||
| pub start_hash: Hash, |
There was a problem hiding this comment.
this would also have to be added to PohEntry
| id: entry.id, | ||
| transactions: txs, | ||
| }; | ||
| self.bank.register_entry(&entry.id); |
There was a problem hiding this comment.
note that I'm keeping track of the last Poh ID in the Bank for all Entries, so that I can chain whatever comes out of the Window
|
cc #1783, which is more incremental approach |
|
It might be a good idea to get the design down in writing and then have a design meeting about this, as it's getting quite complicated. It will also affect other's work, like @pgarg66 and @sagar-solana, so it would be a good to keep everyone on the same page. |
|
@rob-solana can we move the "execute/process" part of the bank out into a separate file? |
|
this change is outdated after most recent discussion on implementation, which makes keeping multiple forks live the problem of the window/ledger/rocksdb blob manager yes: there could be a bank_engine or bank_runtime or something, but it's not necessary right now except perhaps for cleanliness |
…nza-xyz#1773) Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 9.1.1 to 10.0.0. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Commits](TypeStrong/ts-node@v9.1.1...v10.0.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
There are several arguments to control snapshot configuration in the various ledger-tool commands. The inclusion of args in each command is inconsistent, especially for commands outside of main.rs This change consolidates the snapshot related arguments into a single function to help create consistency and reduce duplicate code
The arguments to specify full and incremental snapshot archives paths used to be a global argument; these were moved to only be instantiated on commands that needed them in solana-labs#1773. But, when the arguments were moved from app-level to subcommand-level, the code that matches the arguments was not updated to look at subcommand-matches instead of app-matches.
…olana-labs#3148) The arguments to specify full and incremental snapshot archives paths used to be a global argument; these were moved to only be instantiated on commands that needed them in solana-labs#1773. But, when the arguments were moved from app-level to subcommand-level, the code that matches the arguments was not updated to look at subcommand-matches instead of app-matches.
…tory (backport of solana-labs#3148) (solana-labs#3153) ledger-tool: Fix create-snapshot default value for output_directory (solana-labs#3148) The arguments to specify full and incremental snapshot archives paths used to be a global argument; these were moved to only be instantiated on commands that needed them in solana-labs#1773. But, when the arguments were moved from app-level to subcommand-level, the code that matches the arguments was not updated to look at subcommand-matches instead of app-matches. (cherry picked from commit 1d9947c) Co-authored-by: steviez <steven@anza.xyz>
Problem
a slice of Entries arriving from the window stage can start at an arbitrary
Entry, current single-linked list of state checkpoints Bank can't deal
with that
Summary of Changes
introduce an inner "BankState", to allow Bank to have multiple "heads" along with a HashMap of read-only checkpoints that are parents of those heads
Fixes #