From 6a2bac5ceed17d06bab8942cc03dea8c31dc8e59 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Mon, 7 Aug 2023 18:02:08 +0200 Subject: [PATCH] need even more log lines for debugging keymanager (#5260) Keymanager test logs are still cut off, further increase log lines. --- Makefile | 12 ++++++------ beacon_chain/beacon_node.nim | 4 ++-- beacon_chain/spec/state_transition.nim | 3 +++ scripts/launch_local_testnet.sh | 2 +- tests/test_keymanager_api.nim | 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 5c6e3e869..1df487dc6 100644 --- a/Makefile +++ b/Makefile @@ -392,8 +392,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 2000 lines from the log:"; \ - tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 5000 lines from the log:"; \ + tail -n5000 "$${TEST_BINARY}.log"; exit 1; \ }; \ done; \ rm -rf 0000-*.json t_slashprot_migration.* *.log block_sim_db @@ -407,13 +407,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 2000 lines from the log:"; \ - tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 5000 lines from the log:"; \ + tail -n5000 "$${TEST_BINARY}.log"; exit 1; \ }; \ else \ build/$${TEST_BINARY} $${PARAMS} || { \ - echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 2000 lines from the log:"; \ - tail -n2000 "$${TEST_BINARY}.log"; exit 1; \ + echo -e "\n$${TEST_BINARY} $${PARAMS} failed; Last 5000 lines from the log:"; \ + tail -n5000 "$${TEST_BINARY}.log"; exit 1; \ }; \ fi; \ done; \ diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index 96f878478..ac3a87300 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -134,10 +134,10 @@ proc getPayloadBuilderClient*( return err "Validator index too high" forkyState.data.validators.item(validator_index).pubkey payloadBuilderAddress = - if node.keyManagerHost.isNil: + if node.keymanagerHost.isNil: defaultPayloadBuilderAddress else: - node.keyManagerHost[].getBuilderConfig(pubkey).valueOr: + node.keymanagerHost[].getBuilderConfig(pubkey).valueOr: defaultPayloadBuilderAddress if payloadBuilderAddress.isNone: diff --git a/beacon_chain/spec/state_transition.nim b/beacon_chain/spec/state_transition.nim index 14404f7de..5d0d74d5d 100644 --- a/beacon_chain/spec/state_transition.nim +++ b/beacon_chain/spec/state_transition.nim @@ -51,6 +51,9 @@ import export results, extras, phase0, altair, bellatrix +logScope: + topics = "state_transition" + # https://github.com/ethereum/consensus-specs/blob/v1.4.0-alpha.3/specs/phase0/beacon-chain.md#beacon-chain-state-transition-function proc verify_block_signature( state: ForkyBeaconState, signed_block: SomeForkySignedBeaconBlock): diff --git a/scripts/launch_local_testnet.sh b/scripts/launch_local_testnet.sh index f8fc054d4..f2f213aa3 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=100 + LOG_LINES=50 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 87c2be568..44d235b9e 100644 --- a/tests/test_keymanager_api.nim +++ b/tests/test_keymanager_api.nim @@ -1494,7 +1494,8 @@ let for topicName in [ "libp2p", "gossipsub", "gossip_eth2", "message_router", "batch_validation", - "syncpool"]: + "syncpool", "syncman", "fork_choice", "attpool", "val_pool", "consens", + "state_transition"]: doAssert setTopicState(topicName, Disabled) waitFor main(basePort)