Skip to content

Commit

Permalink
hide deprecated option tx-pool-max-hashes (#4501)
Browse files Browse the repository at this point in the history
* removed deprecated option

Signed-off-by: Sally MacFarlane <[email protected]>
  • Loading branch information
macfarla authored Oct 11, 2022
1 parent 8527fc1 commit c9d4b89
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 32 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- 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).

### 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)
Expand All @@ -20,9 +21,7 @@
### Additions and Improvements
- Bring GraphQL into compliance with execution-api specs [#4112](https://github.com/hyperledger/besu/pull/4112)
- Refactor unverified forkchoice event [#4487](https://github.com/hyperledger/besu/pull/4487)
- Optimize pivot block selector on PoS networks [#4488](https://github.com/hyperledger/besu/pull/4488)
- Improve UX of initial sync logs, pushing not relevant logs to debug level [#4486](https://github.com/hyperledger/besu/pull/4486)
- Refactor unverified forkchoice event [#4487](https://github.com/hyperledger/besu/pull/4487)
- Optimize pivot block selector on PoS networks [#4488](https://github.com/hyperledger/besu/pull/4488)
- Optimize Snap sync on PoS networks [#4462](https://github.com/hyperledger/besu/pull/4462)

Expand Down
21 changes: 0 additions & 21 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPRECATED_AND_USELESS_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPRECATION_WARNING_MSG;
import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH;
import static org.hyperledger.besu.ethereum.api.graphql.GraphQLConfiguration.DEFAULT_GRAPHQL_HTTP_PORT;
Expand Down Expand Up @@ -1187,15 +1186,6 @@ static class TxPoolOptionGroup {
arity = "1")
private final Integer txPoolMaxSize = TransactionPoolConfiguration.MAX_PENDING_TRANSACTIONS;

@Option(
names = {"--tx-pool-hashes-max-size"},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
description =
"Maximum number of pending transaction hashes that will be kept in the transaction pool (default: ${DEFAULT-VALUE})",
arity = "1")
@SuppressWarnings("unused")
private final Integer pooledTransactionHashesSize = null;

@Option(
names = {"--tx-pool-retention-hours"},
paramLabel = MANDATORY_INTEGER_FORMAT_HELP,
Expand Down Expand Up @@ -1949,17 +1939,6 @@ private void issueOptionWarnings() {
"--privacy-onchain-groups-enabled",
"--privacy-flexible-groups-enabled");
}

if (txPoolOptionGroup.pooledTransactionHashesSize != null) {
logger.warn(DEPRECATED_AND_USELESS_WARNING_MSG, "--tx-pool-hashes-max-size");
}

if (txPoolOptionGroup.pooledTransactionHashesSize != null) {
logger.warn(
DEPRECATION_WARNING_MSG,
"--tx-pool-future-max-by-account",
"--tx-pool-limit-by-account-percentage");
}
}

private void configure() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import static org.hyperledger.besu.cli.config.NetworkName.ROPSTEN;
import static org.hyperledger.besu.cli.config.NetworkName.SEPOLIA;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPRECATED_AND_USELESS_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPRECATION_WARNING_MSG;
import static org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis.ENGINE;
import static org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis.ETH;
Expand Down Expand Up @@ -4259,13 +4258,6 @@ public void onchainPrivacyGroupEnabledOptionIsDeprecated() {
"--privacy-flexible-groups-enabled");
}

@Test
public void txPoolHashesMaxSizeOptionIsDeprecated() {
parseCommand("--tx-pool-hashes-max-size", "1024");

verify(mockLogger).warn(DEPRECATED_AND_USELESS_WARNING_MSG, "--tx-pool-hashes-max-size");
}

@Test
public void flexiblePrivacyGroupEnabledFlagValueIsSet() {
parseCommand(
Expand Down
1 change: 0 additions & 1 deletion besu/src/test/resources/everything_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ privacy-flexible-groups-enabled=false
tx-pool-retention-hours=999
tx-pool-price-bump=13
tx-pool-max-size=1234
tx-pool-hashes-max-size=10000
tx-pool-limit-by-account-percentage=0.017
Xincoming-tx-messages-keep-alive-seconds=60
rpc-tx-feecap=2000000000000000000
Expand Down

0 comments on commit c9d4b89

Please sign in to comment.