diff --git a/clients/openethereum/Dockerfile b/clients/openethereum/Dockerfile deleted file mode 100644 index c78d90d3ef..0000000000 --- a/clients/openethereum/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# This dockerfile builds OpenEthereum for Hive. -ARG tag=latest -ARG baseimage=openethereum/openethereum - -# The runner script needs a tool to convert raw private keys -# to keystore files. We use the ethkey tool from geth for this. -FROM ethereum/client-go:alltools-latest AS keytool-builder - -# Now pull OpenEthereum. -FROM $baseimage:$tag -USER root - -# Copy keystore tool. -COPY --from=keytool-builder /usr/local/bin/ethkey /ethkey - -# Install additional tools. -RUN apk add --no-cache bash bc jq curl - -ADD openethereum.sh /openethereum.sh -RUN chmod +x /openethereum.sh -ADD mapper.jq /mapper.jq - -# Inject the enode id retriever script -RUN mkdir /hive-bin -ADD enode.sh /hive-bin/enode.sh -RUN chmod +x /hive-bin/enode.sh - -# Add dummy /version.json -RUN ./openethereum --version > /raw_version.txt -RUN head -n 2 /raw_version.txt | tail -1 > /version.txt -RUN sed -i 's/\//g' /version.txt -RUN sed -i 's/^[[:space:]]*//' /version.txt - -# Export the usual networking ports to allow outside access to the node -EXPOSE 8545 8547 30303 30303/udp - -# Add default genesis.json -ADD genesis.json /genesis.json -RUN chmod 777 /genesis.json - -ENTRYPOINT ["/openethereum.sh"] diff --git a/clients/openethereum/chain.json b/clients/openethereum/chain.json deleted file mode 100644 index de5978955d..0000000000 --- a/clients/openethereum/chain.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "name": "Hive", - "engine": { - "Ethash": { - "params": { - "minimumDifficulty": "0x020000", - "blockReward": { - "0": "0x4563918244F40000" - }, - "difficultyBombDelays": {}, - "difficultyBoundDivisor": "0x0800", - "durationLimit": "0x0d", - "daoHardforkBeneficiary": "0xbf4ed7b27f1d666546e30d74d50d173d20bca754", - "daoHardforkAccounts": [ - "0xd4fe7bc31cedb7bfb8a345f31e668033056b2728", - "0xb3fb0e5aba0e20e5c49d252dfd30e102b171a425", - "0x2c19c7f9ae8b751e37aeb2d93a699722395ae18f", - "0xecd135fa4f61a655311e86238c92adcd779555d2", - "0x1975bd06d486162d5dc297798dfc41edd5d160a7", - "0xa3acf3a1e16b1d7c315e23510fdd7847b48234f6", - "0x319f70bab6845585f412ec7724b744fec6095c85", - "0x06706dd3f2c9abf0a21ddcc6941d9b86f0596936", - "0x5c8536898fbb74fc7445814902fd08422eac56d0", - "0x6966ab0d485353095148a2155858910e0965b6f9", - "0x779543a0491a837ca36ce8c635d6154e3c4911a6", - "0x2a5ed960395e2a49b1c758cef4aa15213cfd874c", - "0x5c6e67ccd5849c0d29219c4f95f1a7a93b3f5dc5", - "0x9c50426be05db97f5d64fc54bf89eff947f0a321", - "0x200450f06520bdd6c527622a273333384d870efb", - "0xbe8539bfe837b67d1282b2b1d61c3f723966f049", - "0x6b0c4d41ba9ab8d8cfb5d379c69a612f2ced8ecb", - "0xf1385fb24aad0cd7432824085e42aff90886fef5", - "0xd1ac8b1ef1b69ff51d1d401a476e7e612414f091", - "0x8163e7fb499e90f8544ea62bbf80d21cd26d9efd", - "0x51e0ddd9998364a2eb38588679f0d2c42653e4a6", - "0x627a0a960c079c21c34f7612d5d230e01b4ad4c7", - "0xf0b1aa0eb660754448a7937c022e30aa692fe0c5", - "0x24c4d950dfd4dd1902bbed3508144a54542bba94", - "0x9f27daea7aca0aa0446220b98d028715e3bc803d", - "0xa5dc5acd6a7968a4554d89d65e59b7fd3bff0f90", - "0xd9aef3a1e38a39c16b31d1ace71bca8ef58d315b", - "0x63ed5a272de2f6d968408b4acb9024f4cc208ebf", - "0x6f6704e5a10332af6672e50b3d9754dc460dfa4d", - "0x77ca7b50b6cd7e2f3fa008e24ab793fd56cb15f6", - "0x492ea3bb0f3315521c31f273e565b868fc090f17", - "0x0ff30d6de14a8224aa97b78aea5388d1c51c1f00", - "0x9ea779f907f0b315b364b0cfc39a0fde5b02a416", - "0xceaeb481747ca6c540a000c1f3641f8cef161fa7", - "0xcc34673c6c40e791051898567a1222daf90be287", - "0x579a80d909f346fbfb1189493f521d7f48d52238", - "0xe308bd1ac5fda103967359b2712dd89deffb7973", - "0x4cb31628079fb14e4bc3cd5e30c2f7489b00960c", - "0xac1ecab32727358dba8962a0f3b261731aad9723", - "0x4fd6ace747f06ece9c49699c7cabc62d02211f75", - "0x440c59b325d2997a134c2c7c60a8c61611212bad", - "0x4486a3d68fac6967006d7a517b889fd3f98c102b", - "0x9c15b54878ba618f494b38f0ae7443db6af648ba", - "0x27b137a85656544b1ccb5a0f2e561a5703c6a68f", - "0x21c7fdb9ed8d291d79ffd82eb2c4356ec0d81241", - "0x23b75c2f6791eef49c69684db4c6c1f93bf49a50", - "0x1ca6abd14d30affe533b24d7a21bff4c2d5e1f3b", - "0xb9637156d330c0d605a791f1c31ba5890582fe1c", - "0x6131c42fa982e56929107413a9d526fd99405560", - "0x1591fc0f688c81fbeb17f5426a162a7024d430c2", - "0x542a9515200d14b68e934e9830d91645a980dd7a", - "0xc4bbd073882dd2add2424cf47d35213405b01324", - "0x782495b7b3355efb2833d56ecb34dc22ad7dfcc4", - "0x58b95c9a9d5d26825e70a82b6adb139d3fd829eb", - "0x3ba4d81db016dc2890c81f3acec2454bff5aada5", - "0xb52042c8ca3f8aa246fa79c3feaa3d959347c0ab", - "0xe4ae1efdfc53b73893af49113d8694a057b9c0d1", - "0x3c02a7bc0391e86d91b7d144e61c2c01a25a79c5", - "0x0737a6b837f97f46ebade41b9bc3e1c509c85c53", - "0x97f43a37f595ab5dd318fb46e7a155eae057317a", - "0x52c5317c848ba20c7504cb2c8052abd1fde29d03", - "0x4863226780fe7c0356454236d3b1c8792785748d", - "0x5d2b2e6fcbe3b11d26b525e085ff818dae332479", - "0x5f9f3392e9f62f63b8eac0beb55541fc8627f42c", - "0x057b56736d32b86616a10f619859c6cd6f59092a", - "0x9aa008f65de0b923a2a4f02012ad034a5e2e2192", - "0x304a554a310c7e546dfe434669c62820b7d83490", - "0x914d1b8b43e92723e64fd0a06f5bdb8dd9b10c79", - "0x4deb0033bb26bc534b197e61d19e0733e5679784", - "0x07f5c1e1bc2c93e0402f23341973a0e043f7bf8a", - "0x35a051a0010aba705c9008d7a7eff6fb88f6ea7b", - "0x4fa802324e929786dbda3b8820dc7834e9134a2a", - "0x9da397b9e80755301a3b32173283a91c0ef6c87e", - "0x8d9edb3054ce5c5774a420ac37ebae0ac02343c6", - "0x0101f3be8ebb4bbd39a2e3b9a3639d4259832fd9", - "0x5dc28b15dffed94048d73806ce4b7a4612a1d48f", - "0xbcf899e6c7d9d5a215ab1e3444c86806fa854c76", - "0x12e626b0eebfe86a56d633b9864e389b45dcb260", - "0xa2f1ccba9395d7fcb155bba8bc92db9bafaeade7", - "0xec8e57756626fdc07c63ad2eafbd28d08e7b0ca5", - "0xd164b088bd9108b60d0ca3751da4bceb207b0782", - "0x6231b6d0d5e77fe001c2a460bd9584fee60d409b", - "0x1cba23d343a983e9b5cfd19496b9a9701ada385f", - "0xa82f360a8d3455c5c41366975bde739c37bfeb8a", - "0x9fcd2deaff372a39cc679d5c5e4de7bafb0b1339", - "0x005f5cee7a43331d5a3d3eec71305925a62f34b6", - "0x0e0da70933f4c7849fc0d203f5d1d43b9ae4532d", - "0xd131637d5275fd1a68a3200f4ad25c71a2a9522e", - "0xbc07118b9ac290e4622f5e77a0853539789effbe", - "0x47e7aa56d6bdf3f36be34619660de61275420af8", - "0xacd87e28b0c9d1254e868b81cba4cc20d9a32225", - "0xadf80daec7ba8dcf15392f1ac611fff65d94f880", - "0x5524c55fb03cf21f549444ccbecb664d0acad706", - "0x40b803a9abce16f50f36a77ba41180eb90023925", - "0xfe24cdd8648121a43a7c86d289be4dd2951ed49f", - "0x17802f43a0137c506ba92291391a8a8f207f487d", - "0x253488078a4edf4d6f42f113d1e62836a942cf1a", - "0x86af3e9626fce1957c82e88cbf04ddf3a2ed7915", - "0xb136707642a4ea12fb4bae820f03d2562ebff487", - "0xdbe9b615a3ae8709af8b93336ce9b477e4ac0940", - "0xf14c14075d6c4ed84b86798af0956deef67365b5", - "0xca544e5c4687d109611d0f8f928b53a25af72448", - "0xaeeb8ff27288bdabc0fa5ebb731b6f409507516c", - "0xcbb9d3703e651b0d496cdefb8b92c25aeb2171f7", - "0x6d87578288b6cb5549d5076a207456a1f6a63dc0", - "0xb2c6f0dfbb716ac562e2d85d6cb2f8d5ee87603e", - "0xaccc230e8a6e5be9160b8cdf2864dd2a001c28b6", - "0x2b3455ec7fedf16e646268bf88846bd7a2319bb2", - "0x4613f3bca5c44ea06337a9e439fbc6d42e501d0a", - "0xd343b217de44030afaa275f54d31a9317c7f441e", - "0x84ef4b2357079cd7a7c69fd7a37cd0609a679106", - "0xda2fef9e4a3230988ff17df2165440f37e8b1708", - "0xf4c64518ea10f995918a454158c6b61407ea345c", - "0x7602b46df5390e432ef1c307d4f2c9ff6d65cc97", - "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", - "0x807640a13483f8ac783c557fcdf27be11ea4ac7a" - ] - - } - } - }, - "params": { - "registrar": "", - "gasLimitBoundDivisor": "0x0400", - "accountStartNonce": "0x0", - "maxCodeSize": 24576, - "maximumExtraDataSize": "0x20", - "minGasLimit": "0x1388", - "networkID" : "0x1", - "eip98Transition": "0x7fffffffffffff", - "eip1014Transition": "0x7fffffffffffff", - "eip155Transition": "0x7fffffffffffffff", - "eip150Transition": "0x7fffffffffffffff", - "eip160Transition": "0x7fffffffffffffff", - "eip161abcTransition": "0x7fffffffffffffff", - "eip161dTransition": "0x7fffffffffffffff" - - }, - "nodes": [], - "accounts": { - "0000000000000000000000000000000000000001": { "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, - "0000000000000000000000000000000000000002": { "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, - "0000000000000000000000000000000000000003": { "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, - "0000000000000000000000000000000000000004": { "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } } - } -} diff --git a/clients/openethereum/enode.sh b/clients/openethereum/enode.sh deleted file mode 100644 index 85d4761a36..0000000000 --- a/clients/openethereum/enode.sh +++ /dev/null @@ -1,21 +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 - - -# This script errors at times, so we add a little sleep here to -# give the node some more time -sleep 1 -TARGET_RESPONSE=$(curl --data '{"method":"parity_enode","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST "localhost:8545" ) - - -TARGET_ENODE=$(echo ${TARGET_RESPONSE}| jq -r '.result') - -echo "$TARGET_ENODE" \ No newline at end of file diff --git a/clients/openethereum/genesis.json b/clients/openethereum/genesis.json deleted file mode 100644 index 7ca6f39f73..0000000000 --- a/clients/openethereum/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/openethereum/mapper.jq b/clients/openethereum/mapper.jq deleted file mode 100644 index 9a27d2d074..0000000000 --- a/clients/openethereum/mapper.jq +++ /dev/null @@ -1,248 +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 -; - -# This gives the consensus engine definition for the ethash engine. -def ethash_engine: - { - "Ethash": { - "params": { - "minimumDifficulty": "0x20000", - "difficultyBoundDivisor": "0x800", - "durationLimit": "0x0d", - "homesteadTransition": env.HIVE_FORK_HOMESTEAD|to_hex, - "eip100bTransition": env.HIVE_FORK_BYZANTIUM|to_hex, - "daoHardforkTransition": env.HIVE_FORK_DAO_BLOCK|to_hex, - "daoHardforkBeneficiary": "0xbf4ed7b27f1d666546e30d74d50d173d20bca754", - "blockReward": { - "0x0": "0x4563918244F40000", - (env.HIVE_FORK_BYZANTIUM|to_hex//""): "0x29A2241AF62C0000", - (env.HIVE_FORK_CONSTANTINOPLE|to_hex//""): "0x1BC16D674EC80000", - }, - "difficultyBombDelays": { - (env.HIVE_FORK_BYZANTIUM|to_hex//""): 3000000, - (env.HIVE_FORK_CONSTANTINOPLE|to_hex//""): 2000000, - (env.HIVE_FORK_MUIR_GLACIER|to_hex//""): 4000000, - (env.HIVE_FORK_LONDON|to_hex//""): 700000, - } - } - } - } -; - -# This gives the consensus engine definition for the clique PoA engine. -def clique_engine: - { - "clique": { - "params": { - "period": env.HIVE_CLIQUE_PERIOD|tonumber, - "epoch": 30000, - "blockReward": "0x0" - } - } - } -; - -{ - "name": "Hive", - "engine": (if env.HIVE_CLIQUE_PERIOD then clique_engine else ethash_engine end), - "genesis": { - "seal": { - "ethereum": { - "nonce": (.nonce|infix_zeros_to_length(2;18) // "0x0000000000000000"), - "mixHash": (.mixHash // "0x0000000000000000000000000000000000000000000000000000000000000000"), - }, - }, - "difficulty": .difficulty, - "author": .coinbase, - "timestamp": .timestamp, - "parentHash": .parentHash, - "extraData": .extraData, - "gasLimit": .gasLimit, - "baseFeePerGas": .baseFeePerGas, - }, - "params": { - # Tangerine Whistle - "eip150Transition": env.HIVE_FORK_TANGERINE|to_hex, - - # Spurious Dragon - "eip160Transition": env.HIVE_FORK_SPURIOUS|to_hex, - "eip161abcTransition": env.HIVE_FORK_SPURIOUS|to_hex, - "eip161dTransition": env.HIVE_FORK_SPURIOUS|to_hex, - "eip155Transition": env.HIVE_FORK_SPURIOUS|to_hex, - "maxCodeSizeTransition": env.HIVE_FORK_SPURIOUS|to_hex, - "maxCodeSize": "0x6000", - - # Byzantium - "eip140Transition": env.HIVE_FORK_BYZANTIUM|to_hex, - "eip211Transition": env.HIVE_FORK_BYZANTIUM|to_hex, - "eip214Transition": env.HIVE_FORK_BYZANTIUM|to_hex, - "eip658Transition": env.HIVE_FORK_BYZANTIUM|to_hex, - - # Constantinople - "eip145Transition": env.HIVE_FORK_CONSTANTINOPLE|to_hex, - "eip1014Transition": env.HIVE_FORK_CONSTANTINOPLE|to_hex, - "eip1052Transition": env.HIVE_FORK_CONSTANTINOPLE|to_hex, - - # Petersburg - "eip1283Transition": (if env.HIVE_FORK_ISTANBUL|to_hex == "0x0" then "0x0" else env.HIVE_FORK_CONSTANTINOPLE|to_hex end), - "eip1283DisableTransition": (if env.HIVE_FORK_ISTANBUL|to_hex == "0x0" then "0x0" else env.HIVE_FORK_PETERSBURG|to_hex end), - - # Istanbul - "eip1283ReenableTransition": env.HIVE_FORK_ISTANBUL|to_hex, - "eip1344Transition": env.HIVE_FORK_ISTANBUL|to_hex, - "eip1884Transition": env.HIVE_FORK_ISTANBUL|to_hex, - "eip2028Transition": env.HIVE_FORK_ISTANBUL|to_hex, - "eip1706Transition": env.HIVE_FORK_ISTANBUL|to_hex, - # "eip2200AdvanceTransition": env.HIVE_FORK_ISTANBUL|to_hex, - - # Berlin - "eip2929Transition": env.HIVE_FORK_BERLIN|to_hex, - "eip2930Transition": env.HIVE_FORK_BERLIN|to_hex, - - # London - "eip1559Transition": env.HIVE_FORK_LONDON|to_hex, - "eip3198Transition": env.HIVE_FORK_LONDON|to_hex, - "eip3541Transition": env.HIVE_FORK_LONDON|to_hex, - "eip3529Transition": env.HIVE_FORK_LONDON|to_hex, - "eip1559BaseFeeMaxChangeDenominator": "0x8", - "eip1559ElasticityMultiplier": "0x2", - "eip1559BaseFeeInitialValue": "0x3B9ACA00", - - # Other chain parameters. - "networkID": (env.HIVE_NETWORK_ID|to_hex // "0x539"), - "chainID": (env.HIVE_CHAIN_ID|to_hex // "0x539"), - "accountStartNonce": "0x0", - "maximumExtraDataSize": "0x20", - "minGasLimit": "0x0", - "gasLimitBoundDivisor": "0x400", - "registrar": "0x0000000000000000000000000000000000000000", - }, - "accounts": ((.alloc|with_entries(.key|="0x"+.)) * { - "0x0000000000000000000000000000000000000001": { - "builtin": { - "name": "ecrecover", - "pricing": {"linear": {"base": 3000, "word": 0}} - } - }, - "0x0000000000000000000000000000000000000002": { - "builtin": { - "name": "sha256", - "pricing": {"linear": {"base": 60, "word": 12}} - } - }, - "0x0000000000000000000000000000000000000003": { - "builtin": { - "name": "ripemd160", - "pricing": {"linear": {"base": 600, "word": 120}} - } - }, - "0x0000000000000000000000000000000000000004": { - "builtin": { - "name": "identity", - "pricing": {"linear": {"base": 15, "word": 3}} - } - }, - "0x0000000000000000000000000000000000000005": { - "builtin": { - "name": "modexp", - "pricing":{ - (env.HIVE_FORK_BYZANTIUM|to_hex // ""): { - "info": "EIP-198: Big integer modular exponentiation. Byzantium hardfork", - "price": {"modexp": {"divisor": 20}} - }, - (env.HIVE_FORK_BERLIN|to_hex // ""): { - "info": "EIP-2565: Big integer modular exponentiation. Berlin hardfork", - "price": {"modexp2565": {}} - } - } - } - }, - "0x0000000000000000000000000000000000000006": { - "builtin": { - "name": "alt_bn128_add", - "activate_at": (env.HIVE_FORK_BYZANTIUM|to_hex // "0x7fffffffffffff"), - "pricing": { - (env.HIVE_FORK_BYZANTIUM|to_hex // ""): { - "price": {"alt_bn128_const_operations": {"price": 500}} - }, - (env.HIVE_FORK_ISTANBUL|to_hex // ""): { - "price": {"alt_bn128_const_operations": {"price": 150}} - } - } - } - }, - "0x0000000000000000000000000000000000000007": { - "builtin": { - "name": "alt_bn128_mul", - "activate_at": (env.HIVE_FORK_BYZANTIUM|to_hex // "0x7fffffffffffff"), - "pricing": { - (env.HIVE_FORK_BYZANTIUM|to_hex // ""): { - "price": {"alt_bn128_const_operations": {"price": 40000}} - }, - (env.HIVE_FORK_ISTANBUL|to_hex // ""): { - "price": {"alt_bn128_const_operations": {"price": 6000}} - } - } - } - }, - "0x0000000000000000000000000000000000000008": { - "builtin": { - "name": "alt_bn128_pairing", - "activate_at": (env.HIVE_FORK_BYZANTIUM|to_hex // "0x7fffffffffffff"), - "pricing": { - (env.HIVE_FORK_BYZANTIUM|to_hex // ""): { - "price": {"alt_bn128_pairing": {"base": 100000, "pair": 80000}} - }, - (env.HIVE_FORK_ISTANBUL|to_hex // ""): { - "price": {"alt_bn128_pairing": {"base": 45000, "pair": 34000}} - } - } - } - }, - "0x0000000000000000000000000000000000000009": { - "builtin": { - "name": "blake2_f", - "activate_at": (env.HIVE_FORK_ISTANBUL|to_hex // "0x7fffffffffffff"), - "pricing": {"blake2_f": {"gas_per_round": 1}} - } - }, - }), -}|remove_empty diff --git a/clients/openethereum/openethereum.sh b/clients/openethereum/openethereum.sh deleted file mode 100644 index 8cba4709f3..0000000000 --- a/clients/openethereum/openethereum.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/bash - -# Startup script to initialize and boot a parity instance. -# -# This script assumes the following files: -# - `openethereum` binary is located in the filesystem root -# - `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_CHAIN_ID network ID number to use for the eth protocol -# - HIVE_NODETYPE sync and pruning selector (archive, full, light) -# - HIVE_SKIP_POW if set, skip PoW verification during block import -# -# Forks: -# -# - 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_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_BERLIN block number for Berlin transition -# -# Clique PoA: -# -# - HIVE_CLIQUE_PERIOD enables clique support. value is block time in seconds. -# - HIVE_CLIQUE_PRIVATEKEY private key for clique mining -# -# Other: -# -# - HIVE_MINER enables mining. value is coinbase address. -# - HIVE_MINER_EXTRA extra-data field to set for newly minted blocks -# - HIVE_SKIP_POW If set, skip PoW verification -# - HIVE_LOGLEVEL Client log level -# -# These variables are not supported by OpenEthereum: -# -# - 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 - -# Immediately abort the script on any error encountered -set -e - -# Configure and set the chain definition for the node -jq -f /mapper.jq /genesis.json > /chain.json -echo -n "Chain spec: " -cat /chain.json -echo "----------" - -OE="/home/openethereum/openethereum" -FLAGS="--chain /chain.json" - -LOG=info -case "$HIVE_LOGLEVEL" in - 0|1) LOG=error ;; - 2) LOG=warn ;; - 3) LOG=info ;; - 4|5) LOG=debug ;; - # OpenEthereum trace logging is INSANE, that's why it's disabled here. - # 5) LOG=trace ;; -esac -FLAGS="$FLAGS -l $LOG" - -# Disable PoW for import if set. -if [ "$HIVE_SKIP_POW" != "" ]; then - FLAGS="$FLAGS --no-seal-check" -fi - -# If a specific network ID is requested, use that -if [ "$HIVE_NETWORK_ID" != "" ]; then - FLAGS="$FLAGS --network-id $HIVE_NETWORK_ID" -else - FLAGS="$FLAGS --network-id 1337" -fi - -# Don't immediately abort, some imports are meant to fail -set +e - -# Load the test chain if present -echo "Loading initial blockchain..." -if [ -f /chain.rlp ]; then - $OE $FLAGS import /chain.rlp -fi - -# Load the remainder of the test chain -echo "Loading remaining individual blocks..." -if [ -d /blocks ]; then - for block in `ls /blocks | sort -n`; do - echo "openethereum $FLAGS import /blocks/$block" - $OE $FLAGS import /blocks/$block - done -fi - -# Immediately abort the script on any error encountered -set -e - -# Configure p2p networking. -FLAGS="$FLAGS --nat none" -if [ "$HIVE_BOOTNODE" != "" ]; then - FLAGS="$FLAGS --bootnodes $HIVE_BOOTNODE" -fi - -# Import clique private key. -if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then - echo "Importing clique private key..." - - # OpenEthereum does not support importing raw private keys directly. - # The private key needs to be turned into an encrypted keystore file first. - echo "$HIVE_CLIQUE_PRIVATEKEY" > /tmp/clique-key - echo "very secret" > /tmp/clique-key-password.txt - /ethkey generate --lightkdf --privatekey /tmp/clique-key --passwordfile /tmp/clique-key-password.txt /tmp/clique-key.json - - # Now we can import it. - $OE account import --chain /chain.json /tmp/clique-key.json - - # Set the password file flag so OE can decrypt the key later. - FLAGS="$FLAGS --password=/tmp/clique-key-password.txt" -fi - -# Configure mining. -if [ "$HIVE_MINER" != "" ]; then - if [ "$HIVE_CLIQUE_PERIOD" != "" ]; then - # Clique mining requested, set signer address. - FLAGS="$FLAGS --engine-signer $HIVE_MINER --force-sealing" - else - # PoW mining requested, run ethminer. - FLAGS="$FLAGS --author $HIVE_MINER" - ethminer --mining-threads 1 & - fi -fi -if [ "$HIVE_MINER_EXTRA" != "" ]; then - FLAGS="$FLAGS --extra-data $HIVE_MINER_EXTRA" -fi -FLAGS="$FLAGS --min-gas-price=16000000000" - -# Configure RPC. -FLAGS="$FLAGS --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all --ws-origins all --ws-interface all" - -# Disable eth price lookup. -FLAGS="$FLAGS --usd-per-eth 1" - -# Run OpenEthereum! -echo "running $OE $FLAGS" -$OE $FLAGS diff --git a/docs/clients.md b/docs/clients.md index e7a3bc956b..61ef4e3dc7 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -98,8 +98,8 @@ container: On startup, the entry point script must first load the genesis block and state into the client implementation from `/genesis.json`. To do this, the script needs to translate from Geth genesis format into a format appropriate for the specific client implementation. The -translation is usually done using a jq script. See the [openethereum genesis -translator][oe-genesis-jq], for example. +translation is usually done using a jq script. See the [go-ethereum genesis +translator][geth-genesis-jq], for example. After the genesis state, the client should import the blocks from `/chain.rlp` if it is present, and finally import the individual blocks from `/blocks` in file name order. The @@ -165,7 +165,7 @@ For the server role, the following additional variables should be supported: [LES]: https://github.com/ethereum/devp2p/blob/master/caps/les.md [geth-docker]: ../clients/go-ethereum/Dockerfile [hive-client-yaml]: ./commandline.md#client-build-parameters -[oe-genesis-jq]: ../clients/openethereum/mapper.jq +[geth-genesis-jq]: ../clients/go-ethereum/mapper.jq [EIP-155]: https://eips.ethereum.org/EIPS/eip-155 [EIP-606]: https://eips.ethereum.org/EIPS/eip-606 [EIP-607]: https://eips.ethereum.org/EIPS/eip-607 diff --git a/docs/commandline.md b/docs/commandline.md index d19c6e31bd..61af913d24 100644 --- a/docs/commandline.md +++ b/docs/commandline.md @@ -29,10 +29,10 @@ simulation, use the following command: ./hive --sim --client -For example, if you want to run the `discv4` test against geth and openethereum, here is +For example, if you want to run the `discv4` test against geth, here is how the command would look: - ./hive --sim devp2p --sim.limit discv4 --client go-ethereum,openethereum + ./hive --sim devp2p --sim.limit discv4 --client go-ethereum,nethermind The client list may contain any number of clients. You can select a specific client version by appending it to the client name with `_`, for example: diff --git a/docs/overview.md b/docs/overview.md index 6548467fde..e4661fedef 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -71,7 +71,7 @@ This section explains what happens during a simulation run. For a single run, the user provides the name of the simulator to run, and a set of client names to run against. For example: - ./hive --sim ethereum/sync --client go-ethereum,besu,openethereum + ./hive --sim ethereum/sync --client go-ethereum,besu,nethermind Hive first builds simulator and client images using docker. It expects a Dockerfile in the `./simulators/ethereum/sync` directory as well as a Dockerfile for each client (in diff --git a/docs/simulators.md b/docs/simulators.md index 4c464312f0..7acdaa492c 100644 --- a/docs/simulators.md +++ b/docs/simulators.md @@ -179,7 +179,7 @@ You can test this build by running `docker build .` in the simulator directory. Finally, go back to the root of the repository (`cd ../../..`) and run the simulation. - ./hive --sim my-simulation --client go-ethereum,openethereum + ./hive --sim my-simulation --client go-ethereum,besu You can check the results using [hiveview]. diff --git a/test.sh b/test.sh index 10c785f28e..4364d10210 100644 --- a/test.sh +++ b/test.sh @@ -57,10 +57,8 @@ mkdir $RESULTS # Sync are quick tests # -# These three can succsessfully sync with themselves -#testsync openethereum_latest +# These can succsessfully sync with themselves #testsync go-ethereum_latest -testsync openethereum_latest,go-ethereum_latest # These two are failing - even against themselves testsync besu_latest # fails @@ -69,7 +67,6 @@ testsync nethermind_latest # fails #testsync besu_latest,nethermind_latest #testsync go-ethereum_latest go-ethereum_stable -#testsync go-ethereum_latest openethereum_latest #testsync go-ethereum_latest nethermind_latest #testsync go-ethereum_latest besu_latest @@ -84,12 +81,10 @@ testgraphql besu_latest #testdevp2p go-ethereum_latest #testdevp2p nethermind_latest #testdevp2p besu_latest -#testdevp2p openethereum_latest # These take an extremely long time to run #testconsensus go-ethereum_latest -#testconsensus openethereum_latest #testconsensus nethermind_latest #testconsensus besu_latest