Skip to content

Commit

Permalink
need even more log lines for debugging keymanager (#5260)
Browse files Browse the repository at this point in the history
Keymanager test logs are still cut off, further increase log lines.
  • Loading branch information
etan-status authored Aug 7, 2023
1 parent b9920a3 commit 6a2bac5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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; \
Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions beacon_chain/spec/state_transition.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion scripts/launch_local_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_keymanager_api.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 6a2bac5

Please sign in to comment.