diff --git a/clients/aleth/Dockerfile b/clients/aleth/Dockerfile deleted file mode 100644 index 04c359d23e..0000000000 --- a/clients/aleth/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -ARG branch=nightly -FROM ethereum/aleth:$branch - -# The aleth base docker image uses 'aleth' user. Switch to root so our additions work. -USER root - -RUN apk add --no-cache jq bc bash curl - -# Add the startup script. -ADD aleth.sh /aleth.sh -RUN chmod +x /aleth.sh -ADD mapper.jq /mapper.jq -ADD genesis.json /genesis.json - -# Add the enode URL retriever script. -RUN mkdir /hive-bin -ADD enode.sh /hive-bin/enode.sh -RUN chmod +x /hive-bin/enode.sh - -# Copy buildinfo into version.json, and also remove the 'bool' field is_prerelease. -RUN jq -r '.version' /usr/share/aleth/buildinfo.json > /version.txt - -# Export the usual networking ports to allow outside access to the node. -EXPOSE 8545 8547 30303 30303/udp - -ENTRYPOINT ["/aleth.sh"] diff --git a/clients/aleth/aleth.sh b/clients/aleth/aleth.sh deleted file mode 100644 index 006768959b..0000000000 --- a/clients/aleth/aleth.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - -# Startup script to initialize and boot an Aleth instance. -# -# This script assumes the following files: -# - `eth` binary is located somewhere on the $PATH -# - `genesis.json` file is located in the filesystem root (mandatory) -# - `chain.rlp` file is located in the filesystem root (optional) -# - `blocks` folder is located in the filesystem root (optional) -# - `keys` folder is located in the filesystem root (optional) -# -# This script assumes the following environment variables: -# -# - HIVE_BOOTNODE enode URL of the remote bootstrap node -# - HIVE_NETWORK_ID network ID number to use for the eth protocol -# - HIVE_TESTNET whether testnet nonces (2^20) are needed -# - HIVE_NODETYPE sync and pruning selector (archive, full, light) -# - HIVE_FORK_HOMESTEAD block number of the DAO hard-fork transition -# - HIVE_FORK_DAO_BLOCK block number of the DAO hard-fork transition -# - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork -# - HIVE_FORK_TANGERINE block number of TangerineWhistle -# - HIVE_FORK_SPURIOUS block number of SpuriousDragon -# - HIVE_FORK_BYZANTIUM block number for Byzantium transition -# - HIVE_FORK_CONSTANTINOPLE block number for Constantinople transition -# - HIVE_FORK_PETERSBURG block number for ConstantinopleFix/PetersBurg transition -# - HIVE_FORK_ISTANBUL block number for Istanbul -# - HIVE_FORK_MUIRGLACIER block number for Muir Glacier -# - HIVE_FORK_BERLIN block number for Berlin -# - HIVE_FORK_LONDON block number for London -# -# Other: -# - HIVE_MINER address to credit with mining rewards (single thread) -# - HIVE_MINER_EXTRA extra-data field to set for newly minted blocks -# - HIVE_SKIP_POW If set, skip PoW verification during block import -# - HIVE_LOGLEVEL Simulator loglevel - -# Immediately abort the script on any error encountered -set -e - -# Log level. -LOG=2 -case "$HIVE_LOGLEVEL" in - 0|1) LOG=1 ;; # error - 2|3) LOG=2 ;; # info (default) - 4) LOG=3 ;; # debug - 5) LOG=4 ;; # trace -esac -FLAGS="-v $LOG" - -# Configure the chain. -# See http://www.ethdocs.org/en/latest/network/test-networks.html#custom-networks-eth -# for info about how it's configured -jq -f /mapper.jq /genesis.json > /config.json -echo -n "Chain config: "; cat /config.json - -FLAGS="$FLAGS --config /config.json" -ETHEXEC=/usr/bin/aleth -echo "Flags: $FLAGS" - -# Don't immediately abort, some imports are meant to fail -set +e - -if [ -f /chain.rlp ]; then - echo "Loading chain.rlp..." - echo "Command: $ETHEXEC $FLAGS --import /chain.rlp" - $ETHEXEC $FLAGS --import /chain.rlp -fi - -# Load the remainder of the test chain -if [ -d /blocks ]; then - echo "Loading remaining individual blocks..." - for block in `ls /blocks | sort -n`; do - echo "Command: aleth $FLAGS --import /blocks/$block" - $ETHEXEC $FLAGS --import /blocks/$block - #valgrind --leak-check=yes $ETHEXEC $FLAGS import /blocks/$block - #gdb -q -n -ex r -ex bt --args eth $FLAGS import /blocks/$block - done -fi - -# Configure peer-to-peer networking. -if [ "$HIVE_BOOTNODE" != "" ]; then - FLAGS="$FLAGS --peerset required:$HIVE_BOOTNODE" -else - FLAGS="$FLAGS --no-bootstrap" -fi -if [ "$HIVE_NETWORK_ID" != "" ]; then - FLAGS="$FLAGS --network-id $HIVE_NETWORK_ID" -fi - -# Configure mining -if [ "$HIVE_MINER" != "" ]; then - FLAGS="$FLAGS --mining --address $HIVE_MINER" -fi -if [ "$HIVE_MINER_EXTRA" != "" ]; then - FLAGS="$FLAGS --extradata $HIVE_MINER_EXTRA" -fi - -echo "Running Aleth..." -# FLAGS="$FLAGS --allow-local-discovery" -RUNCMD="python3 /usr/bin/aleth.py --rpc http://0.0.0.0:8545 --aleth-exec $ETHEXEC $FLAGS" -echo "cmd: $RUNCMD" -$RUNCMD diff --git a/clients/aleth/config-example.json b/clients/aleth/config-example.json deleted file mode 100644 index 08add75e0d..0000000000 --- a/clients/aleth/config-example.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "sealEngine": "Ethash", - "params": { - "accountStartNonce": "0x00", - "homesteadForkBlock": "0x118c30", - "daoHardforkBlock": "0x1d4c00", - "EIP150ForkBlock": "0x259518", - "EIP158ForkBlock": "0x28d138", - "byzantiumForkBlock": "0xffffff", - "constantinopleForkBlock": "0xffffff", - "networkID" : "0x01", - "chainID": "0x01", - "maximumExtraDataSize": "0x20", - "tieBreakingGas": false, - "minGasLimit": "0x1388", - "maxGasLimit": "7fffffffffffffff", - "gasLimitBoundDivisor": "0x0400", - "minimumDifficulty": "0x020000", - "difficultyBoundDivisor": "0x0800", - "durationLimit": "0x0d", - "blockReward": "0x4563918244F40000", - "registrar" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b" - }, - "accounts": { - "0000000000000000000000000000000000000001": { "precompiled": { "name": "ecrecover", "linear": { "base": 3000, "word": 0 } } }, - "0000000000000000000000000000000000000002": { "precompiled": { "name": "sha256", "linear": { "base": 60, "word": 12 } } }, - "0000000000000000000000000000000000000003": { "precompiled": { "name": "ripemd160", "linear": { "base": 600, "word": 120 } } }, - "0000000000000000000000000000000000000004": { "precompiled": { "name": "identity", "linear": { "base": 15, "word": 3 } } } - } -} diff --git a/clients/aleth/enode.sh b/clients/aleth/enode.sh deleted file mode 100644 index 0efa322722..0000000000 --- a/clients/aleth/enode.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Script to retrieve the enode -# -# This is copied into the validator container by Hive -# and used to provide a client-specific enode id retriever -# - -# Immediately abort the script on any error encountered -set -e - -sleep 1 -TARGET_RESPONSE=$(curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' "localhost:8545" ) - - -TARGET_ENODE=$(echo ${TARGET_RESPONSE}| jq -r '.result.enode') -echo "$TARGET_ENODE" \ No newline at end of file diff --git a/clients/aleth/genesis.json b/clients/aleth/genesis.json deleted file mode 100644 index 7ca6f39f73..0000000000 --- a/clients/aleth/genesis.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", - "difficulty" : "0x020000", - "extraData" : "0x42", - "gasLimit" : "0x2fefd8", - "mixHash" : "0x2c85bcbce56429100b2108254bb56906257582aeafcbd682bc9af67a9f5aee46", - "nonce" : "0x78cc16f7b4f65485", - "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", - "timestamp" : "0x54c98c81", - "alloc" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { - "balance" : "0x09184e72a000" - } - } -} diff --git a/clients/aleth/mapper.jq b/clients/aleth/mapper.jq deleted file mode 100644 index d4f7233ce4..0000000000 --- a/clients/aleth/mapper.jq +++ /dev/null @@ -1,144 +0,0 @@ -# Removes all empty keys and values in input. -def remove_empty: - . | walk( - if type == "object" then - with_entries( - select( - .value != null and - .value != "" and - .key != null and - .key != "" - ) - ) - else . - end - ) -; - -# Converts number to hex, from https://rosettacode.org/wiki/Non-decimal_radices/Convert#jq -def int_to_hex: - def stream: - recurse(if . > 0 then ./16|floor else empty end) | . % 16 ; - if . == 0 then "0x0" - else "0x" + ([stream] | reverse | .[1:] | map(if .<10 then 48+. else 87+. end) | implode) - end -; - -# Converts decimal number in string to hex. -def to_hex: - if . != null and startswith("0x") then . else - if (. != null and . != "") then .|tonumber|int_to_hex else . end - end -; - -# Zero-pads hex string. -def infix_zeros_to_length(s;l): - if . != null then - (.[0:s])+("0"*(l-(.|length)))+(.[s:l]) - else . - end -; - -# Removes 0x prefix from object keys. -def un0x_keys: - with_entries({key: .key|ltrimstr("0x"), value}) -; - -# This returns the known precompiles. -# -# Aleth doesn't like it when precompiles have code/storage/nonce -# so these fields need to be set to the empty string in order to -# override any such fields in the input genesis. The empty fields -# are then dropped in the final remove_empty pass. -def precompiles: - { - "0000000000000000000000000000000000000001": { - "precompiled": {"name": "ecrecover", "linear": {"base": 3000, "word": 0}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000002": { - "precompiled": {"name": "sha256", "linear": {"base": 60, "word": 12}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000003": { - "precompiled": {"name": "ripemd160", "linear": {"base": 600, "word": 120}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000004": { - "precompiled": {"name": "identity", "linear": {"base": 15, "word": 3}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000005": { - "precompiled": {"name": "modexp"}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000006": { - "precompiled": {"name": "alt_bn128_G1_add", "linear": {"base": 500, "word": 0}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000007": { - "precompiled": {"name": "alt_bn128_G1_mul", "linear": {"base": 40000, "word": 0}}, - "code": "", - "storage": "", - "nonce": "", - }, - "0000000000000000000000000000000000000008": { - "precompiled": {"name": "alt_bn128_pairing_product"}, - "code": "", - "storage": "", - "nonce": "", - }, - } -; - -{ - "sealEngine": (if env.HIVE_SKIP_POW then "NoProof" else "Ethash" end), - "params": { - # Fork configuration - "homesteadForkBlock": env.HIVE_FORK_HOMESTEAD|to_hex, - "daoHardforkBlock": env.HIVE_FORK_DAO_BLOCK|to_hex, - "EIP150ForkBlock": env.HIVE_FORK_TANGERINE|to_hex, - "EIP158ForkBlock": env.HIVE_FORK_SPURIOUS|to_hex, - "byzantiumForkBlock": env.HIVE_FORK_SPURIOUS|to_hex, - "constantinopleForkBlock": env.HIVE_FORK_CONSTANTINOPLE|to_hex, - "constantinopleFixForkBlock": env.HIVE_FORK_PETERSBURG|to_hex, - "istanbulForkBlock": env.HIVE_FORK_ISTANBUL|to_hex, - "muirGlacierForkBlock": env.HIVE_FORK_MUIR_GLACIER|to_hex, - - # Other chain parameters - "maximumExtraDataSize": "0x20", - "tieBreakingGas": false, - "minGasLimit": "0x0", - "gasLimitBoundDivisor": "0x400", - "minimumDifficulty": "0x20000", - "difficultyBoundDivisor": "0x800", - "durationLimit": "0x0d", - "blockReward": "0x4563918244F40000", - "registrar": "0x0000000000000000000000000000000000000000", - "networkID": env.HIVE_NETWORK_ID|to_hex, - "chainID": env.HIVE_CHAIN_ID|to_hex, - }, - "genesis": { - "nonce": .nonce|infix_zeros_to_length(2;18), - "mixHash": .mixHash, - "difficulty": .difficulty, - "author": .coinbase, - "timestamp": .timestamp, - "parentHash": .parentHash, - "extraData": .extraData, - "gasLimit": .gasLimit, - }, - "accounts": ((.alloc|un0x_keys) * precompiles), -}|remove_empty diff --git a/internal/libhive/inventory.go b/internal/libhive/inventory.go index 607a0cf9c6..b5ebbaf778 100644 --- a/internal/libhive/inventory.go +++ b/internal/libhive/inventory.go @@ -8,7 +8,7 @@ import ( "strings" ) -// branchDelimiter is what separates the client name from the branch, eg: aleth_nightly, go-ethereum_master. +// branchDelimiter is what separates the client name from the branch, eg: besu_nightly, go-ethereum_master. const branchDelimiter = "_" // SplitClientName returns the name and branch components of 'name'. diff --git a/test.sh b/test.sh index 9527c17584..c2fbeddc1b 100644 --- a/test.sh +++ b/test.sh @@ -60,7 +60,7 @@ mkdir $RESULTS # These three can succsessfully sync with themselves #testsync openethereum_latest #testsync go-ethereum_latest -testsync aleth_nightly,openethereum_latest,go-ethereum_latest +testsync openethereum_latest,go-ethereum_latest # These two are failing - even against themselves testsync besu_latest # fails @@ -70,7 +70,6 @@ testsync nethermind_latest # fails #testsync go-ethereum_latest go-ethereum_stable #testsync go-ethereum_latest openethereum_latest -#testsync go-ethereum_latest aleth_nightly #testsync go-ethereum_latest nethermind_latest #testsync go-ethereum_latest besu_latest @@ -89,7 +88,6 @@ testgraphql besu_latest # These take an extremely long time to run -#testconsensus aleth_nightly #testconsensus go-ethereum_latest #testconsensus openethereum_latest #testconsensus nethermind_latest