Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed tests for pki qbft and add deprecation notice #6979

Merged
merged 3 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

### Upcoming Breaking Changes
- Receipt compaction will be enabled by default in a future version of Besu. After this change it will not be possible to downgrade to the previous Besu version.
- PKI-backed QBFT will be removed in a future version of Besu. Other forms of QBFT will remain unchanged.

### Deprecations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.hyperledger.besu.ethereum.permissioning.PermissioningConfiguration;
import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;
import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration;
import org.hyperledger.besu.pki.config.PkiKeyStoreConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.NodeConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationProvider;
Expand Down Expand Up @@ -132,7 +131,6 @@ public class BesuNode implements NodeConfiguration, RunnableNode, AutoCloseable
private final List<String> staticNodes;
private boolean isDnsEnabled = false;
private Optional<Integer> exitCode = Optional.empty();
private Optional<PkiKeyStoreConfiguration> pkiKeyStoreConfiguration = Optional.empty();
private final boolean isStrictTxReplayProtectionEnabled;
private final Map<String, String> environment;

Expand Down Expand Up @@ -169,7 +167,6 @@ public BesuNode(
final Optional<PrivacyParameters> privacyParameters,
final List<String> runCommand,
final Optional<KeyPair> keyPair,
final Optional<PkiKeyStoreConfiguration> pkiKeyStoreConfiguration,
final boolean isStrictTxReplayProtectionEnabled,
final Map<String, String> environment)
throws IOException {
Expand Down Expand Up @@ -230,7 +227,6 @@ public BesuNode(
this.staticNodes = staticNodes;
this.isDnsEnabled = isDnsEnabled;
privacyParameters.ifPresent(this::setPrivacyParameters);
this.pkiKeyStoreConfiguration = pkiKeyStoreConfiguration;
this.environment = environment;
LOG.info("Created BesuNode {}", this);
}
Expand Down Expand Up @@ -763,10 +759,6 @@ public List<String> getRunCommand() {
return runCommand;
}

public Optional<PkiKeyStoreConfiguration> getPkiKeyStoreConfiguration() {
return pkiKeyStoreConfiguration;
}

public boolean isStrictTxReplayProtectionEnabled() {
return isStrictTxReplayProtectionEnabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,33 +377,6 @@ public void startNode(final BesuNode node) {
permissioningConfiguration.getNodeSmartContractInterfaceVersion()));
});

node.getPkiKeyStoreConfiguration()
.ifPresent(
pkiConfig -> {
params.add("--Xpki-block-creation-enabled");

params.add("--Xpki-block-creation-keystore-certificate-alias");
params.add(pkiConfig.getCertificateAlias());

params.add("--Xpki-block-creation-keystore-type");
params.add(pkiConfig.getKeyStoreType());

params.add("--Xpki-block-creation-keystore-file");
params.add(pkiConfig.getKeyStorePath().toAbsolutePath().toString());

params.add("--Xpki-block-creation-keystore-password-file");
params.add(pkiConfig.getKeyStorePasswordPath().toAbsolutePath().toString());

params.add("--Xpki-block-creation-truststore-type");
params.add(pkiConfig.getTrustStoreType());

params.add("--Xpki-block-creation-truststore-file");
params.add(pkiConfig.getTrustStorePath().toAbsolutePath().toString());

params.add("--Xpki-block-creation-truststore-password-file");
params.add(pkiConfig.getTrustStorePasswordPath().toAbsolutePath().toString());
});

params.addAll(node.getExtraCLIOptions());

