From 5b70a686e3c3955d8819d2aaa1ff202ba789e05b Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sat, 5 Aug 2023 15:12:44 +0200 Subject: [PATCH] further adjust `test_keymanager_api` logs (#5259) It is still unclear how `test_keymanager_api` sometimes fails in CI; further adjust logging parameters. --- Makefile | 12 ++++++------ .../sync_committee_msg_pool.nim | 3 +++ beacon_chain/validators/message_router.nim | 3 +++ scripts/launch_local_testnet.sh | 2 +- tests/test_keymanager_api.nim | 4 +++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 951285084..98ddb183f 100644 --- a/Makefile +++ b/Makefile @@ -391,8 +391,8 @@ endif NIMBUS_TEST_KEYMANAGER_BASE_PORT=$$(( $(UNIT_TEST_BASE_PORT) + EXECUTOR_NUMBER * 6 + 0 )) \ NIMBUS_TEST_SIGNING_NODE_BASE_PORT=$$(( $(UNIT_TEST_BASE_PORT) + EXECUTOR_NUMBER * 6 + 4 )) \ build/$${TEST_BINARY} $${PARAMS} || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ - tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 2000 lines from the log:"; \ + tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ }; \ done; \ rm -rf 0000-*.json t_slashprot_migration.* *.log block_sim_db @@ -406,13 +406,13 @@ endif echo -e "\nRunning $${TEST_BINARY} $${PARAMS}\n"; \ if [[ "$${REDIRECT}" != "" ]]; then \ build/$${TEST_BINARY} $${PARAMS} > "$${REDIRECT}" && echo "OK" || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ - tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 2000 lines from the log:"; \ + tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ }; \ else \ build/$${TEST_BINARY} $${PARAMS} || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 1000 lines from the log:"; \ - tail -n1000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 2000 lines from the log:"; \ + tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ }; \ fi; \ done; \ diff --git a/beacon_chain/consensus_object_pools/sync_committee_msg_pool.nim b/beacon_chain/consensus_object_pools/sync_committee_msg_pool.nim index 77fae2112..86d87feb3 100644 --- a/beacon_chain/consensus_object_pools/sync_committee_msg_pool.nim +++ b/beacon_chain/consensus_object_pools/sync_committee_msg_pool.nim @@ -17,6 +17,9 @@ import export hashes, sets, tables, altair +logScope: + topics = "syncpool" + const syncCommitteeMsgsRetentionSlots = 3 ## How many slots to retain sync committee diff --git a/beacon_chain/validators/message_router.nim b/beacon_chain/validators/message_router.nim index 2b8cde057..993561f09 100644 --- a/beacon_chain/validators/message_router.nim +++ b/beacon_chain/validators/message_router.nim @@ -22,6 +22,9 @@ from ../spec/state_transition_block import validate_blobs export eth2_processor, eth2_network +logScope: + topics = "message_router" + declareCounter beacon_voluntary_exits_sent, "Number of beacon voluntary sent by this node" diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index 5ef5703b0..f8fc054d4 100755 --- a/scripts/launch_local_testnet.sh +++ b/scripts/launch_local_testnet.sh @@ -930,7 +930,7 @@ if [[ "${LIGHTHOUSE_VC_NODES}" != "0" ]]; then fi dump_logs() { - LOG_LINES=1000 + LOG_LINES=100 for LOG in "${DATA_DIR}"/logs/*; do echo "Last ${LOG_LINES} lines of ${LOG}:" tail -n ${LOG_LINES} "${LOG}" diff --git a/tests/test_keymanager_api.nim b/tests/test_keymanager_api.nim index 364c740f1..87c2be568 100644 --- a/tests/test_keymanager_api.nim +++ b/tests/test_keymanager_api.nim @@ -1492,7 +1492,9 @@ let fatal "Invalid base port arg", basePort = basePortStr, exc = exc.msg quit 1 -for topicName in ["libp2p", "gossipsub", "gossip_eth2"]: +for topicName in [ + "libp2p", "gossipsub", "gossip_eth2", "message_router", "batch_validation", + "syncpool"]: doAssert setTopicState(topicName, Disabled) waitFor main(basePort)