From 41a2c0ff101338e08be07f204109106143c05bed Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Mon, 10 Jun 2024 23:12:38 +0900 Subject: [PATCH 1/2] Enable unified scheduler for block verification --- core/src/validator.rs | 2 +- ledger-tool/src/main.rs | 2 -- unified-scheduler-pool/src/lib.rs | 5 ----- validator/src/cli.rs | 2 -- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 889a3a6c467d63..8a58e3ff07eb73 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -150,8 +150,8 @@ const WAIT_FOR_WEN_RESTART_SUPERMAJORITY_THRESHOLD_PERCENT: u64 = #[derive(Clone, EnumString, EnumVariantNames, Default, IntoStaticStr, Display)] #[strum(serialize_all = "kebab-case")] pub enum BlockVerificationMethod { - #[default] BlockstoreProcessor, + #[default] UnifiedScheduler, } diff --git a/ledger-tool/src/main.rs b/ledger-tool/src/main.rs index 02b29602c8ab7b..8339c0a14d07ff 100644 --- a/ledger-tool/src/main.rs +++ b/ledger-tool/src/main.rs @@ -720,7 +720,6 @@ fn main() { .takes_value(true) .possible_values(BlockVerificationMethod::cli_names()) .global(true) - .hidden(hidden_unless_forced()) .help(BlockVerificationMethod::cli_message()), ) .arg( @@ -730,7 +729,6 @@ fn main() { .takes_value(true) .validator(|s| is_within_range(s, 1..)) .global(true) - .hidden(hidden_unless_forced()) .help(DefaultSchedulerPool::cli_message()), ) .arg( diff --git a/unified-scheduler-pool/src/lib.rs b/unified-scheduler-pool/src/lib.rs index 1ea470aade791e..c10e358c578830 100644 --- a/unified-scheduler-pool/src/lib.rs +++ b/unified-scheduler-pool/src/lib.rs @@ -1,8 +1,3 @@ -//! NOTE: While the unified scheduler is fully functional and moderately performant even with -//! mainnet-beta, it has known resource-exhaustion related security issues for replaying -//! specially-crafted blocks produced by malicious leaders. Thus, this experimental and -//! nondefault functionality is exempt from the bug bounty program for now. -//! //! Transaction scheduling code. //! //! This crate implements 3 solana-runtime traits (`InstalledScheduler`, `UninstalledScheduler` and diff --git a/validator/src/cli.rs b/validator/src/cli.rs index 978d650a2ef1de..dc1b783eba8298 100644 --- a/validator/src/cli.rs +++ b/validator/src/cli.rs @@ -1522,7 +1522,6 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .arg( Arg::with_name("block_verification_method") .long("block-verification-method") - .hidden(hidden_unless_forced()) .value_name("METHOD") .takes_value(true) .possible_values(BlockVerificationMethod::cli_names()) @@ -1539,7 +1538,6 @@ pub fn app<'a>(version: &'a str, default_args: &'a DefaultArgs) -> App<'a, 'a> { .arg( Arg::with_name("unified_scheduler_handler_threads") .long("unified-scheduler-handler-threads") - .hidden(hidden_unless_forced()) .value_name("COUNT") .takes_value(true) .validator(|s| is_within_range(s, 1..)) From 32fdc3561d5cf90d1cb48928d7809918aecaabe8 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Wed, 26 Jun 2024 09:48:40 +0900 Subject: [PATCH 2/2] Revert making unified scheduler enabled by default --- core/src/validator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/validator.rs b/core/src/validator.rs index 8a58e3ff07eb73..889a3a6c467d63 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -150,8 +150,8 @@ const WAIT_FOR_WEN_RESTART_SUPERMAJORITY_THRESHOLD_PERCENT: u64 = #[derive(Clone, EnumString, EnumVariantNames, Default, IntoStaticStr, Display)] #[strum(serialize_all = "kebab-case")] pub enum BlockVerificationMethod { - BlockstoreProcessor, #[default] + BlockstoreProcessor, UnifiedScheduler, }