7311: Move isPeerTaskSystemEnabled to SynchronizerOptions

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
pull/7633/head
Matilda Clerke 2 months ago
parent e3fbc6ca48
commit 513b74f6d4
  1. 3
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  2. 10
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java
  3. 11
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/SynchronizerOptions.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);
}

@ -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)

@ -314,6 +314,13 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
description = "Snap sync enabled for BFT chains (default: ${DEFAULT-VALUE})")
private Boolean snapsyncBftEnabled = SnapSyncConfiguration.DEFAULT_SNAP_SYNC_BFT_ENABLED;
@CommandLine.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;
private SynchronizerOptions() {}
/**
@ -334,6 +341,10 @@ public class SynchronizerOptions implements CLIOptions<SynchronizerConfiguration
return snapsyncBftEnabled;
}
public boolean isPeerTaskSystemEnabled() {
return isPeerTaskSystemEnabled;
}
/**
* Create synchronizer options.
*

Loading…
Cancel
Save