Skip to content

Commit

Permalink
Update tracing events and prevent elision for pipelining
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen authored and Jimbo4350 committed May 20, 2022
1 parent c0fde8a commit c8185e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs
Expand Up @@ -658,6 +658,21 @@ docChainDBAddBlock = Documented [
"Run chain selection for a block that was previously from the future.\
\ This is done for all blocks from the future each time a new block is\
\ added."
, DocMsg
["PipeliningEvent", "SetTentativeHeader"]
[]
"An event traced during block selection when the tentative header\
\ (in the context of diffusion pipelining) is set."
, DocMsg
["PipeliningEvent", "TrapTentativeHeader"]
[]
"An event traced during block selection when the body of the tentative\
\ header turned out to be invalid."
, DocMsg
["PipeliningEvent", "OutdatedTentativeHeader"]
[]
"An event traced during block selection when the tentative header got\
\ cleared on chain selection."
]


Expand Down
Expand Up @@ -34,7 +34,8 @@ import Cardano.Tracing.Render (renderChainHash, renderChunkNo, renderH

import Ouroboros.Consensus.Block (BlockProtocol, BlockSupportsProtocol, CannotForge,
ConvertRawHash (..), ForgeStateUpdateError, Header, RealPoint, blockNo,
blockPrevHash, getHeader, headerPoint, pointHash, realPointHash, realPointSlot)
blockPoint, blockPrevHash, getHeader, headerPoint, pointHash, realPointHash,
realPointSlot)
import Ouroboros.Consensus.HeaderValidation
import Ouroboros.Consensus.Ledger.Abstract
import Ouroboros.Consensus.Ledger.Extended
Expand Down
1 change: 1 addition & 0 deletions cardano-node/src/Cardano/Tracing/Tracers.hs
Expand Up @@ -231,6 +231,7 @@ instance ElidingTracer (WithSeverity (ChainDB.TraceEvent blk)) where
doelide (WithSeverity _ (ChainDB.TraceAddBlockEvent (ChainDB.AddBlockValidation (ChainDB.InvalidBlock _ _)))) = False
doelide (WithSeverity _ (ChainDB.TraceAddBlockEvent (ChainDB.AddBlockValidation ChainDB.CandidateContainsFutureBlocksExceedingClockSkew{}))) = False
doelide (WithSeverity _ (ChainDB.TraceAddBlockEvent (ChainDB.AddedToCurrentChain events _ _ _))) = null events
doelide (WithSeverity _ (ChainDB.TraceAddBlockEvent (ChainDB.PipeliningEvent{}))) = False
doelide (WithSeverity _ (ChainDB.TraceAddBlockEvent _)) = True
doelide (WithSeverity _ (ChainDB.TraceCopyToImmutableDBEvent _)) = True
doelide (WithSeverity _ (ChainDB.TraceInitChainSelEvent (ChainDB.InitChainSelValidation (ChainDB.UpdateLedgerDbTraceEvent{})))) = True
Expand Down

0 comments on commit c8185e2

Please sign in to comment.