-
Notifications
You must be signed in to change notification settings - Fork 274
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
Apply cleanups to solana-core for unified scheduler #4123
Changes from all commits
05a970f
91b2377
2d7807f
a1bc4b9
5b1b19b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "agave-banking-stage-ingress-types" | ||
description = "Agave banking stage ingress types" | ||
documentation = "https://docs.rs/agave-banking-stage-ingress-types" | ||
version = { workspace = true } | ||
authors = { workspace = true } | ||
repository = { workspace = true } | ||
homepage = { workspace = true } | ||
license = { workspace = true } | ||
edition = { workspace = true } | ||
|
||
[dependencies] | ||
crossbeam-channel = { workspace = true } | ||
solana-perf = { workspace = true } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
use {crossbeam_channel::Receiver, solana_perf::packet::PacketBatch, std::sync::Arc}; | ||
|
||
pub type BankingPacketBatch = Arc<Vec<PacketBatch>>; | ||
pub type BankingPacketReceiver = Receiver<BankingPacketBatch>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
//! to construct a software pipeline. The stage uses all available CPU cores and | ||
//! can do its processing in parallel with signature verification on the GPU. | ||
|
||
#[cfg(feature = "dev-context-only-utils")] | ||
use qualifier_attr::qualifiers; | ||
use { | ||
self::{ | ||
committer::Committer, | ||
|
@@ -23,9 +25,9 @@ use { | |
scheduler_controller::SchedulerController, scheduler_error::SchedulerError, | ||
}, | ||
}, | ||
banking_trace::BankingPacketReceiver, | ||
validator::BlockProductionMethod, | ||
}, | ||
agave_banking_stage_ingress_types::BankingPacketReceiver, | ||
crossbeam_channel::{unbounded, Receiver, RecvTimeoutError, Sender}, | ||
histogram::Histogram, | ||
solana_client::connection_cache::ConnectionCache, | ||
|
@@ -35,7 +37,7 @@ use { | |
solana_perf::{data_budget::DataBudget, packet::PACKETS_PER_BATCH}, | ||
solana_poh::poh_recorder::{PohRecorder, TransactionRecorder}, | ||
solana_runtime::{ | ||
bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache, | ||
bank::Bank, bank_forks::BankForks, prioritization_fee_cache::PrioritizationFeeCache, | ||
vote_sender_types::ReplayVoteSender, | ||
}, | ||
solana_sdk::{pubkey::Pubkey, timing::AtomicInterval}, | ||
|
@@ -716,11 +718,26 @@ impl BankingStage { | |
} | ||
} | ||
|
||
#[cfg_attr(feature = "dev-context-only-utils", qualifiers(pub))] | ||
pub(crate) fn update_bank_forks_and_poh_recorder_for_new_tpu_bank( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. refer to https://github.com/anza-xyz/agave/pull/3946/files#r1886311350 (or #3946 (comment)) for justification of this change. |
||
bank_forks: &RwLock<BankForks>, | ||
poh_recorder: &RwLock<PohRecorder>, | ||
tpu_bank: Bank, | ||
track_transaction_indexes: bool, | ||
) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not returning |
||
let tpu_bank = bank_forks.write().unwrap().insert(tpu_bank); | ||
poh_recorder | ||
.write() | ||
.unwrap() | ||
.set_bank(tpu_bank, track_transaction_indexes); | ||
} | ||
|
||
#[cfg(test)] | ||
mod tests { | ||
use { | ||
super::*, | ||
crate::banking_trace::{BankingPacketBatch, BankingTracer, Channels}, | ||
crate::banking_trace::{BankingTracer, Channels}, | ||
agave_banking_stage_ingress_types::BankingPacketBatch, | ||
crossbeam_channel::{unbounded, Receiver}, | ||
itertools::Itertools, | ||
solana_entry::entry::{self, Entry, EntrySlice}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are basically internal types (at least for now); I'm not sure we should publish this crate, wdyt?
i.e. add
publish = false
hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe its' fine since it would make it easier for someone to write their own banking stage replacement (good)