From be91bb349b795252ab79f33ede6c8b350e11a170 Mon Sep 17 00:00:00 2001 From: jangko Date: Sat, 18 Sep 2021 17:37:37 +0700 Subject: [PATCH] hive: fixes readme.md and nimbus.sh the introduction of new config requires the new command line options be applied to the commands in nimbus.sh --- hive_integration/README.md | 29 ++++++----------------------- hive_integration/nimbus/Dockerfile | 2 +- hive_integration/nimbus/nimbus.sh | 20 +++++++++++--------- 3 files changed, 18 insertions(+), 33 deletions(-) diff --git a/hive_integration/README.md b/hive_integration/README.md index 13a690048..0f7ebfc6d 100644 --- a/hive_integration/README.md +++ b/hive_integration/README.md @@ -64,31 +64,14 @@ or ## Available test suites / simulators -- `devp2p/eth` -- `devp2p/discv4` -- `ethereum/sync` -- `ethereum/consensus` -- `ethereum/rpc` -- `ethereum/graphql` -- `smoke/network` -- `smoke/genesis` -- `smoke/clique` - -# Current state of the tests - -These Hive suites/simulators can be run: - -- `ethereum/consensus` -- `ethereum/graphql` -- `ethereum/rpc` -- `smoke/network` -- `smoke/genesis` -- `devp2p/discv4` - `devp2p/eth` -> require at least 2 clients +- `devp2p/discv4` - `ethereum/sync` - -These Hive suites/simulators don't work with `nimbus-eth1` currently: - +- `ethereum/consensus` +- `ethereum/rpc` +- `ethereum/graphql` +- `smoke/network` +- `smoke/genesis` - `smoke/clique` The number of passes and fails output at the time of writing (2021-05-20) is: diff --git a/hive_integration/nimbus/Dockerfile b/hive_integration/nimbus/Dockerfile index e63bfc982..51f33314e 100644 --- a/hive_integration/nimbus/Dockerfile +++ b/hive_integration/nimbus/Dockerfile @@ -29,7 +29,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY --from=build /usr/bin/nimbus /usr/bin/nimbus -RUN usr/bin/nimbus -v > /version.txt +RUN usr/bin/nimbus --version > /version.txt # Inject the startup script and helper files COPY *.sh *.jq *.json / diff --git a/hive_integration/nimbus/nimbus.sh b/hive_integration/nimbus/nimbus.sh index bdd39be65..9e94bb75c 100644 --- a/hive_integration/nimbus/nimbus.sh +++ b/hive_integration/nimbus/nimbus.sh @@ -49,7 +49,7 @@ set -e nimbus=/usr/bin/nimbus -FLAGS="--prune:archive --nat:0.0.0.0" +FLAGS="--prune-mode:archive --nat:extip:0.0.0.0" if [ "$HIVE_LOGLEVEL" != "" ]; then FLAGS="$FLAGS --log-level:DEBUG" @@ -57,11 +57,11 @@ fi # It doesn't make sense to dial out, use only a pre-set bootnode. if [ "$HIVE_BOOTNODE" != "" ]; then - FLAGS="$FLAGS --bootnodes:$HIVE_BOOTNODE" + FLAGS="$FLAGS --bootstrap-node:$HIVE_BOOTNODE" fi if [ "$HIVE_NETWORK_ID" != "" ]; then - FLAGS="$FLAGS --networkid:$HIVE_NETWORK_ID" + FLAGS="$FLAGS --network:$HIVE_NETWORK_ID" fi if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then @@ -77,7 +77,7 @@ fi # Configure the genesis chain and use it as start block and dump it to stdout echo "Supplied genesis state:" jq -f /mapper.jq /genesis.json | tee /genesis-start.json -FLAGS="$FLAGS --customnetwork:/genesis-start.json" +FLAGS="$FLAGS --custom-network:/genesis-start.json" # Don't immediately abort, some imports are meant to fail set +e @@ -85,7 +85,9 @@ set +e # Load the test chain if present echo "Loading initial blockchain..." if [ -f /chain.rlp ]; then - $nimbus $FLAGS --import:/chain.rlp + CMD="import /chain.rlp" + echo "Running nimbus: $nimbus $CMD $FLAGS" + $nimbus $CMD $FLAGS else echo "Warning: chain.rlp not found." fi @@ -93,7 +95,7 @@ fi # Load the remainder of the test chain echo "Loading remaining individual blocks..." if [ -d /blocks ]; then - (cd /blocks && cat `ls | sort -n` > blocks.rlp && $nimbus $FLAGS --import:blocks.rlp) + (cd /blocks && cat `ls | sort -n` > blocks.rlp && $nimbus import blocks.rlp $FLAGS) else echo "Warning: blocks folder not found." fi @@ -102,10 +104,10 @@ set -e # Configure RPC. if [ "$HIVE_GRAPHQL_ENABLED" != "" ]; then - FLAGS="$FLAGS --graphql --graphqlbind:0.0.0.0:8545" + FLAGS="$FLAGS --graphql --graphql-address:0.0.0.0 --graphql-port:8545" else - FLAGS="$FLAGS --rpc --rpcapi:eth,debug --rpcbind:0.0.0.0:8545" - FLAGS="$FLAGS --ws --wsapi:eth,debug --wsbind:0.0.0.0:8546" + FLAGS="$FLAGS --rpc --rpc-api:eth,debug --rpc-address:0.0.0.0 --rpc-port:8545" + FLAGS="$FLAGS --ws --ws-api:eth,debug --ws-address:0.0.0.0 --ws-port:8546" fi echo "Running nimbus with flags $FLAGS"