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

v2.0: banking_stage: do not insert legacy vote ixs, refactor & unstaked (backport of #2888) #2901

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,10 @@ impl BankingStage {
let batch_limit =
TOTAL_BUFFERED_PACKETS / ((num_threads - NUM_VOTE_PROCESSING_THREADS) as usize);
// Keeps track of extraneous vote transactions for the vote threads
let latest_unprocessed_votes = Arc::new(LatestUnprocessedVotes::new());
let latest_unprocessed_votes = {
let bank = bank_forks.read().unwrap().working_bank();
Arc::new(LatestUnprocessedVotes::new(&bank))
};

let decision_maker = DecisionMaker::new(cluster_info.id(), poh_recorder.clone());
let committer = Committer::new(
Expand Down Expand Up @@ -512,7 +515,10 @@ impl BankingStage {
// Once an entry has been recorded, its blockhash is registered with the bank.
let data_budget = Arc::new(DataBudget::default());
// Keeps track of extraneous vote transactions for the vote threads
let latest_unprocessed_votes = Arc::new(LatestUnprocessedVotes::new());
let latest_unprocessed_votes = {
let bank = bank_forks.read().unwrap().working_bank();
Arc::new(LatestUnprocessedVotes::new(&bank))
};

let decision_maker = DecisionMaker::new(cluster_info.id(), poh_recorder.clone());
let committer = Committer::new(
Expand Down
3 changes: 3 additions & 0 deletions core/src/banking_stage/forwarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ impl Forwarder {
// load all accounts from address loader;
let current_bank = self.bank_forks.read().unwrap().working_bank();

// if we have crossed an epoch boundary, recache any state
unprocessed_transaction_storage.cache_epoch_boundary_info(&current_bank);

// sanitize and filter packets that are no longer valid (could be too old, a duplicate of something
// already processed), then add to forwarding buffer.
let filter_forwarding_result = unprocessed_transaction_storage
Expand Down
Loading