From c7d5c521f863a2ed90896f92ac18ead50154fac1 Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Thu, 20 Jun 2024 19:40:05 +1000 Subject: [PATCH 1/3] Remove deprecation message Signed-off-by: Gabriel-Trintinalia --- .../org/hyperledger/besu/cli/BesuCommand.java | 4 ---- .../cli/options/unstable/NetworkingOptions.java | 15 +-------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index 9e612fea3b2..4262ff9644e 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -20,7 +20,6 @@ import static java.util.Collections.singletonList; import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath; import static org.hyperledger.besu.cli.config.NetworkName.MAINNET; -import static org.hyperledger.besu.cli.options.unstable.NetworkingOptions.PEER_LOWER_BOUND_FLAG; import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG; import static org.hyperledger.besu.cli.util.CommandLineUtils.isOptionSet; import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH; @@ -1659,9 +1658,6 @@ private void ensureValidPeerBoundParams() { maxPeers = p2PDiscoveryOptionGroup.maxPeers; final Boolean isLimitRemoteWireConnectionsEnabled = p2PDiscoveryOptionGroup.isLimitRemoteWireConnectionsEnabled; - if (isOptionSet(commandLine, PEER_LOWER_BOUND_FLAG)) { - logger.warn(PEER_LOWER_BOUND_FLAG + " is deprecated and will be removed soon."); - } if (isLimitRemoteWireConnectionsEnabled) { final float fraction = Fraction.fromPercentage(p2PDiscoveryOptionGroup.maxRemoteConnectionsPercentage) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NetworkingOptions.java b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NetworkingOptions.java index a66bb6fb618..aed7b079d87 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NetworkingOptions.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/options/unstable/NetworkingOptions.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.cli.options.unstable; -import org.hyperledger.besu.cli.DefaultCommandValues; import org.hyperledger.besu.cli.options.CLIOptions; import org.hyperledger.besu.cli.options.OptionParser; import org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration; @@ -27,9 +26,6 @@ /** The Networking Cli options. */ public class NetworkingOptions implements CLIOptions { - /** The constant PEER_LOWER_BOUND_FLAG */ - public static final String PEER_LOWER_BOUND_FLAG = "--Xp2p-peer-lower-bound"; - private final String INITIATE_CONNECTIONS_FREQUENCY_FLAG = "--Xp2p-initiate-connections-frequency"; private final String CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG = @@ -77,13 +73,6 @@ public class NetworkingOptions implements CLIOptions { description = "Whether to enable filtering of peers based on the ENR field ForkId)") private final Boolean filterOnEnrForkId = NetworkingConfiguration.DEFAULT_FILTER_ON_ENR_FORK_ID; - @CommandLine.Option( - hidden = true, - names = PEER_LOWER_BOUND_FLAG, - description = - "(Deprecated) Lower bound on the target number of P2P connections (default: ${DEFAULT-VALUE})") - private final Integer peerLowerBoundConfig = DefaultCommandValues.DEFAULT_MAX_PEERS; - private NetworkingOptions() {} /** @@ -130,9 +119,7 @@ public List getCLIOptions() { CHECK_MAINTAINED_CONNECTIONS_FREQUENCY_FLAG, OptionParser.format(checkMaintainedConnectionsFrequencySec), INITIATE_CONNECTIONS_FREQUENCY_FLAG, - OptionParser.format(initiateConnectionsFrequencySec), - PEER_LOWER_BOUND_FLAG, - OptionParser.format((peerLowerBoundConfig))); + OptionParser.format(initiateConnectionsFrequencySec)); if (dnsDiscoveryServerOverride.isPresent()) { retval.add(DNS_DISCOVERY_SERVER_OVERRIDE_FLAG); From e6d7f0b777278c8ee0f6d381e5126dc01f0d0a89 Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Fri, 21 Jun 2024 10:48:58 +1000 Subject: [PATCH 2/3] Add message to the changelog Signed-off-by: Gabriel-Trintinalia --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3724ed84a43..5d5956ba57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next Release ### Breaking Changes +-- `Xp2p-peer-lower-bound` has been removed. [#7247](https://github.com/hyperledger/besu/pull/7247) ### Additions and Improvements - Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658) From 7455c947957793e7ea8b76b9d2e802587433df19 Mon Sep 17 00:00:00 2001 From: Gabriel-Trintinalia Date: Fri, 21 Jun 2024 10:54:10 +1000 Subject: [PATCH 3/3] Fix changelog message Signed-off-by: Gabriel-Trintinalia --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba82246ec1..a082a5b007b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Next Release ### Breaking Changes --- `Xp2p-peer-lower-bound` has been removed. [#7247](https://github.com/hyperledger/besu/pull/7247) +- `Xp2p-peer-lower-bound` has been removed. [#7247](https://github.com/hyperledger/besu/pull/7247) ### Additions and Improvements - Support for eth_maxPriorityFeePerGas [#5658](https://github.com/hyperledger/besu/issues/5658)