diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/BesuNode.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/BesuNode.java index 0a0e774073..2df1935f13 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/BesuNode.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/BesuNode.java @@ -99,6 +99,8 @@ public class BesuNode implements NodeConfiguration, RunnableNode, AutoCloseable private final boolean discoveryEnabled; private final List bootnodes = new ArrayList<>(); private final boolean bootnodeEligible; + private final boolean secp256k1Native; + private final boolean altbn128Native; private Optional genesisConfig = Optional.empty(); private NodeRequests nodeRequests; private LoginRequestFactory loginRequestFactory; @@ -125,14 +127,14 @@ public class BesuNode implements NodeConfiguration, RunnableNode, AutoCloseable final boolean discoveryEnabled, final boolean bootnodeEligible, final boolean revertReasonEnabled, + final boolean secp256k1Native, + final boolean altbn128Native, final List plugins, final List extraCLIOptions, final List staticNodes, final Optional privacyParameters, final Optional runCommand) throws IOException { - this.bootnodeEligible = bootnodeEligible; - this.revertReasonEnabled = revertReasonEnabled; this.homeDirectory = dataPath.orElseGet(BesuNode::createTmpDataDirectory); keyfilePath.ifPresent( path -> { @@ -154,6 +156,10 @@ public class BesuNode implements NodeConfiguration, RunnableNode, AutoCloseable this.p2pEnabled = p2pEnabled; this.networkingConfiguration = networkingConfiguration; this.discoveryEnabled = discoveryEnabled; + this.bootnodeEligible = bootnodeEligible; + this.revertReasonEnabled = revertReasonEnabled; + this.secp256k1Native = secp256k1Native; + this.altbn128Native = altbn128Native; this.runCommand = runCommand; plugins.forEach( pluginName -> { @@ -562,6 +568,14 @@ public class BesuNode implements NodeConfiguration, RunnableNode, AutoCloseable return devMode; } + public boolean isSecp256k1Native() { + return secp256k1Native; + } + + public boolean isAltbn128Native() { + return altbn128Native; + } + @Override public boolean isDiscoveryEnabled() { return discoveryEnabled; diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ProcessBesuNodeRunner.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ProcessBesuNodeRunner.java index 3cb49d604e..45aefc7b65 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ProcessBesuNodeRunner.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ProcessBesuNodeRunner.java @@ -228,6 +228,9 @@ public class ProcessBesuNodeRunner implements BesuNodeRunner { params.add("--revert-reason-enabled"); } + params.add("--Xsecp256k1-native-enabled=" + node.isSecp256k1Native()); + params.add("--Xaltbn128-native-enabled=" + node.isAltbn128Native()); + node.getPermissioningConfiguration() .flatMap(PermissioningConfiguration::getLocalConfig) .ifPresent( diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfiguration.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfiguration.java index 881a073fda..6981be1919 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfiguration.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfiguration.java @@ -44,6 +44,8 @@ public class BesuNodeConfiguration { private final boolean discoveryEnabled; private final boolean bootnodeEligible; private final boolean revertReasonEnabled; + private final boolean secp256k1Native; + private final boolean altbn128Native; private final List plugins; private final List extraCLIOptions; private final List staticNodes; @@ -66,6 +68,8 @@ public class BesuNodeConfiguration { final boolean discoveryEnabled, final boolean bootnodeEligible, final boolean revertReasonEnabled, + final boolean secp256k1Native, + final boolean altbn128Native, final List plugins, final List extraCLIOptions, final List staticNodes, @@ -86,6 +90,8 @@ public class BesuNodeConfiguration { this.discoveryEnabled = discoveryEnabled; this.bootnodeEligible = bootnodeEligible; this.revertReasonEnabled = revertReasonEnabled; + this.secp256k1Native = secp256k1Native; + this.altbn128Native = altbn128Native; this.plugins = plugins; this.extraCLIOptions = extraCLIOptions; this.staticNodes = staticNodes; @@ -161,6 +167,14 @@ public class BesuNodeConfiguration { return revertReasonEnabled; } + public boolean isSecp256k1Native() { + return secp256k1Native; + } + + public boolean isAltbn128Native() { + return altbn128Native; + } + public List getStaticNodes() { return staticNodes; } diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfigurationBuilder.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfigurationBuilder.java index 9ebb472b7e..66f7d385f0 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfigurationBuilder.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeConfigurationBuilder.java @@ -55,6 +55,8 @@ public class BesuNodeConfigurationBuilder { private boolean discoveryEnabled = true; private boolean bootnodeEligible = true; private boolean revertReasonEnabled = false; + private boolean secp256K1Native = false; + private boolean altbn128Native = false; private final List plugins = new ArrayList<>(); private final List extraCLIOptions = new ArrayList<>(); private List staticNodes = new ArrayList<>(); @@ -251,6 +253,16 @@ public class BesuNodeConfigurationBuilder { return this; } + public BesuNodeConfigurationBuilder secp256k1Native() { + this.secp256K1Native = true; + return this; + } + + public BesuNodeConfigurationBuilder altbn128() { + this.altbn128Native = true; + return this; + } + public BesuNodeConfigurationBuilder staticNodes(final List staticNodes) { this.staticNodes = staticNodes; return this; @@ -283,6 +295,8 @@ public class BesuNodeConfigurationBuilder { discoveryEnabled, bootnodeEligible, revertReasonEnabled, + secp256K1Native, + altbn128Native, plugins, extraCLIOptions, staticNodes, diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeFactory.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeFactory.java index 66d6b13a24..aad883c3c4 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeFactory.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/configuration/BesuNodeFactory.java @@ -63,6 +63,8 @@ public class BesuNodeFactory { config.isDiscoveryEnabled(), config.isBootnodeEligible(), config.isRevertReasonEnabled(), + config.isSecp256k1Native(), + config.isAltbn128Native(), config.getPlugins(), config.getExtraCLIOptions(), config.getStaticNodes(), diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/privacy/PrivacyNode.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/privacy/PrivacyNode.java index c9743d034d..514ab53fb1 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/privacy/PrivacyNode.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/privacy/PrivacyNode.java @@ -101,6 +101,8 @@ public class PrivacyNode implements AutoCloseable { besuConfig.isDiscoveryEnabled(), besuConfig.isBootnodeEligible(), besuConfig.isRevertReasonEnabled(), + besuConfig.isSecp256k1Native(), + besuConfig.isAltbn128Native(), besuConfig.getPlugins(), besuConfig.getExtraCLIOptions(), Collections.emptyList(),