Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions core/src/tpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use {
sigverify::TransactionSigVerifier,
sigverify_stage::SigVerifyStage,
staked_nodes_updater_service::StakedNodesUpdaterService,
validator::GeneratorConfig,
},
crossbeam_channel::{unbounded, Receiver},
solana_client::connection_cache::{ConnectionCache, Protocol},
Expand Down Expand Up @@ -106,6 +107,7 @@ impl Tpu {
tracer_thread_hdl: TracerThread,
tpu_enable_udp: bool,
prioritization_fee_cache: &Arc<PrioritizationFeeCache>,
_generator_config: Option<GeneratorConfig>, /* vestigial code for replay invalidator */
) -> Self {
let TpuSockets {
transactions: transactions_sockets,
Expand Down
10 changes: 10 additions & 0 deletions core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ impl BlockProductionMethod {
}
}

/// Configuration for the block generator invalidator for replay.
#[derive(Clone, Debug)]
pub struct GeneratorConfig {
pub accounts_path: String,
pub starting_keypairs: Arc<Vec<Keypair>>,
}

pub struct ValidatorConfig {
pub halt_at_slot: Option<Slot>,
pub expected_genesis_hash: Option<Hash>,
Expand Down Expand Up @@ -240,6 +247,7 @@ pub struct ValidatorConfig {
pub banking_trace_dir_byte_limit: banking_trace::DirByteLimit,
pub block_verification_method: BlockVerificationMethod,
pub block_production_method: BlockProductionMethod,
pub generator_config: Option<GeneratorConfig>,
}

impl Default for ValidatorConfig {
Expand Down Expand Up @@ -306,6 +314,7 @@ impl Default for ValidatorConfig {
banking_trace_dir_byte_limit: 0,
block_verification_method: BlockVerificationMethod::default(),
block_production_method: BlockProductionMethod::default(),
generator_config: None,
}
}
}
Expand Down Expand Up @@ -1184,6 +1193,7 @@ impl Validator {
tracer_thread,
tpu_enable_udp,
&prioritization_fee_cache,
config.generator_config.clone(),
);

datapoint_info!(
Expand Down
1 change: 1 addition & 0 deletions local-cluster/src/validator_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub fn safe_clone_config(config: &ValidatorConfig) -> ValidatorConfig {
banking_trace_dir_byte_limit: config.banking_trace_dir_byte_limit,
block_verification_method: config.block_verification_method.clone(),
block_production_method: config.block_production_method.clone(),
generator_config: config.generator_config.clone(),
}
}

Expand Down