From cadb1aae1535ef212e34d0adde7404cdcb716078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Tue, 2 Feb 2021 19:02:52 +0100 Subject: [PATCH] bump submodules (#2279) * bump submodules * undo a couple of bumps (32-bit failure) * launch_local_testnet.sh: timeout and various fixes * undo nim-http-utils bump (breaks RPC for VC) --- Jenkinsfile | 8 ++--- scripts/launch_local_testnet.sh | 59 ++++++++++++++++++++++--------- vendor/karax | 2 +- vendor/nim-bearssl | 2 +- vendor/nim-chronos | 2 +- vendor/nim-json-rpc | 2 +- vendor/nim-protobuf-serialization | 2 +- vendor/nim-secp256k1 | 2 +- vendor/nim-sqlite3-abi | 2 +- vendor/nimbus-build-system | 2 +- 10 files changed, 55 insertions(+), 28 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 70a23d550..3283b4762 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,8 +40,8 @@ def runStages() { set -e make -j${env.NPROC} V=1 make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node - # Miracl fallback - # make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node + # Miracl fallback + # make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node """ } }, @@ -53,8 +53,8 @@ def runStages() { // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node sh """#!/bin/bash set -e - ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-rpc-port \$(( 7000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --discv5:no - ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-rpc-port \$(( 7000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --discv5:no + ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-rpc-port \$(( 7000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) --timeout 600 -- --verify-finalization --discv5:no + ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --stop-at-epoch 5 --log-level DEBUG --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-rpc-port \$(( 7000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) --timeout 2400 -- --verify-finalization --discv5:no """ } } diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index 70dc19c51..d226c8c7a 100755 --- a/scripts/launch_local_testnet.sh +++ b/scripts/launch_local_testnet.sh @@ -31,8 +31,8 @@ if [ ${PIPESTATUS[0]} != 4 ]; then exit 1 fi -OPTS="hgt:n:d:" -LONGOPTS="help,testnet:,nodes:,data-dir:,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rpc-port:,base-metrics-port:,with-ganache,reuse-existing-data-dir" +OPTS="ht:n:d:g" +LONGOPTS="help,testnet:,nodes:,data-dir:,with-ganache,stop-at-epoch:,disable-htop,disable-vc,enable-logtrace,log-level:,base-port:,base-rpc-port:,base-metrics-port:,reuse-existing-data-dir,timeout:" # default values TESTNET="1" @@ -48,6 +48,7 @@ BASE_RPC_PORT="7000" REUSE_EXISTING_DATA_DIR="0" ENABLE_LOGTRACE="0" STOP_AT_EPOCH_FLAG="" +TIMEOUT_DURATION="0" print_help() { cat </dev/null || true - pkill -P $$ nimbus_validator_client &>/dev/null || true + pkill -f -P $$ nimbus_beacon_node &>/dev/null || true + pkill -f -P $$ nimbus_validator_client &>/dev/null || true sleep 2 - pkill -9 -P $$ nimbus_beacon_node &>/dev/null || true - pkill -9 -P $$ nimbus_validator_client &>/dev/null || true + pkill -f -9 -P $$ nimbus_beacon_node &>/dev/null || true + pkill -f -9 -P $$ nimbus_validator_client &>/dev/null || true } trap 'cleanup' SIGINT SIGTERM EXIT @@ -401,7 +407,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do ${STOP_AT_EPOCH_FLAG} \ --data-dir="${VALIDATOR_DATA_DIR}" \ --rpc-port="$(( BASE_RPC_PORT + NUM_NODE ))" \ - > "${DATA_DIR}/log_val${NUM_NODE}.txt" 2>&1 & PIDS="${PIDS},$!" + > "${DATA_DIR}/log_val${NUM_NODE}.txt" 2>&1 & fi done @@ -415,6 +421,19 @@ if [[ "$BG_JOBS" != "$NUM_JOBS" ]]; then exit 1 fi +# timeout - implemented with a background job +timeout_reached() { + echo -e "\nTimeout reached. Aborting.\n" + cleanup +} +trap 'timeout_reached' SIGALRM + +if [[ "${TIMEOUT_DURATION}" != "0" ]]; then + export PARENT_PID=$$ + ( sleep ${TIMEOUT_DURATION} && kill -ALRM ${PARENT_PID} ) 2>/dev/null & WATCHER_PID=$! +fi + +# launch htop or wait for background jobs if [[ "$USE_HTOP" == "1" ]]; then htop -p "$PIDS" cleanup @@ -427,8 +446,16 @@ else echo "${FAILED} child processes had non-zero exit codes (or exited early)." dump_logs dump_logtrace + if [[ "${TIMEOUT_DURATION}" != "0" ]]; then + pkill -HUP -P ${WATCHER_PID} + fi exit 1 fi fi dump_logtrace + +if [[ "${TIMEOUT_DURATION}" != "0" ]]; then + pkill -HUP -P ${WATCHER_PID} +fi + diff --git a/vendor/karax b/vendor/karax index f1cd9e606..32de20284 160000 --- a/vendor/karax +++ b/vendor/karax @@ -1 +1 @@ -Subproject commit f1cd9e606d117bf387a1ddf9e71cafd02d10a50f +Subproject commit 32de202845762607a55332c2d138aca1327bf37b diff --git a/vendor/nim-bearssl b/vendor/nim-bearssl index ba5f46879..eebf730cc 160000 --- a/vendor/nim-bearssl +++ b/vendor/nim-bearssl @@ -1 +1 @@ -Subproject commit ba5f4687987817902c2727e30b35cb5ad1e61203 +Subproject commit eebf730ccda5b5fade2a8f48b3da1496f2c47ba5 diff --git a/vendor/nim-chronos b/vendor/nim-chronos index 396208044..c1f6e7276 160000 --- a/vendor/nim-chronos +++ b/vendor/nim-chronos @@ -1 +1 @@ -Subproject commit 396208044a6375d7d803f1dce6b2d1efdfec7fbb +Subproject commit c1f6e7276e3810cee4bf7358a36a3444fb4bd75e diff --git a/vendor/nim-json-rpc b/vendor/nim-json-rpc index ce51ffdf1..ded863fcb 160000 --- a/vendor/nim-json-rpc +++ b/vendor/nim-json-rpc @@ -1 +1 @@ -Subproject commit ce51ffdf1613f0e09ccc114456551a55ae3eed27 +Subproject commit ded863fcb1741483f285e3bbf27541efdc32c78c diff --git a/vendor/nim-protobuf-serialization b/vendor/nim-protobuf-serialization index 879421b12..e8e84cfc1 160000 --- a/vendor/nim-protobuf-serialization +++ b/vendor/nim-protobuf-serialization @@ -1 +1 @@ -Subproject commit 879421b1216efb66aed5a7f4e14d02ff96db9123 +Subproject commit e8e84cfc11de78c7bce0cded800060a29220e76f diff --git a/vendor/nim-secp256k1 b/vendor/nim-secp256k1 index 23bf71889..ac9605487 160000 --- a/vendor/nim-secp256k1 +++ b/vendor/nim-secp256k1 @@ -1 +1 @@ -Subproject commit 23bf71889de876ad60ca76370fa0e46da762640d +Subproject commit ac96054870eb7cbc2cf72dd03fe5d5336b2e5dd9 diff --git a/vendor/nim-sqlite3-abi b/vendor/nim-sqlite3-abi index 068ff3593..07039dd88 160000 --- a/vendor/nim-sqlite3-abi +++ b/vendor/nim-sqlite3-abi @@ -1 +1 @@ -Subproject commit 068ff3593c1582bf3d96b75dcf40fa72e3739b29 +Subproject commit 07039dd887c4e5b57367a16f4be3c18763be1d7b diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 53870bc6b..9c4c4d3ac 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 53870bc6bccf0f09f9c50a923d1fa1fb235d2db0 +Subproject commit 9c4c4d3acf8f13e8d973180548837cc738e14aa2