Fix for latest genesis generator.
This commit is contained in:
parent
aed384e3d5
commit
ff8c91a692
@ -1,7 +1,7 @@
|
|||||||
FROM skylenet/ethereum-genesis-generator AS ethgen
|
FROM skylenet/ethereum-genesis-generator AS ethgen
|
||||||
|
|
||||||
FROM cerc/go-ethereum:local
|
FROM cerc/go-ethereum:local
|
||||||
RUN apk add --no-cache python3 py3-pip curl wget jq build-base gettext libintl openssl bash
|
RUN apk add --no-cache python3 python3-dev py3-pip curl wget jq build-base gettext libintl openssl bash
|
||||||
|
|
||||||
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/eth2-testnet-genesis
|
COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/eth2-testnet-genesis
|
||||||
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
|
COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
|
||||||
|
@ -12,6 +12,6 @@ if len(sys.argv) > 1:
|
|||||||
with open(testnet_config_path) as stream:
|
with open(testnet_config_path) as stream:
|
||||||
data = yaml.safe_load(stream)
|
data = yaml.safe_load(stream)
|
||||||
|
|
||||||
for key, value in data['eth1_premine'].items():
|
for key, value in data['el_premine'].items():
|
||||||
acct = w3.eth.account.from_mnemonic(data['mnemonic'], account_path=key, passphrase='')
|
acct = w3.eth.account.from_mnemonic(data['mnemonic'], account_path=key, passphrase='')
|
||||||
print("%s,%s,%s" % (key, acct.address, acct.key.hex()))
|
print("%s,%s,%s" % (key, acct.address, acct.key.hex()))
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
# See: https://github.com/skylenet/ethereum-genesis-generator/blob/master/entrypoint.sh
|
# See: https://github.com/skylenet/ethereum-genesis-generator/blob/master/entrypoint.sh
|
||||||
|
|
||||||
@ -8,5 +9,7 @@ mkdir -p ../build/el
|
|||||||
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
|
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
|
||||||
envsubst < el-config.yaml > $tmp_dir/genesis-config.yaml
|
envsubst < el-config.yaml > $tmp_dir/genesis-config.yaml
|
||||||
|
|
||||||
python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml > ../build/el/geth.json
|
ttd=`cat $tmp_dir/genesis-config.yaml | grep terminal_total_difficulty | awk '{ print $2 }'`
|
||||||
|
|
||||||
|
python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | jq ".config.terminalTotalDifficulty=$ttd" > ../build/el/geth.json
|
||||||
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
mnemonic: "viable ketchup woman library opinion copy rhythm attend rose knock penalty practice photo bundle budget dentist enter round bind holiday useful arch danger lobster"
|
mnemonic: "viable ketchup woman library opinion copy rhythm attend rose knock penalty practice photo bundle budget dentist enter round bind holiday useful arch danger lobster"
|
||||||
eth1_premine:
|
el_premine:
|
||||||
"m/44'/60'/0'/0/0": 10000000ETH
|
"m/44'/60'/0'/0/0": 10000000ETH
|
||||||
"m/44'/60'/0'/0/1": 10000000ETH
|
"m/44'/60'/0'/0/1": 10000000ETH
|
||||||
"m/44'/60'/0'/0/2": 10000000ETH
|
"m/44'/60'/0'/0/2": 10000000ETH
|
||||||
"m/44'/60'/0'/0/3": 10000000ETH
|
"m/44'/60'/0'/0/3": 10000000ETH
|
||||||
"m/44'/60'/0'/0/4": 10000000ETH
|
"m/44'/60'/0'/0/4": 10000000ETH
|
||||||
"m/44'/60'/0'/0/5": 10000000ETH
|
"m/44'/60'/0'/0/5": 10000000ETH
|
||||||
eth1_premine_addrs: {}
|
el_premine_addrs: {}
|
||||||
chain_id: 1212
|
chain_id: 1212
|
||||||
deposit_contract_address: "0x1212121212121212121212121212121212121212"
|
deposit_contract_address: "0x1212121212121212121212121212121212121212"
|
||||||
eth1_genesis_timestamp: 0
|
genesis_timestamp: 0
|
||||||
terminal_total_difficulty: 10000000
|
terminal_total_difficulty: 1000
|
||||||
mergeForkBlock: 100
|
|
||||||
|
|
||||||
clique:
|
clique:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
@ -27,8 +27,8 @@ GENESIS_DELAY=${GENESIS_DELAY:-0}
|
|||||||
BOOTNODE_PORT=${BOOTNODE_PORT:-4242}
|
BOOTNODE_PORT=${BOOTNODE_PORT:-4242}
|
||||||
|
|
||||||
# Hard fork configuration
|
# Hard fork configuration
|
||||||
ALTAIR_FORK_EPOCH=${ALTAIR_FORK_EPOCH:-1}
|
ALTAIR_FORK_EPOCH=${ALTAIR_FORK_EPOCH:-0}
|
||||||
MERGE_FORK_EPOCH=${MERGE_FORK_EPOCH:-2}
|
MERGE_FORK_EPOCH=${MERGE_FORK_EPOCH:-0}
|
||||||
|
|
||||||
# Spec version (mainnet or minimal)
|
# Spec version (mainnet or minimal)
|
||||||
SPEC_PRESET=${SPEC_PRESET:-mainnet}
|
SPEC_PRESET=${SPEC_PRESET:-mainnet}
|
||||||
@ -44,10 +44,11 @@ VC_ARGS=${VC_ARGS:-""}
|
|||||||
|
|
||||||
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551}
|
||||||
|
|
||||||
|
ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"}
|
||||||
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"}
|
||||||
|
|
||||||
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_CONFIG_YAML | grep 'chain_id' | awk '{ print $2 }'`}
|
ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`}
|
||||||
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_CONFIG_YAML | grep 'terminal_total_difficulty' | awk '{ print $2 }'`}
|
ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`}
|
||||||
ETH1_DEPOSIT_CONTRACT_ADDRESS=${ETH1_DEPOSIT_CONTRACT_ADDRESS:-`cat $ETH1_CONFIG_YAML | grep 'deposit_contract_address' | awk '{ print $2 }' | sed 's/"//g'`}
|
ETH1_DEPOSIT_CONTRACT_ADDRESS=${ETH1_DEPOSIT_CONTRACT_ADDRESS:-`cat $ETH1_CONFIG_YAML | grep 'deposit_contract_address' | awk '{ print $2 }' | sed 's/"//g'`}
|
||||||
ETH1_DEPOSIT_CONTRACT_BLOCK=${ETH1_DEPOSIT_CONTRACT_BLOCK:-0x0}
|
ETH1_DEPOSIT_CONTRACT_BLOCK=${ETH1_DEPOSIT_CONTRACT_BLOCK:-0x0}
|
||||||
SUGGESTED_FEE_RECIPIENT=`cat ../build/el/accounts.csv | head -1 | cut -d',' -f2`
|
SUGGESTED_FEE_RECIPIENT=`cat ../build/el/accounts.csv | head -1 | cut -d',' -f2`
|
||||||
|
@ -9,14 +9,14 @@ if [ "true" == "$RUN_BOOTNODE" ]; then
|
|||||||
./bootnode.sh 2>&1 | tee /var/log/lighthouse_bootnode.log
|
./bootnode.sh 2>&1 | tee /var/log/lighthouse_bootnode.log
|
||||||
else
|
else
|
||||||
while [ 1 -eq 1 ]; do
|
while [ 1 -eq 1 ]; do
|
||||||
echo "Waiting on DAG ..."
|
echo "Waiting on geth ..."
|
||||||
sleep 5
|
sleep 5
|
||||||
result=`wget --no-check-certificate --quiet \
|
result=`wget --no-check-certificate --quiet \
|
||||||
-O - \
|
-O - \
|
||||||
--method POST \
|
--method POST \
|
||||||
--timeout=0 \
|
--timeout=0 \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--body-data '{ "jsonrpc": "2.0", "id": 1, "method": "eth_getBlockByNumber", "params": ["0x3", false] }' "${ETH1_ENDPOINT:-localhost:8545}" | jq -r '.result'`
|
--body-data '{ "jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": [] }' "${ETH1_ENDPOINT:-localhost:8545}" | jq -r '.result'`
|
||||||
if [ ! -z "$result" ] && [ "null" != "$result" ]; then
|
if [ ! -z "$result" ] && [ "null" != "$result" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
STATUSES=("geth to begin mining" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge")
|
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge")
|
||||||
STATUS=0
|
STATUS=0
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user