Remove deprecated --Xmerge-support option (#4518)

* Remove deprecated --XMerge-support option

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/4521/head
Fabio Di Fabio 2 years ago committed by GitHub
parent 4b20e77a08
commit 97cf43b2ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 3
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  3. 55
      besu/src/main/java/org/hyperledger/besu/cli/options/unstable/MergeOptions.java

@ -5,7 +5,8 @@
- Flexible Privacy Groups (early access) support to Tessera's EC encryptor (contracts modified) [#4282](https://github.com/hyperledger/besu/pull/4282)
* Before this change, the `bytes32` type was used for the enclave public keys, just supporting encryptors with public keys of that length (like the default NaCl)
* For the EC encryptor, the encoded public key length is 91
- `--tx-pool-hashes-max-size` option removed (deprecated in 22.1.3).
- `--tx-pool-hashes-max-size` option removed (deprecated in 22.1.3)
- `--Xmerge-support` option remove (deprecated in 22.4.2) [#4518](https://github.com/hyperledger/besu/pull/4518)
### Additions and Improvements
- Improved RLP processing of zero-length string as 0x80 [#4283](https://github.com/hyperledger/besu/pull/4283) [#4388](https://github.com/hyperledger/besu/issues/4388)

@ -59,7 +59,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.MergeOptions;
import org.hyperledger.besu.cli.options.unstable.MetricsCLIOptions;
import org.hyperledger.besu.cli.options.unstable.MiningOptions;
import org.hyperledger.besu.cli.options.unstable.NatOptions;
@ -282,7 +281,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();
private final MergeOptions mergeOptions = MergeOptions.create();
final LauncherOptions unstableLauncherOptions = LauncherOptions.create();
private final PrivacyPluginOptions unstablePrivacyPluginOptions = PrivacyPluginOptions.create();
private final EvmOptions unstableEvmOptions = EvmOptions.create();
@ -1521,7 +1519,6 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
.put("Mining", unstableMiningOptions)
.put("Native Library", unstableNativeLibraryOptions)
.put("Launcher", unstableLauncherOptions)
.put("Merge", mergeOptions)
.put("EVM Options", unstableEvmOptions)
.put("IPC Options", unstableIpcOptions)
.build();

@ -1,55 +0,0 @@
/*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.cli.options.unstable;
import java.util.Stack;
import net.consensys.quorum.mainnet.launcher.options.Options;
import org.slf4j.LoggerFactory;
import picocli.CommandLine;
import picocli.CommandLine.Option;
/** DEPRECATED in favor of genesis config. */
public class MergeOptions implements Options {
// To make it easier for tests to reset the value to default
private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(MergeOptions.class);
@Option(
hidden = true,
names = {"--Xmerge-support"},
description = "Deprecated config parameter, do not use",
arity = "1",
parameterConsumer = MergeConfigConsumer.class)
@SuppressWarnings({"FieldCanBeFinal", "UnusedVariable"})
private static boolean deprecatedMergeEnabled = false;
public static MergeOptions create() {
return new MergeOptions();
}
@SuppressWarnings({"JdkObsolete"})
static class MergeConfigConsumer implements CommandLine.IParameterConsumer {
@Override
public void consumeParameters(
final Stack<String> args,
final CommandLine.Model.ArgSpec argSpec,
final CommandLine.Model.CommandSpec commandSpec) {
LOG.warn(
"--Xmerge-support parameter has been deprecated and will be removed in a future release. "
+ "Merge support is implicitly enabled by the presence of terminalTotalDifficulty in the genesis config.");
Boolean.parseBoolean(args.pop());
}
}
}
Loading…
Cancel
Save