Merge branch 'refs/heads/7311-add-cli-feature-toggle-for-peertask-system' into 7311-add-GetReceiptsFromPeerTask

pull/7638/head
Matilda Clerke 2 months ago
commit a9f6714d38
  1. 8
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  2. 10
      besu/src/main/java/org/hyperledger/besu/cli/options/stable/P2PTLSConfigOptions.java

@ -843,12 +843,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
description = "Specifies the number of last blocks to cache (default: ${DEFAULT-VALUE})")
private final Integer numberOfblocksToCache = 0;
@Option(
names = {"--Xpeertask-system-enabled"},
description =
"Temporary feature toggle to enable using the new peertask system (default: ${DEFAULT-VALUE})")
private final Boolean isPeerTaskSystemEnabled = false;
@Mixin private P2PTLSConfigOptions p2pTLSConfigOptions;
// Plugins Configuration Option Group
@ -1791,8 +1785,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
instantiateSignatureAlgorithmFactory();
PeerTaskFeatureToggle.initialize(isPeerTaskSystemEnabled);
logger.info(generateConfigurationOverview());
logger.info("Security Module: {}", securityModuleName);
}

@ -20,6 +20,7 @@ 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;
@ -103,6 +104,13 @@ 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() {}
@ -128,6 +136,8 @@ 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)

Loading…
Cancel
Save