Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

move fork-able, checkpoint-able state into BankState #1773

Closed
wants to merge 1 commit into from

Conversation

rob-solana
Copy link
Contributor

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 #

@rob-solana rob-solana added work in progress This isn't quite right yet noCI Suppress CI on this Pull Request labels Nov 12, 2018

/// FIFO queue of `last_id` items
last_ids: RwLock<LastIds>,
checkpoints: RwLock<HashMap<Hash, BankState>>,
Copy link
Contributor Author

@rob-solana rob-solana Nov 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the interesting part (along with heads), but has turned into a huge mess, where everything's now implemented by BankState...

@rob-solana rob-solana requested review from garious, aeyakovenko and carllin and removed request for garious and aeyakovenko November 12, 2018 00:19
@@ -33,6 +33,9 @@ pub type EntryReceiver = Receiver<Vec<Entry>>;

#[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,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would also have to be added to PohEntry

transactions: txs,
};
self.bank.register_entry(&entry.id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@rob-solana
Copy link
Contributor Author

cc #1783, which is more incremental approach

@carllin
Copy link
Contributor

carllin commented Nov 12, 2018

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.

@aeyakovenko
Copy link
Member

@rob-solana can we move the "execute/process" part of the bank out into a separate file?

@rob-solana
Copy link
Contributor Author

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

@rob-solana rob-solana closed this Nov 19, 2018
@rob-solana rob-solana deleted the bank.fork.proto branch November 19, 2018 19:30
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
…olana-labs#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] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
steviez added a commit to steviez/solana that referenced this pull request Jun 18, 2024
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
steviez added a commit to steviez/solana that referenced this pull request Oct 11, 2024
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.
steviez added a commit to steviez/solana that referenced this pull request Oct 13, 2024
…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.
Szymongib pushed a commit to ChorusOne/solana that referenced this pull request Oct 28, 2024
…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 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
noCI Suppress CI on this Pull Request work in progress This isn't quite right yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants