From 513b74f6d41c5854619b92be88ebd62480c5b8cf Mon Sep 17 00:00:00 2001 From: Matilda Clerke Date: Thu, 19 Sep 2024 14:41:36 +1000 Subject: [PATCH] 7311: Move isPeerTaskSystemEnabled to SynchronizerOptions Signed-off-by: Matilda Clerke --- .../java/org/hyperledger/besu/cli/BesuCommand.java | 3 +++ .../besu/cli/options/stable/P2PTLSConfigOptions.java | 10 ---------- .../cli/options/unstable/SynchronizerOptions.java | 11 +++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index ecfc0eaadb..ef3bb6d6f8 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -117,6 +117,7 @@ import org.hyperledger.besu.ethereum.core.MiningParametersMetrics; import org.hyperledger.besu.ethereum.core.PrivacyParameters; import org.hyperledger.besu.ethereum.core.VersionMetadata; import org.hyperledger.besu.ethereum.core.plugins.PluginConfiguration; +import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerTaskFeatureToggle; import org.hyperledger.besu.ethereum.eth.sync.SyncMode; import org.hyperledger.besu.ethereum.eth.sync.SynchronizerConfiguration; import org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration; @@ -1784,6 +1785,8 @@ public class BesuCommand implements DefaultCommandValues, Runnable { instantiateSignatureAlgorithmFactory(); + PeerTaskFeatureToggle.initialize(unstableSynchronizerOptions.isPeerTaskSystemEnabled()); + logger.info(generateConfigurationOverview()); logger.info("Security Module: {}", securityModuleName); } diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java index a48b177bba..c3f8c56219 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java @@ -20,7 +20,6 @@ import static org.hyperledger.besu.cli.DefaultCommandValues.MANDATORY_FILE_FORMA import org.hyperledger.besu.cli.util.CommandLineUtils; import org.hyperledger.besu.ethereum.api.tls.FileBasedPasswordProvider; -import org.hyperledger.besu.ethereum.eth.manager.peertask.PeerTaskFeatureToggle; import org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.TLSConfiguration; import java.nio.file.Path; @@ -104,13 +103,6 @@ public class P2PTLSConfigOptions { "Whether to send a SNI header in the TLS ClientHello message (default: ${DEFAULT-VALUE})") private final Boolean p2pTlsClientHelloSniHeaderEnabled = false; - @Option( - names = {"--Xpeertask-system-enabled"}, - hidden = true, - description = - "Temporary feature toggle to enable using the new peertask system (default: ${DEFAULT-VALUE})") - private final Boolean isPeerTaskSystemEnabled = false; - /** Default constructor. */ P2PTLSConfigOptions() {} @@ -136,8 +128,6 @@ public class P2PTLSConfigOptions { "File containing password to unlock keystore is required when p2p TLS is enabled"); } - PeerTaskFeatureToggle.initialize(isPeerTaskSystemEnabled); - return Optional.of( TLSConfiguration.Builder.tlsConfiguration() .withKeyStoreType(p2pTLSKeyStoreType) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java index 95bbe0a2b1..6d293be8d0 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.java @@ -314,6 +314,13 @@ public class SynchronizerOptions implements CLIOptions