Reduce the sync-related tracing in the testnets [skip ci]

This commit is contained in:
Zahary Karadjov 2019-12-03 13:07:43 +02:00
parent ee2448b221
commit a641331448
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
3 changed files with 10 additions and 7 deletions

View File

@ -81,7 +81,7 @@ proc init*(T: type BlockPool, db: BeaconChainDB): BlockPool =
link(newRef, curRef)
curRef = curRef.parent
blocks[curRef.root] = curRef
debug "Populating block pool", key = curRef.root, val = curRef
trace "Populating block pool", key = curRef.root, val = curRef
if latestStateRoot.isNone() and db.containsState(blck.state_root):
latestStateRoot = some(blck.state_root)
@ -169,7 +169,7 @@ proc addResolvedBlock(
link(parent, blockRef)
pool.blocks[blockRoot] = blockRef
debug "Populating block pool", key = blockRoot, val = blockRef
trace "Populating block pool", key = blockRoot, val = blockRef
pool.addSlotMapping(blockRef)

View File

@ -590,10 +590,13 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
msg.defineThunk quote do:
proc `thunkName`(`daemonVar`: `DaemonAPI`,
`streamVar`: `P2PStream`) {.async, gcsafe.} =
when chronicles.runtimeFilteringEnabled:
setLogLevel(LogLevel.TRACE)
defer: setLogLevel(LogLevel.DEBUG)
trace "incoming " & `msgNameLit` & " stream"
## Uncomment this to enable tracing on all incoming requests
## You can include `msgNameLit` in the condition to select
## more specific requests:
# when chronicles.runtimeFilteringEnabled:
# setLogLevel(LogLevel.TRACE)
# defer: setLogLevel(LogLevel.DEBUG)
# trace "incoming " & `msgNameLit` & " stream"
defer:
`await` safeClose(`streamVar`)

View File

@ -26,7 +26,7 @@ RUN cd /root/nim-beacon-chain \
&& git fetch \
&& git reset --hard ${GIT_REVISION} \
&& make -j$(nproc) update \
&& make LOG_LEVEL=TRACE NIMFLAGS="-d:debug -d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS}" beacon_node
&& make LOG_LEVEL=DEBUG NIMFLAGS="-d:debug -d:insecure -d:testnet_servers_image ${NETWORK_NIM_FLAGS}" beacon_node
# --------------------------------- #
# Starting new image to reduce size #