params.add("--key-value-storage");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.hyperledger.besu.cli.config.EthNetworkConfig;
import org.hyperledger.besu.cli.config.NetworkName;
import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.consensus.qbft.pki.PkiBlockCreationConfigurationProvider;
import org.hyperledger.besu.controller.BesuController;
import org.hyperledger.besu.controller.BesuControllerBuilder;
import org.hyperledger.besu.crypto.KeyPairUtil;
Expand Down Expand Up @@ -253,9 +252,6 @@ public void startNode(final BesuNode node) {
.isRevertReasonEnabled(node.isRevertReasonEnabled())
.storageProvider(storageProvider)
.gasLimitCalculator(GasLimitCalculator.constant())
.pkiBlockCreationConfiguration(
node.getPkiKeyStoreConfiguration()
.map(pkiConfig -> new PkiBlockCreationConfigurationProvider().load(pkiConfig)))
.evmConfiguration(EvmConfiguration.DEFAULT)
.maxPeers(maxPeers)
.maxRemotelyInitiatedPeers(15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.hyperledger.besu.tests.acceptance.dsl.node.RunnableNode;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationFactory;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationFactory.CliqueOptions;
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.pki.PkiKeystoreConfigurationFactory;

import java.io.File;
import java.io.IOException;
Expand All @@ -57,8 +56,6 @@
public class BesuNodeFactory {

private final NodeConfigurationFactory node = new NodeConfigurationFactory();
private final PkiKeystoreConfigurationFactory pkiKeystoreConfigurationFactory =
new PkiKeystoreConfigurationFactory();

public BesuNode create(final BesuNodeConfiguration config) throws IOException {
return new BesuNode(
Expand Down Expand Up @@ -94,7 +91,6 @@ public BesuNode create(final BesuNodeConfiguration config) throws IOException {
config.getPrivacyParameters(),
config.getRunCommand(),
config.getKeyPair(),
config.getPkiKeyStoreConfiguration(),
config.isStrictTxReplayProtectionEnabled(),
config.getEnvironment());
}
Expand Down Expand Up @@ -517,31 +513,6 @@ public BesuNode createQbftNode(final String name) throws IOException {
.build());
}

public BesuNode createPkiQbftJKSNode(final String name) throws IOException {
return createPkiQbftNode(KeyStoreWrapper.KEYSTORE_TYPE_JKS, name);
}

public BesuNode createPkiQbftPKCS11Node(final String name) throws IOException {
return createPkiQbftNode(KeyStoreWrapper.KEYSTORE_TYPE_PKCS11, name);
}

public BesuNode createPkiQbftPKCS12Node(final String name) throws IOException {
return createPkiQbftNode(KeyStoreWrapper.KEYSTORE_TYPE_PKCS12, name);
}

public BesuNode createPkiQbftNode(final String type, final String name) throws IOException {
return create(
new BesuNodeConfigurationBuilder()
.name(name)
.miningEnabled()
.jsonRpcConfiguration(node.createJsonRpcWithQbftEnabledConfig(false))
.webSocketConfiguration(node.createWebSocketEnabledConfig())
.devMode(false)
.genesisConfigProvider(GenesisConfigurationFactory::createQbftGenesisConfig)
.pkiBlockCreationEnabled(pkiKeystoreConfigurationFactory.createPkiConfig(type, name))
.build());
}

public BesuNode createCustomGenesisNode(
final String name, final String genesisPath, final boolean canBeBootnode) throws IOException {
return createCustomGenesisNode(name, genesisPath, canBeBootnode, false);
Expand Down Expand Up @@ -699,41 +670,6 @@ public BesuNode createQbftNodeWithContractBasedValidators(
.build());
}

public BesuNode createPkiQbftJKSNodeWithValidators(final String name, final String... validators)
throws IOException {
return createPkiQbftNodeWithValidators(KeyStoreWrapper.KEYSTORE_TYPE_JKS, name, validators);
}

public BesuNode createPkiQbftPKCS11NodeWithValidators(
final String name, final String... validators) throws IOException {
return createPkiQbftNodeWithValidators(KeyStoreWrapper.KEYSTORE_TYPE_PKCS11, name, validators);
}

public BesuNode createPkiQbftPKCS12NodeWithValidators(
final String name, final String... validators) throws IOException {
return createPkiQbftNodeWithValidators(KeyStoreWrapper.KEYSTORE_TYPE_PKCS12, name, validators);
}

public BesuNode createPkiQbftNodeWithValidators(
final String type, final String name, final String... validators) throws IOException {

return create(
new BesuNodeConfigurationBuilder()
.name(name)
.miningEnabled()
.jsonRpcConfiguration(node.createJsonRpcWithQbftEnabledConfig(false))
.webSocketConfiguration(node.createWebSocketEnabledConfig())
.devMode(false)
.pkiBlockCreationEnabled(pkiKeystoreConfigurationFactory.createPkiConfig(type, name))
.genesisConfigProvider(
nodes ->
node.createGenesisConfigForValidators(
asList(validators),
nodes,
GenesisConfigurationFactory::createQbftGenesisConfig))
.build());
}

public BesuNode createNodeWithStaticNodes(final String name, final List<Node> staticNodes)
throws IOException {

Expand Down

This file was deleted.

Loading
Loading