From 0fb02b5206465c09f287d46736924265edb1adc3 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 1 Jun 2021 17:33:00 +0200 Subject: [PATCH] log state update duration, lower info threshold for detail logging --- beacon_chain/consensus_object_pools/block_clearance.nim | 6 ++++-- beacon_chain/consensus_object_pools/blockchain_dag.nim | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/beacon_chain/consensus_object_pools/block_clearance.nim b/beacon_chain/consensus_object_pools/block_clearance.nim index de8ea8346..8207f5b59 100644 --- a/beacon_chain/consensus_object_pools/block_clearance.nim +++ b/beacon_chain/consensus_object_pools/block_clearance.nim @@ -199,11 +199,13 @@ proc advanceClearanceState*(dag: ChainDagRef) = let next = dag.clearanceState.blck.atSlot(dag.clearanceState.blck.slot + 1) - debug "Preparing clearance state for next block", next - + let startTick = Moment.now() var cache = StateCache() updateStateData(dag, dag.clearanceState, next, true, cache) + debug "Prepared clearance state for next block", + next, updateStateDur = Moment.now() - startTick + proc addRawBlockKnownParent( dag: ChainDAGRef, quarantine: QuarantineRef, signedBlock: SignedBeaconBlock, diff --git a/beacon_chain/consensus_object_pools/blockchain_dag.nim b/beacon_chain/consensus_object_pools/blockchain_dag.nim index 627839ba8..c49b4796b 100644 --- a/beacon_chain/consensus_object_pools/blockchain_dag.nim +++ b/beacon_chain/consensus_object_pools/blockchain_dag.nim @@ -855,7 +855,7 @@ proc updateStateData*( assignDur replayDur - if (assignDur + replayDur) >= 1.seconds: + if (assignDur + replayDur) >= 250.millis: # This might indicate there's a cache that's not in order or a disk that is # too slow - for now, it's here for investigative purposes and the cutoff # time might need tuning