From 6ba0d93048ae146c9c85633d0edb5b49caaac222 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Tue, 21 Jul 2020 17:54:51 +0900 Subject: [PATCH 1/7] jenkins temporary changes --- Jenkinsfile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d2da7bf83..f084718596 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,26 +22,26 @@ def runStages() { stage("Test") { parallel( - "tools": { - stage("Tools") { - sh """#!/bin/bash - set -e - make -j${env.NPROC} - make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' beacon_node - """ - } - }, + // "tools": { + // stage("Tools") { + // sh """#!/bin/bash + // set -e + // make -j${env.NPROC} + // make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' beacon_node + // """ + // } + // }, "test suite": { - stage("Test suite") { - sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test" - } + // stage("Test suite") { + // sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test" + // } if ("${NODE_NAME}" ==~ /linux.*/) { stage("testnet finalization") { // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node sh """#!/bin/bash set -e - timeout -k 20s 10m ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --log-level INFO --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 - timeout -k 20s 40m ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --log-level INFO --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 + timeout -k 20s 10m ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --log-level TRACE --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 + timeout -k 20s 40m ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --log-level TRACE --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 """ } } From 5d66d6e75a219009ec00b396927e6d68bc42c1ee Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Tue, 21 Jul 2020 20:02:31 +0900 Subject: [PATCH 2/7] add a sleep before starting next test node --- Jenkinsfile | 4 ++-- scripts/launch_local_testnet.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f084718596..18949d00ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,8 +40,8 @@ def runStages() { // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node sh """#!/bin/bash set -e - timeout -k 20s 10m ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --log-level TRACE --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 - timeout -k 20s 40m ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --log-level TRACE --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 + timeout -k 20s 10m ./scripts/launch_local_testnet.sh --testnet 0 --nodes 4 --log-level INFO --disable-htop --data-dir local_testnet0_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 + timeout -k 20s 40m ./scripts/launch_local_testnet.sh --testnet 1 --nodes 4 --log-level INFO --disable-htop --data-dir local_testnet1_data --base-port \$(( 9000 + EXECUTOR_NUMBER * 100 )) --base-metrics-port \$(( 8008 + EXECUTOR_NUMBER * 100 )) -- --verify-finalization --stop-at-epoch=5 """ } } diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index bd036fca15..7f0e6188fc 100755 --- a/scripts/launch_local_testnet.sh +++ b/scripts/launch_local_testnet.sh @@ -299,6 +299,8 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do --metrics-port="$(( BASE_METRICS_PORT + NUM_NODE ))" \ ${EXTRA_ARGS} \ > "${DATA_DIR}/log${NUM_NODE}.txt" 2>&1 & + + sleep 5 if [[ "${PIDS}" == "" ]]; then PIDS="$!" From 2edf872799f6f727300bf0520362d5852cef9a54 Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni Date: Tue, 21 Jul 2020 20:52:07 +0900 Subject: [PATCH 3/7] restore previous test config --- Jenkinsfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 18949d00ee..0d2da7bf83 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,19 +22,19 @@ def runStages() { stage("Test") { parallel( - // "tools": { - // stage("Tools") { - // sh """#!/bin/bash - // set -e - // make -j${env.NPROC} - // make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' beacon_node - // """ - // } - // }, + "tools": { + stage("Tools") { + sh """#!/bin/bash + set -e + make -j${env.NPROC} + make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' beacon_node + """ + } + }, "test suite": { - // stage("Test suite") { - // sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test" - // } + stage("Test suite") { + sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test" + } if ("${NODE_NAME}" ==~ /linux.*/) { stage("testnet finalization") { // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node From 6cfb161cd9deec60394324a2d30b1f3449d86f62 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Fri, 17 Jul 2020 13:51:55 -0600 Subject: [PATCH 4/7] call `isConnected` instead of `connections` --- beacon_chain/eth2_network.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index bf463ee27c..7510902b2c 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -779,7 +779,7 @@ proc runDiscoveryLoop*(node: Eth2Node) {.async.} = if peerRecord.isOk: let peerInfo = peerRecord.value.toPeerInfo if peerInfo != nil: - if peerInfo.id notin node.switch.connections: + if not node.switch.isConnected(peerInfo): await node.connQueue.addLast(peerInfo) else: peerInfo.close() From 4915a3e9b1b8b586e0952d7227bb2f542e206872 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sat, 18 Jul 2020 11:01:35 -0600 Subject: [PATCH 5/7] bump libp2p to lastest master --- vendor/nim-libp2p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index 775cab414a..38eb36efae 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit 775cab414a68843c93c75e357f69cb1c04b32edd +Subproject commit 38eb36efaee09551e0cd6c1d4530c9abfe9cb322 From a34bf89913221d07f5c4d1b593b70d4ccabf385a Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sat, 18 Jul 2020 11:33:58 -0600 Subject: [PATCH 6/7] use `isConnected` --- beacon_chain/inspector.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/inspector.nim b/beacon_chain/inspector.nim index 4a28325d0b..40ada85d2b 100644 --- a/beacon_chain/inspector.nim +++ b/beacon_chain/inspector.nim @@ -570,7 +570,7 @@ proc discoveryLoop(conf: InspectorConf, if pinfoOpt.isOk(): let pinfo = pinfoOpt.get() if pinfo.hasTCP(): - if pinfo.id() notin switch.connections: + if not switch.isConnected(pinfo): debug "Discovered new peer", peer = pinfo, peers_count = len(peers) await connQueue.addLast(pinfo) From 3a1250a032b754a4fad12b13ed2e4d197fd72842 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Wed, 22 Jul 2020 03:36:12 -0600 Subject: [PATCH 7/7] more bumps --- vendor/nim-libp2p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/nim-libp2p b/vendor/nim-libp2p index 38eb36efae..6af3cb6406 160000 --- a/vendor/nim-libp2p +++ b/vendor/nim-libp2p @@ -1 +1 @@ -Subproject commit 38eb36efaee09551e0cd6c1d4530c9abfe9cb322 +Subproject commit 6af3cb6406bd97ff421207d18fe2b8b05e1b96f4