Skip to content

Commit

Permalink
BlockProductionMethod::CentralScheduler as default (#34891)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Jan 24, 2024
1 parent bbd1fd4 commit 62e7ebd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Release channels have their own copy of this changelog:
* The default for `--use-snapshot-archives-at-startup` is now `when-newest` (#33883)
* The default for `solana-ledger-tool`, however, remains `always` (#34228)
* Added `central-scheduler` option for `--block-production-method` (#33890)
* `central-scheduler` as default option for `--block-production-method` (#34891)
* Updated to Borsh v1
* Added allow_commission_decrease_at_any_time feature which will allow commission on a vote account to be
decreased even in the second half of epochs when the commission_updates_only_allowed_in_first_half_of_epoch
Expand Down
2 changes: 1 addition & 1 deletion core/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ impl BlockVerificationMethod {
#[derive(Clone, EnumString, EnumVariantNames, Default, IntoStaticStr, Display)]
#[strum(serialize_all = "kebab-case")]
pub enum BlockProductionMethod {
#[default]
ThreadLocalMultiIterator,
#[default]
CentralScheduler,
}

Expand Down
14 changes: 11 additions & 3 deletions local-cluster/tests/local_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use {
},
optimistic_confirmation_verifier::OptimisticConfirmationVerifier,
replay_stage::DUPLICATE_THRESHOLD,
validator::{BlockVerificationMethod, ValidatorConfig},
validator::{BlockProductionMethod, BlockVerificationMethod, ValidatorConfig},
},
solana_download_utils::download_snapshot_archive,
solana_entry::entry::create_ticks,
Expand Down Expand Up @@ -349,11 +349,16 @@ fn test_forwarding() {
solana_logger::setup_with_default(RUST_LOG_FILTER);
// Set up a cluster where one node is never the leader, so all txs sent to this node
// will be have to be forwarded in order to be confirmed
// Only ThreadLocalMultiIterator banking stage forwards transactions,
// so must use that block-production-method.
let mut config = ClusterConfig {
node_stakes: vec![DEFAULT_NODE_STAKE * 100, DEFAULT_NODE_STAKE],
cluster_lamports: DEFAULT_CLUSTER_LAMPORTS + DEFAULT_NODE_STAKE * 100,
validator_configs: make_identical_validator_configs(
&ValidatorConfig::default_for_test(),
&ValidatorConfig {
block_production_method: BlockProductionMethod::ThreadLocalMultiIterator,
..ValidatorConfig::default_for_test()
},
2,
),
..ClusterConfig::default()
Expand Down Expand Up @@ -4257,7 +4262,10 @@ fn test_leader_failure_4() {
solana_logger::setup_with_default(RUST_LOG_FILTER);
error!("test_leader_failure_4");
let num_nodes = 4;
let validator_config = ValidatorConfig::default_for_test();
let validator_config = ValidatorConfig {
block_production_method: BlockProductionMethod::ThreadLocalMultiIterator,
..ValidatorConfig::default_for_test()
};
let mut config = ClusterConfig {
cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,
node_stakes: vec![DEFAULT_NODE_STAKE; 4],
Expand Down

0 comments on commit 62e7ebd

Please sign in to comment.