From 08eb7c17df449cfa748acd388566b0a5573877dc Mon Sep 17 00:00:00 2001 From: mark-terry Date: Mon, 28 Nov 2022 00:06:56 +1000 Subject: [PATCH 1/3] Updated Besu configuration to address rpc-compat failure. Signed-off-by: mark-terry --- clients/besu/Dockerfile | 2 +- clients/besu/besu.sh | 3 ++- clients/besu/mapper.jq | 8 ++++++++ clients/erigon/erigon.sh | 1 + clients/ethereumjs/ethereumjs.sh | 5 ++++- clients/go-ethereum/geth.sh | 4 ++++ clients/nethermind/nethermind.sh | 1 + clients/openethereum/openethereum.sh | 1 + simulators/ethereum/rpc-compat/main.go | 1 + 9 files changed, 23 insertions(+), 3 deletions(-) diff --git a/clients/besu/Dockerfile b/clients/besu/Dockerfile index e3529392f4..78443b4794 100644 --- a/clients/besu/Dockerfile +++ b/clients/besu/Dockerfile @@ -21,6 +21,6 @@ RUN chmod +x /hive-bin/enode.sh RUN ./bin/besu --version > /version.txt # Export the usual networking ports to allow outside access to the node -EXPOSE 8545 8546 8551 30303 30303/udp +EXPOSE 5005 8545 8546 8551 30303 30303/udp ENTRYPOINT ["/opt/besu/bin/besu-hive.sh"] diff --git a/clients/besu/besu.sh b/clients/besu/besu.sh index 4b66c73dc8..390226fdee 100644 --- a/clients/besu/besu.sh +++ b/clients/besu/besu.sh @@ -38,6 +38,7 @@ # - HIVE_SKIP_POW If set, skip PoW verification # - HIVE_LOGLEVEL Client log level # - HIVE_GRAPHQL_ENABLED If set, GraphQL is enabled on port 8545 and RPC is disabled +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # # These flags are not supported by the Besu hive client # @@ -112,7 +113,7 @@ fi if [ "$HIVE_MINER_EXTRA" != "" ]; then FLAGS="$FLAGS --miner-extra-data=$HIVE_MINER_EXTRA" fi -FLAGS="$FLAGS --min-gas-price=16 --tx-pool-price-bump=0" +FLAGS="$FLAGS --min-gas-price=1 --tx-pool-price-bump=0 --tx-pool-limit-by-account-percentage=1" # Configure peer-to-peer networking. if [ "$HIVE_BOOTNODE" != "" ]; then diff --git a/clients/besu/mapper.jq b/clients/besu/mapper.jq index 67a35c7b6c..999d53ca4e 100644 --- a/clients/besu/mapper.jq +++ b/clients/besu/mapper.jq @@ -21,6 +21,13 @@ def to_int: if . == null then . else .|tonumber end ; +# Converts "1" / "0" to boolean. +def to_bool: + if . == null then . else + if . == "1" then true else false end + end +; + # Replace 'config' section in input JSON. . + { "config": { @@ -43,6 +50,7 @@ def to_int: "muirGlacierBlock": env.HIVE_FORK_MUIR_GLACIER|to_int, "berlinBlock": env.HIVE_FORK_BERLIN|to_int, "londonBlock": env.HIVE_FORK_LONDON|to_int, + "zeroBaseFee": env.HIVE_ZERO_BASE_FEE|to_bool, "parisBlock": env.HIVE_MERGE_BLOCK_ID|to_int, "terminalTotalDifficulty": env.HIVE_TERMINAL_TOTAL_DIFFICULTY|to_int, }|remove_empty diff --git a/clients/erigon/erigon.sh b/clients/erigon/erigon.sh index 4f54ddc2e8..dca30a1899 100644 --- a/clients/erigon/erigon.sh +++ b/clients/erigon/erigon.sh @@ -32,6 +32,7 @@ # - HIVE_GRAPHQL_ENABLED turns on GraphQL server # - HIVE_CLIQUE_PRIVATEKEY private key for clique mining # - HIVE_NODETYPE sync and pruning selector (archive, full, light) +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/ethereumjs/ethereumjs.sh b/clients/ethereumjs/ethereumjs.sh index 09ed02a487..305cac6f11 100644 --- a/clients/ethereumjs/ethereumjs.sh +++ b/clients/ethereumjs/ethereumjs.sh @@ -43,7 +43,10 @@ # - HIVE_LOGLEVEL client loglevel (0-5) # - HIVE_GRAPHQL_ENABLED enables graphql on port 8545 # - HIVE_LES_SERVER set to '1' to enable LES server - +# +# These variables are NOT supported by ethereum-js +# +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/go-ethereum/geth.sh b/clients/go-ethereum/geth.sh index afe47ca6f5..a32a7bd6e0 100644 --- a/clients/go-ethereum/geth.sh +++ b/clients/go-ethereum/geth.sh @@ -44,6 +44,10 @@ # - HIVE_LOGLEVEL client loglevel (0-5) # - HIVE_GRAPHQL_ENABLED enables graphql on port 8545 # - HIVE_LES_SERVER set to '1' to enable LES server +# +# These variables are NOT supported by go-ethereum +# +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/nethermind/nethermind.sh b/clients/nethermind/nethermind.sh index 597057448d..520c78179a 100644 --- a/clients/nethermind/nethermind.sh +++ b/clients/nethermind/nethermind.sh @@ -45,6 +45,7 @@ # - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork # - HIVE_GRAPHQL_ENABLED if set, GraphQL is enabled on port 8545 # - HIVE_TESTNET whether testnet nonces (2^20) are needed +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/openethereum/openethereum.sh b/clients/openethereum/openethereum.sh index 8cba4709f3..169b7c4cd4 100644 --- a/clients/openethereum/openethereum.sh +++ b/clients/openethereum/openethereum.sh @@ -45,6 +45,7 @@ # - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork # - HIVE_GRAPHQL_ENABLED if set, GraphQL is enabled on port 8545 # - HIVE_TESTNET whether testnet nonces (2^20) are needed +# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/simulators/ethereum/rpc-compat/main.go b/simulators/ethereum/rpc-compat/main.go index 2618a8b7ab..53495a01d3 100644 --- a/simulators/ethereum/rpc-compat/main.go +++ b/simulators/ethereum/rpc-compat/main.go @@ -34,6 +34,7 @@ var ( "HIVE_FORK_ISTANBUL": "0", "HIVE_FORK_BERLIN": "0", "HIVE_FORK_LONDON": "0", + "HIVE_ZERO_BASE_FEE": "1", } files = map[string]string{ "genesis.json": "./tests/genesis.json", From 17af1c0510709451a14527efb319b6eec693ead6 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 3 Jan 2023 11:59:28 +0000 Subject: [PATCH 2/3] clients/besu: add comment about port 5005 --- clients/besu/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/besu/Dockerfile b/clients/besu/Dockerfile index 78443b4794..6105ae3783 100644 --- a/clients/besu/Dockerfile +++ b/clients/besu/Dockerfile @@ -20,7 +20,10 @@ RUN chmod +x /hive-bin/enode.sh RUN ./bin/besu --version > /version.txt -# Export the usual networking ports to allow outside access to the node -EXPOSE 5005 8545 8546 8551 30303 30303/udp +# Expose JVM debugger port. +EXPOSE 5005 + +# Expose the usual networking ports to allow outside access to the node. +EXPOSE 8545 8546 8551 30303 30303/udp ENTRYPOINT ["/opt/besu/bin/besu-hive.sh"] From 5cdd905425ddbf10439dbdf72a8a5fdd622b9ce1 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 3 Jan 2023 12:48:41 +0000 Subject: [PATCH 3/3] clients: revert addition of HIVE_ZERO_BASE_FEE --- clients/besu/besu.sh | 1 - clients/besu/mapper.jq | 8 -------- clients/erigon/erigon.sh | 1 - clients/ethereumjs/ethereumjs.sh | 5 +---- clients/go-ethereum/geth.sh | 4 ---- clients/nethermind/nethermind.sh | 1 - clients/openethereum/openethereum.sh | 1 - simulators/ethereum/rpc-compat/main.go | 1 - 8 files changed, 1 insertion(+), 21 deletions(-) diff --git a/clients/besu/besu.sh b/clients/besu/besu.sh index 390226fdee..f5a0a28811 100644 --- a/clients/besu/besu.sh +++ b/clients/besu/besu.sh @@ -38,7 +38,6 @@ # - HIVE_SKIP_POW If set, skip PoW verification # - HIVE_LOGLEVEL Client log level # - HIVE_GRAPHQL_ENABLED If set, GraphQL is enabled on port 8545 and RPC is disabled -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # # These flags are not supported by the Besu hive client # diff --git a/clients/besu/mapper.jq b/clients/besu/mapper.jq index 999d53ca4e..67a35c7b6c 100644 --- a/clients/besu/mapper.jq +++ b/clients/besu/mapper.jq @@ -21,13 +21,6 @@ def to_int: if . == null then . else .|tonumber end ; -# Converts "1" / "0" to boolean. -def to_bool: - if . == null then . else - if . == "1" then true else false end - end -; - # Replace 'config' section in input JSON. . + { "config": { @@ -50,7 +43,6 @@ def to_bool: "muirGlacierBlock": env.HIVE_FORK_MUIR_GLACIER|to_int, "berlinBlock": env.HIVE_FORK_BERLIN|to_int, "londonBlock": env.HIVE_FORK_LONDON|to_int, - "zeroBaseFee": env.HIVE_ZERO_BASE_FEE|to_bool, "parisBlock": env.HIVE_MERGE_BLOCK_ID|to_int, "terminalTotalDifficulty": env.HIVE_TERMINAL_TOTAL_DIFFICULTY|to_int, }|remove_empty diff --git a/clients/erigon/erigon.sh b/clients/erigon/erigon.sh index dca30a1899..4f54ddc2e8 100644 --- a/clients/erigon/erigon.sh +++ b/clients/erigon/erigon.sh @@ -32,7 +32,6 @@ # - HIVE_GRAPHQL_ENABLED turns on GraphQL server # - HIVE_CLIQUE_PRIVATEKEY private key for clique mining # - HIVE_NODETYPE sync and pruning selector (archive, full, light) -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/ethereumjs/ethereumjs.sh b/clients/ethereumjs/ethereumjs.sh index 305cac6f11..09ed02a487 100644 --- a/clients/ethereumjs/ethereumjs.sh +++ b/clients/ethereumjs/ethereumjs.sh @@ -43,10 +43,7 @@ # - HIVE_LOGLEVEL client loglevel (0-5) # - HIVE_GRAPHQL_ENABLED enables graphql on port 8545 # - HIVE_LES_SERVER set to '1' to enable LES server -# -# These variables are NOT supported by ethereum-js -# -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network + # Immediately abort the script on any error encountered set -e diff --git a/clients/go-ethereum/geth.sh b/clients/go-ethereum/geth.sh index a32a7bd6e0..afe47ca6f5 100644 --- a/clients/go-ethereum/geth.sh +++ b/clients/go-ethereum/geth.sh @@ -44,10 +44,6 @@ # - HIVE_LOGLEVEL client loglevel (0-5) # - HIVE_GRAPHQL_ENABLED enables graphql on port 8545 # - HIVE_LES_SERVER set to '1' to enable LES server -# -# These variables are NOT supported by go-ethereum -# -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/nethermind/nethermind.sh b/clients/nethermind/nethermind.sh index 520c78179a..597057448d 100644 --- a/clients/nethermind/nethermind.sh +++ b/clients/nethermind/nethermind.sh @@ -45,7 +45,6 @@ # - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork # - HIVE_GRAPHQL_ENABLED if set, GraphQL is enabled on port 8545 # - HIVE_TESTNET whether testnet nonces (2^20) are needed -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/clients/openethereum/openethereum.sh b/clients/openethereum/openethereum.sh index 169b7c4cd4..8cba4709f3 100644 --- a/clients/openethereum/openethereum.sh +++ b/clients/openethereum/openethereum.sh @@ -45,7 +45,6 @@ # - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork # - HIVE_GRAPHQL_ENABLED if set, GraphQL is enabled on port 8545 # - HIVE_TESTNET whether testnet nonces (2^20) are needed -# - HIVE_ZERO_BASE_FEE If set, remove base fee and permit zero gas network # Immediately abort the script on any error encountered set -e diff --git a/simulators/ethereum/rpc-compat/main.go b/simulators/ethereum/rpc-compat/main.go index 53495a01d3..2618a8b7ab 100644 --- a/simulators/ethereum/rpc-compat/main.go +++ b/simulators/ethereum/rpc-compat/main.go @@ -34,7 +34,6 @@ var ( "HIVE_FORK_ISTANBUL": "0", "HIVE_FORK_BERLIN": "0", "HIVE_FORK_LONDON": "0", - "HIVE_ZERO_BASE_FEE": "1", } files = map[string]string{ "genesis.json": "./tests/genesis.json",