@@ -52,7 +52,7 @@ CURL_BINARY="$(command -v curl)" || { echo "Curl not installed. Aborting."; exit
52
52
JQ_BINARY=" $( command -v jq) " || { echo " jq not installed. Aborting." ; exit 1; }
53
53
54
54
OPTS=" ht:n:d:g"
55
- LONGOPTS=" help,preset:,nodes:,data-dir:,remote-validators-count:,threshold:,signer-nodes:,signer-type:,with-ganache,stop-at-epoch:,disable-htop,use-vc:,disable-vc,enable-payload-builder,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,base-vc-metrics-port:,base-vc-keymanager-port:,base-remote-signer-port:,base-remote-signer-metrics-port:,base-el-net-port:,base-el-rpc-port:,base-el-ws-port:,base-el-auth-rpc-port:,el-port-offset:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:,run-geth,dl-geth,dl-nimbus-eth1,dl-nimbus-eth2,light-clients:,run-nimbus-eth1,verbose,altair -fork-epoch:,bellatrix-fork-epoch:,capella-fork-epoch:,deneb -fork-epoch:"
55
+ LONGOPTS=" help,preset:,nodes:,data-dir:,remote-validators-count:,threshold:,signer-nodes:,signer-type:,with-ganache,stop-at-epoch:,disable-htop,use-vc:,disable-vc,enable-payload-builder,enable-logtrace,log-level:,base-port:,base-rest-port:,base-metrics-port:,base-vc-metrics-port:,base-vc-keymanager-port:,base-remote-signer-port:,base-remote-signer-metrics-port:,base-el-net-port:,base-el-rpc-port:,base-el-ws-port:,base-el-auth-rpc-port:,el-port-offset:,reuse-existing-data-dir,reuse-binaries,timeout:,kill-old-processes,eth2-docker-image:,lighthouse-vc-nodes:,run-geth,dl-geth,dl-nimbus-eth1,dl-nimbus-eth2,light-clients:,run-nimbus-eth1,verbose,deneb -fork-epoch:,electra -fork-epoch:"
56
56
57
57
# default values
58
58
BINARIES=" "
@@ -103,8 +103,8 @@ DL_GETH="0"
103
103
: ${NIMBUS_ETH2_REVISION:= 6c0d756d}
104
104
105
105
: ${BEACON_NODE_COMMAND:= " ./build/nimbus_beacon_node$EXE_EXTENSION " }
106
- : ${CAPELLA_FORK_EPOCH := 0}
107
- : ${DENEB_FORK_EPOCH := 50 }
106
+ : ${DENEB_FORK_EPOCH := 0}
107
+ : ${ELECTRA_FORK_EPOCH := 5000 }
108
108
109
109
# NIMBUS EL VARS
110
110
RUN_NIMBUS_ETH1=" 0"
@@ -212,10 +212,6 @@ while true; do
212
212
CONST_PRESET=" $2 "
213
213
shift 2
214
214
;;
215
- --capella-fork-epoch)
216
- CAPELLA_FORK_EPOCH=" $2 "
217
- shift 2
218
- ;;
219
215
--deneb-fork-epoch)
220
216
DENEB_FORK_EPOCH=" $2 "
221
217
shift 2
826
822
GENESIS_OFFSET=60 # See `Scheduling first slot action` > `startTime`
827
823
NOW_UNIX_TIMESTAMP=$( date +%s)
828
824
GENESIS_TIME=$(( NOW_UNIX_TIMESTAMP + GENESIS_OFFSET))
829
- SHANGHAI_FORK_TIME=$(( GENESIS_TIME + SECONDS_PER_SLOT * SLOTS_PER_EPOCH * CAPELLA_FORK_EPOCH ))
825
+ SHANGHAI_FORK_TIME=${ GENESIS_TIME}
830
826
CANCUN_FORK_TIME=$(( GENESIS_TIME + SECONDS_PER_SLOT * SLOTS_PER_EPOCH * DENEB_FORK_EPOCH))
827
+ PRAGUE_FORK_TIME=$(( GENESIS_TIME + SECONDS_PER_SLOT * SLOTS_PER_EPOCH * ELECTRA_FORK_EPOCH))
831
828
832
829
EXECUTION_GENESIS_JSON=" ${DATA_DIR} /execution_genesis.json"
833
830
EXECUTION_GENESIS_BLOCK_JSON=" ${DATA_DIR} /execution_genesis_block.json"
@@ -836,7 +833,7 @@ EXECUTION_GENESIS_BLOCK_JSON="${DATA_DIR}/execution_genesis_block.json"
836
833
# currently hard-codes some merkle branches that won't match the random deposits generated
837
834
# by this simulation. This doesn't happen to produce problems only by accident. If we enable
838
835
# the `deposit_root` safety-checks in the deposit downloader, it will detect the discrepancy.
839
- sed " s/SHANGHAI_FORK_TIME/${SHANGHAI_FORK_TIME} /g; s/CANCUN_FORK_TIME/${CANCUN_FORK_TIME} /g" \
836
+ sed " s/SHANGHAI_FORK_TIME/${SHANGHAI_FORK_TIME} /g; s/CANCUN_FORK_TIME/${CANCUN_FORK_TIME} /g; s/PRAGUE_FORK_TIME/ ${PRAGUE_FORK_TIME} /g " \
840
837
" ${SCRIPTS_DIR} /execution_genesis.json.template" > " $EXECUTION_GENESIS_JSON "
841
838
842
839
DEPOSIT_CONTRACT_ADDRESS=" 0x4242424242424242424242424242424242424242"
904
901
--netkey-file=$CONTAINER_BOOTSTRAP_NETWORK_KEYFILE \
905
902
--insecure-netkey-password=true \
906
903
--genesis-time=$GENESIS_TIME \
907
- --capella-fork-epoch=$CAPELLA_FORK_EPOCH \
904
+ --capella-fork-epoch=0 \
908
905
--deneb-fork-epoch=$DENEB_FORK_EPOCH \
906
+ --electra-fork-epoch=$ELECTRA_FORK_EPOCH \
909
907
--execution-genesis-block=" $EXECUTION_GENESIS_BLOCK_JSON "
910
908
911
909
DIRECTPEER_ENR=$(
@@ -919,8 +917,8 @@ DIRECTPEER_ENR=$(
919
917
)
920
918
921
919
./scripts/make_prometheus_config.sh \
922
- --nodes ${NUM_NODES} \
923
- --base-metrics-port ${BASE_METRICS_PORT} \
920
+ --nodes " ${NUM_NODES} " \
921
+ --base-metrics-port " ${BASE_METRICS_PORT} " \
924
922
--config-file " ${DATA_DIR} /prometheus.yml" || true # TODO: this currently fails on macOS,
925
923
# but it can be considered non-critical
926
924
@@ -936,8 +934,9 @@ DEPOSIT_CONTRACT_ADDRESS: ${DEPOSIT_CONTRACT_ADDRESS}
936
934
ETH1_FOLLOW_DISTANCE: 1
937
935
ALTAIR_FORK_EPOCH: 0
938
936
BELLATRIX_FORK_EPOCH: 0
939
- CAPELLA_FORK_EPOCH: ${CAPELLA_FORK_EPOCH}
937
+ CAPELLA_FORK_EPOCH: 0
940
938
DENEB_FORK_EPOCH: ${DENEB_FORK_EPOCH}
939
+ ELECTRA_FORK_EPOCH: ${ELECTRA_FORK_EPOCH}
941
940
TERMINAL_TOTAL_DIFFICULTY: 0
942
941
EOF
943
942
@@ -1046,7 +1045,7 @@ for NUM_NODE in $(seq 1 $NUM_NODES); do
1046
1045
fi
1047
1046
done
1048
1047
1049
- for NUM_LC in $( seq 1 $ LC_NODES) ; do
1048
+ for NUM_LC in $( seq 1 " ${ LC_NODES} " ) ; do
1050
1049
LC_DATA_DIR=" ${DATA_DIR} /lc${NUM_LC} "
1051
1050
rm -rf " ${LC_DATA_DIR} "
1052
1051
scripts/makedir.sh " ${LC_DATA_DIR} " 2>&1
1085
1084
# give each node time to load keys
1086
1085
sleep 10
1087
1086
1088
- for NUM_NODE in $( seq 1 $ NUM_NODES) ; do
1087
+ for NUM_NODE in $( seq 1 " ${ NUM_NODES} " ) ; do
1089
1088
NODE_DATA_DIR=" ${DATA_DIR} /node${NUM_NODE} "
1090
1089
CONTAINER_NODE_DATA_DIR=" ${CONTAINER_DATA_DIR} /node${NUM_NODE} "
1091
1090
VALIDATOR_DATA_DIR=" ${DATA_DIR} /validator${NUM_NODE} "
@@ -1137,7 +1136,7 @@ for NUM_NODE in $(seq 1 $NUM_NODES); do
1137
1136
--max-peers=$(( NUM_NODES + LC_NODES - 1 )) \
1138
1137
--data-dir=" ${CONTAINER_NODE_DATA_DIR} " \
1139
1138
${BOOTSTRAP_ARG} \
1140
- --jwt-secret=${JWT_FILE} \
1139
+ --jwt-secret=" ${JWT_FILE} " \
1141
1140
" ${WEB3_ARG[@]} " \
1142
1141
--payload-builder=${USE_PAYLOAD_BUILDER} \
1143
1142
--payload-builder-url=" http://${PAYLOAD_BUILDER_HOST} :${PAYLOAD_BUILDER_PORT} " \
@@ -1241,7 +1240,7 @@ if [ "$LC_NODES" -ge "1" ]; then
1241
1240
LC_TRUSTED_BLOCK_ROOT=" $(
1242
1241
" ${CURL_BINARY} " -s " http://localhost:${BASE_REST_PORT} /eth/v1/beacon/headers/finalized" | \
1243
1242
" ${JQ_BINARY} " -r ' .data.root' ) "
1244
- for NUM_LC in $( seq 1 $ LC_NODES) ; do
1243
+ for NUM_LC in $( seq 1 " ${ LC_NODES} " ) ; do
1245
1244
LC_DATA_DIR=" ${DATA_DIR} /lc${NUM_LC} "
1246
1245
1247
1246
WEB3_ARG=()
@@ -1297,18 +1296,18 @@ if [[ "$USE_HTOP" == "1" ]]; then
1297
1296
else
1298
1297
FAILED=0
1299
1298
for PID in $( echo " $PIDS_TO_WAIT " | tr ' ,' ' ' ) ; do
1300
- wait " $PID " || FAILED=" $(( FAILED += 1 )) "
1301
- echo $ PID has completed
1299
+ wait " ${ PID} " || FAILED=" $(( FAILED += 1 )) "
1300
+ echo " ${ PID} " has completed
1302
1301
done
1303
1302
if [[ " $FAILED " != " 0" ]]; then
1304
1303
echo " ${FAILED} child processes had non-zero exit codes (or exited early)."
1305
1304
dump_logs
1306
1305
dump_logtrace
1307
1306
if [[ " ${TIMEOUT_DURATION} " != " 0" ]]; then
1308
1307
if uname | grep -qiE " mingw|msys" ; then
1309
- taskkill //F //PID ${WATCHER_PID}
1308
+ taskkill //F //PID " ${WATCHER_PID} "
1310
1309
else
1311
- pkill -HUP -P ${WATCHER_PID}
1310
+ pkill -HUP -P " ${WATCHER_PID} "
1312
1311
fi
1313
1312
fi
1314
1313
exit 1
@@ -1319,9 +1318,9 @@ dump_logtrace
1319
1318
1320
1319
if [[ " ${TIMEOUT_DURATION} " != " 0" ]]; then
1321
1320
if uname | grep -qiE " mingw|msys" ; then
1322
- taskkill //F //PID ${WATCHER_PID}
1321
+ taskkill //F //PID " ${WATCHER_PID} "
1323
1322
else
1324
- pkill -HUP -P ${WATCHER_PID}
1323
+ pkill -HUP -P " ${WATCHER_PID} "
1325
1324
fi
1326
1325
fi
1327
1326
0 commit comments