From 97c8384a6ca091987f84174276e55ff0f6f4616b Mon Sep 17 00:00:00 2001 From: garyschulte Date: Thu, 16 Feb 2023 16:38:11 -0800 Subject: [PATCH 1/4] default global max rpc batch size to 1000 for now Signed-off-by: garyschulte --- CHANGELOG.md | 3 ++- .../java/org/hyperledger/besu/cli/DefaultCommandValues.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872d24eceff..fd18d73f3af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ ## 23.1.0-RC2 ### Breaking Changes -- Add a new CLI option to limit the number of requests in a single RPC batch request. Default=1 [#4965](https://github.com/hyperledger/besu/pull/4965) - Change JsonRpc http service to return the error -32602 (Invalid params) with a 200 http status code - Besu requires minimum Java 17 and up to build and run [#3320](https://github.com/hyperledger/besu/issues/3320) - PKCS11 with nss module (PKCS11 based HSM can be used in DevP2P TLS and QBFT PKI) does not work with RSA keys @@ -12,6 +11,8 @@ tests are updated to use EC private keys instead of RSA keys. - Change eth_feeHistory parameter `blockCount` to accept hexadecimal string (was accepting plain integer) [#5047](https://github.com/hyperledger/besu/pull/5047) ### Additions and Improvements +- Default rpc batch request to 1000 []() +- Add a new CLI option to limit the number of requests in a single RPC batch request. [#4965](https://github.com/hyperledger/besu/pull/4965) - Support for new DATAHASH opcode as part of EIP-4844 [#4823](https://github.com/hyperledger/besu/issues/4823) - Send only hash announcement for blob transaction type [#4940](https://github.com/hyperledger/besu/pull/4940) - Add `excess_data_gas` field to block header [#4958](https://github.com/hyperledger/besu/pull/4958) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java b/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java index 58ef9ccf936..f0cbab00bec 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/DefaultCommandValues.java @@ -87,7 +87,7 @@ public interface DefaultCommandValues { /** The constant DEFAULT_HTTP_MAX_CONNECTIONS. */ int DEFAULT_HTTP_MAX_CONNECTIONS = 80; /** The constant DEFAULT_HTTP_MAX_BATCH_SIZE. */ - int DEFAULT_HTTP_MAX_BATCH_SIZE = 1; + int DEFAULT_HTTP_MAX_BATCH_SIZE = 1000; /** The constant DEFAULT_WS_MAX_CONNECTIONS. */ int DEFAULT_WS_MAX_CONNECTIONS = 80; /** The constant DEFAULT_WS_MAX_FRAME_SIZE. */ From 93627890d25c35c7b1edc51f896b743767c7ceac Mon Sep 17 00:00:00 2001 From: garyschulte Date: Thu, 16 Feb 2023 16:39:13 -0800 Subject: [PATCH 2/4] update changelog Signed-off-by: garyschulte --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd18d73f3af..ac8e4d7bed3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ tests are updated to use EC private keys instead of RSA keys. - Change eth_feeHistory parameter `blockCount` to accept hexadecimal string (was accepting plain integer) [#5047](https://github.com/hyperledger/besu/pull/5047) ### Additions and Improvements -- Default rpc batch request to 1000 []() +- Default rpc batch request to 1000 [#5104](https://github.com/hyperledger/besu/pull/5104) - Add a new CLI option to limit the number of requests in a single RPC batch request. [#4965](https://github.com/hyperledger/besu/pull/4965) - Support for new DATAHASH opcode as part of EIP-4844 [#4823](https://github.com/hyperledger/besu/issues/4823) - Send only hash announcement for blob transaction type [#4940](https://github.com/hyperledger/besu/pull/4940) From 50587784e3da920ee86ae548e14fe7fc8bb053f6 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Thu, 16 Feb 2023 16:58:48 -0800 Subject: [PATCH 3/4] update default engine max batch size, add to toString, equals and hashCode Signed-off-by: garyschulte --- .../besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java index 9dc22cde906..ae1c27bb22a 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java @@ -36,7 +36,7 @@ public class JsonRpcConfiguration { public static final int DEFAULT_JSON_RPC_PORT = 8545; public static final int DEFAULT_ENGINE_JSON_RPC_PORT = 8551; public static final int DEFAULT_MAX_ACTIVE_CONNECTIONS = 80; - public static final int DEFAULT_MAX_BATCH_SIZE = 1; + public static final int DEFAULT_MAX_BATCH_SIZE = 1000; private boolean enabled; private int port; @@ -208,6 +208,7 @@ public String toString() { .add("tlsConfiguration", tlsConfiguration) .add("httpTimeoutSec", httpTimeoutSec) .add("maxActiveConnections", maxActiveConnections) + .add("maxBatchSize", maxBatchSize) .toString(); } @@ -228,7 +229,8 @@ public boolean equals(final Object o) { && Objects.equals(rpcApis, that.rpcApis) && Objects.equals(hostsAllowlist, that.hostsAllowlist) && Objects.equals(authenticationCredentialsFile, that.authenticationCredentialsFile) - && Objects.equals(authenticationPublicKeyFile, that.authenticationPublicKeyFile); + && Objects.equals(authenticationPublicKeyFile, that.authenticationPublicKeyFile) + && Objects.equals(maxBatchSize, that.maxBatchSize); } @Override @@ -242,7 +244,8 @@ public int hashCode() { hostsAllowlist, authenticationEnabled, authenticationCredentialsFile, - authenticationPublicKeyFile); + authenticationPublicKeyFile, + maxBatchSize); } public int getMaxActiveConnections() { From d642be2b90ff256b255ad3af6b8e78c4b9780202 Mon Sep 17 00:00:00 2001 From: garyschulte Date: Thu, 16 Feb 2023 17:03:57 -0800 Subject: [PATCH 4/4] fix primitive equals comparison Signed-off-by: garyschulte --- .../besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java index ae1c27bb22a..633881d81c9 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcConfiguration.java @@ -230,7 +230,7 @@ public boolean equals(final Object o) { && Objects.equals(hostsAllowlist, that.hostsAllowlist) && Objects.equals(authenticationCredentialsFile, that.authenticationCredentialsFile) && Objects.equals(authenticationPublicKeyFile, that.authenticationPublicKeyFile) - && Objects.equals(maxBatchSize, that.maxBatchSize); + && maxBatchSize == that.maxBatchSize; } @Override