Skip to content

Commit

Permalink
Remove quorum-mainnet-launcher (hyperledger#5355)
Browse files Browse the repository at this point in the history
* remove launcher from besucommand

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
  • Loading branch information
macfarla authored Apr 18, 2023
1 parent 40da7a9 commit 78f8eff
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 204 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
## 23.4-RC

### Breaking Changes
- Remove IBFT 1.0 feature (deprecated in 23.1.0-beta) [#5302](https://github.com/hyperledger/besu/pull/5302)
- Remove GoQuorum-compatible privacy feature (deprecated in 23.1.0-beta) [#5303](https://github.com/hyperledger/besu/pull/5303)
- Remove IBFT 1.0 feature [#5302](https://github.com/hyperledger/besu/pull/5302)
- Remove GoQuorum-compatible privacy feature [#5303](https://github.com/hyperledger/besu/pull/5303)
- Remove launcher command line utility [#5355](https://github.com/hyperledger/besu/pull/5355)
- Remove deprecated `tx-pool-future-max-by-account` option, see instead: `tx-pool-limit-by-account-percentage` [#5361](https://github.com/hyperledger/besu/pull/5361)

### Additions and Improvements
Expand Down
1 change: 0 additions & 1 deletion besu/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ dependencies {
implementation 'org.apache.tuweni:tuweni-units'
implementation 'org.springframework.security:spring-security-crypto'
implementation 'org.xerial.snappy:snappy-java'
implementation 'net.consensys.services:quorum-mainnet-launcher'
implementation 'tech.pegasys:jc-kzg-4844'

runtimeOnly 'org.apache.logging.log4j:log4j-jul'
Expand Down
41 changes: 5 additions & 36 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
import org.hyperledger.besu.cli.options.unstable.EthProtocolOptions;
import org.hyperledger.besu.cli.options.unstable.EvmOptions;
import org.hyperledger.besu.cli.options.unstable.IpcOptions;
import org.hyperledger.besu.cli.options.unstable.LauncherOptions;
import org.hyperledger.besu.cli.options.unstable.MetricsCLIOptions;
import org.hyperledger.besu.cli.options.unstable.MiningOptions;
import org.hyperledger.besu.cli.options.unstable.NatOptions;
Expand Down Expand Up @@ -232,10 +231,6 @@
import io.vertx.core.VertxOptions;
import io.vertx.core.json.DecodeException;
import io.vertx.core.metrics.MetricsOptions;
import net.consensys.quorum.mainnet.launcher.LauncherManager;
import net.consensys.quorum.mainnet.launcher.config.ImmutableLauncherConfig;
import net.consensys.quorum.mainnet.launcher.exception.LauncherException;
import net.consensys.quorum.mainnet.launcher.util.ParseArgsHelper;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.units.bigints.UInt256;
import org.slf4j.Logger;
Expand Down Expand Up @@ -285,7 +280,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
private final NatOptions unstableNatOptions = NatOptions.create();
private final NativeLibraryOptions unstableNativeLibraryOptions = NativeLibraryOptions.create();
private final RPCOptions unstableRPCOptions = RPCOptions.create();
final LauncherOptions unstableLauncherOptions = LauncherOptions.create();
private final PrivacyPluginOptions unstablePrivacyPluginOptions = PrivacyPluginOptions.create();
private final EvmOptions unstableEvmOptions = EvmOptions.create();
private final IpcOptions unstableIpcOptions = IpcOptions.create();
Expand Down Expand Up @@ -1584,7 +1578,6 @@ private void handleUnstableOptions() {
.put("TransactionPool", unstableTransactionPoolOptions)
.put("Mining", unstableMiningOptions)
.put("Native Library", unstableNativeLibraryOptions)
.put("Launcher", unstableLauncherOptions)
.put("EVM Options", unstableEvmOptions)
.put("IPC Options", unstableIpcOptions)
.put("Chain Data Pruning Options", unstableChainPruningOptions)
Expand Down Expand Up @@ -1647,35 +1640,11 @@ private int parse(
new ConfigOptionSearchAndRunHandler(
resultHandler, besuParameterExceptionHandler, environment);

ParseArgsHelper.getLauncherOptions(unstableLauncherOptions, args);
if (unstableLauncherOptions.isLauncherMode()
|| unstableLauncherOptions.isLauncherModeForced()) {
try {
final ImmutableLauncherConfig launcherConfig =
ImmutableLauncherConfig.builder()
.launcherScript(BesuCommand.class.getResourceAsStream("launcher.json"))
.addCommandClasses(this, unstableNatOptions, ethstatsOptions, unstableMiningOptions)
.isLauncherForced(unstableLauncherOptions.isLauncherModeForced())
.build();
final File file = new LauncherManager(launcherConfig).run();
logger.info("Config file location : {}", file.getAbsolutePath());
return commandLine
.setExecutionStrategy(configParsingHandler)
.setParameterExceptionHandler(besuParameterExceptionHandler)
.setExecutionExceptionHandler(besuExecutionExceptionHandler)
.execute(String.format("%s=%s", CONFIG_FILE_OPTION_NAME, file.getAbsolutePath()));

} catch (final LauncherException e) {
logger.warn("Unable to run the launcher {}", e.getMessage());
return -1;
}
} else {
return commandLine
.setExecutionStrategy(configParsingHandler)
.setParameterExceptionHandler(besuParameterExceptionHandler)
.setExecutionExceptionHandler(besuExecutionExceptionHandler)
.execute(args);
}
return commandLine
.setExecutionStrategy(configParsingHandler)
.setParameterExceptionHandler(besuParameterExceptionHandler)
.setExecutionExceptionHandler(besuExecutionExceptionHandler)
.execute(args);
}

private void preSynchronization() {
Expand Down

This file was deleted.

19 changes: 7 additions & 12 deletions besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1882,20 +1882,15 @@ public void parsesValidBonsaiTrieLimitBackLayersOption() {
}

@Test
public void launcherDefaultOptionValue() {
final TestBesuCommand besuCommand = parseCommand();
public void parsesInvalidBonsaiTrieLimitBackLayersOption() {

assertThat(besuCommand.getLauncherOptions().isLauncherMode()).isFalse();
assertThat(besuCommand.getEnodeDnsConfiguration().updateEnabled()).isFalse();
}

@Test
public void launcherOptionIsParsedCorrectly() {
final TestBesuCommand besuCommand =
parseCommand("--Xlauncher", "true", "--Xlauncher-force", "true");
parseCommand("--data-storage-format", "BONSAI", "--bonsai-maximum-back-layers-to-load", "ten");

assertThat(besuCommand.getLauncherOptions().isLauncherMode()).isTrue();
assertThat(besuCommand.getEnodeDnsConfiguration().updateEnabled()).isFalse();
Mockito.verifyNoInteractions(mockRunnerBuilder);
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"Invalid value for option '--bonsai-maximum-back-layers-to-load': 'ten' is not a long");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.hyperledger.besu.cli.config.EthNetworkConfig;
import org.hyperledger.besu.cli.options.stable.EthstatsOptions;
import org.hyperledger.besu.cli.options.unstable.EthProtocolOptions;
import org.hyperledger.besu.cli.options.unstable.LauncherOptions;
import org.hyperledger.besu.cli.options.unstable.MetricsCLIOptions;
import org.hyperledger.besu.cli.options.unstable.NetworkingOptions;
import org.hyperledger.besu.cli.options.unstable.SynchronizerOptions;
Expand Down Expand Up @@ -517,10 +516,6 @@ public MetricsCLIOptions getMetricsCLIOptions() {
return unstableMetricsCLIOptions;
}

public LauncherOptions getLauncherOptions() {
return unstableLauncherOptions;
}

public void close() {
if (vertx != null) {
final AtomicBoolean closed = new AtomicBoolean(false);
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ allprojects {
url 'https://artifacts.consensys.net/public/maven/maven/'
content { includeGroupByRegex('tech\\.pegasys(\\..*)?') }
}
maven {
url 'https://dl.cloudsmith.io/public/consensys/quorum-mainnet-launcher/maven/'
content { includeGroupByRegex('net\\.consensys\\..*') }
}
maven {
url 'https://splunk.jfrog.io/splunk/ext-releases-local'
content { includeGroupByRegex('com\\.splunk\\..*') }
Expand Down
8 changes: 0 additions & 8 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2811,14 +2811,6 @@
<sha256 value="ff66d886607137e2095f20c90ee093f3c80329164eff091a0688bdce37e3e6b2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.consensys.services" name="quorum-mainnet-launcher" version="1.0.1">
<artifact name="quorum-mainnet-launcher-1.0.1.jar">
<sha256 value="1d205a5517b7f193cda11cb3469e9184d142080e698d2f068dcddd9c3036121f" origin="Generated by Gradle"/>
</artifact>
<artifact name="quorum-mainnet-launcher-1.0.1.pom">
<sha256 value="533a3ce5165d8bca7f1e6d738cbc07f0877a99dfa40bdc05f05373c34bf62f43" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.java" name="jvnet-parent" version="3">
<artifact name="jvnet-parent-3.pom">
<sha256 value="30f5789efa39ddbf96095aada3fc1260c4561faf2f714686717cb2dc5049475a" origin="Generated by Gradle"/>
Expand Down
2 changes: 0 additions & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ dependencyManagement {

dependency 'junit:junit:4.13.2'

dependency 'net.consensys.services:quorum-mainnet-launcher:1.0.1'

dependency 'net.java.dev.jna:jna:5.13.0'

dependency 'org.apache.commons:commons-compress:1.23.0'
Expand Down

0 comments on commit 78f8eff

Please sign in to comment.