{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
module Ouroboros.Consensus.Node.Tracers (
Tracers
, Tracers' (..)
, nullTracers
, showTracers
, TraceForgeEvent (..)
, TraceLabelCreds (..)
) where
import Control.Tracer (Tracer, nullTracer, showTracing)
import Data.Text (Text)
import Data.Time (UTCTime)
import Ouroboros.Network.BlockFetch (FetchDecision,
TraceFetchClientState, TraceLabelPeer)
import Ouroboros.Network.KeepAlive (TraceKeepAliveClient)
import Ouroboros.Network.TxSubmission.Inbound
(TraceTxSubmissionInbound)
import Ouroboros.Network.TxSubmission.Outbound
(TraceTxSubmissionOutbound)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.BlockchainTime
import Ouroboros.Consensus.Forecast (OutsideForecastRange)
import Ouroboros.Consensus.Ledger.SupportsMempool
import Ouroboros.Consensus.Ledger.SupportsProtocol
import Ouroboros.Consensus.Mempool.API
import Ouroboros.Consensus.MiniProtocol.BlockFetch.Server
(TraceBlockFetchServerEvent)
import Ouroboros.Consensus.MiniProtocol.ChainSync.Client
(InvalidBlockReason, TraceChainSyncClientEvent)
import Ouroboros.Consensus.MiniProtocol.ChainSync.Server
(TraceChainSyncServerEvent)
import Ouroboros.Consensus.MiniProtocol.LocalTxSubmission.Server
(TraceLocalTxSubmissionServerEvent (..))
data Tracers' remotePeer localPeer blk f = Tracers
{ Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer :: f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
, :: f (TraceChainSyncServerEvent blk)
, Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer :: f (TraceChainSyncServerEvent blk)
, Tracers' remotePeer localPeer blk f
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer :: f [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
, Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer :: f (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
, Tracers' remotePeer localPeer blk f
-> f (TraceBlockFetchServerEvent blk)
blockFetchServerTracer :: f (TraceBlockFetchServerEvent blk)
, Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer :: f (TraceLabelPeer remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
, Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer :: f (TraceLabelPeer remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
, Tracers' remotePeer localPeer blk f
-> f (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer :: f (TraceLocalTxSubmissionServerEvent blk)
, Tracers' remotePeer localPeer blk f -> f (TraceEventMempool blk)
mempoolTracer :: f (TraceEventMempool blk)
, Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer :: f (TraceLabelCreds (TraceForgeEvent blk))
, Tracers' remotePeer localPeer blk f
-> f (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer :: f (TraceBlockchainTimeEvent UTCTime)
, Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer :: f (TraceLabelCreds (ForgeStateInfo blk))
, Tracers' remotePeer localPeer blk f
-> f (TraceKeepAliveClient remotePeer)
keepAliveClientTracer :: f (TraceKeepAliveClient remotePeer)
}
instance (forall a. Semigroup (f a))
=> Semigroup (Tracers' remotePeer localPeer blk f) where
Tracers' remotePeer localPeer blk f
l <> :: Tracers' remotePeer localPeer blk f
-> Tracers' remotePeer localPeer blk f
-> Tracers' remotePeer localPeer blk f
<> Tracers' remotePeer localPeer blk f
r = Tracers :: forall remotePeer localPeer blk (f :: * -> *).
f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
-> f (TraceChainSyncServerEvent blk)
-> f (TraceChainSyncServerEvent blk)
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
-> f (TraceBlockFetchServerEvent blk)
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> f (TraceLocalTxSubmissionServerEvent blk)
-> f (TraceEventMempool blk)
-> f (TraceLabelCreds (TraceForgeEvent blk))
-> f (TraceBlockchainTimeEvent UTCTime)
-> f (TraceLabelCreds (ForgeStateInfo blk))
-> f (TraceKeepAliveClient remotePeer)
-> Tracers' remotePeer localPeer blk f
Tracers
{ chainSyncClientTracer :: f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk)))
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer
, chainSyncServerHeaderTracer :: f (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk))
-> f (TraceChainSyncServerEvent blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTracer
, chainSyncServerBlockTracer :: f (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk))
-> f (TraceChainSyncServerEvent blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer
, blockFetchDecisionTracer :: f [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer = (Tracers' remotePeer localPeer blk f
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])])
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer
, blockFetchClientTracer :: f (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk))))
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer
, blockFetchServerTracer :: f (TraceBlockFetchServerEvent blk)
blockFetchServerTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceBlockFetchServerEvent blk))
-> f (TraceBlockFetchServerEvent blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceBlockFetchServerEvent blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceBlockFetchServerEvent blk)
blockFetchServerTracer
, txInboundTracer :: f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk))))
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer
, txOutboundTracer :: f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk))))
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer
, localTxSubmissionServerTracer :: f (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLocalTxSubmissionServerEvent blk))
-> f (TraceLocalTxSubmissionServerEvent blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLocalTxSubmissionServerEvent blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer
, mempoolTracer :: f (TraceEventMempool blk)
mempoolTracer = (Tracers' remotePeer localPeer blk f -> f (TraceEventMempool blk))
-> f (TraceEventMempool blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f -> f (TraceEventMempool blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f (TraceEventMempool blk)
mempoolTracer
, forgeTracer :: f (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (TraceForgeEvent blk)))
-> f (TraceLabelCreds (TraceForgeEvent blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (TraceForgeEvent blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer
, blockchainTimeTracer :: f (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceBlockchainTimeEvent UTCTime))
-> f (TraceBlockchainTimeEvent UTCTime)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceBlockchainTimeEvent UTCTime)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer
, forgeStateInfoTracer :: f (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (ForgeStateInfo blk)))
-> f (TraceLabelCreds (ForgeStateInfo blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (ForgeStateInfo blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer
, keepAliveClientTracer :: f (TraceKeepAliveClient remotePeer)
keepAliveClientTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceKeepAliveClient remotePeer))
-> f (TraceKeepAliveClient remotePeer)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceKeepAliveClient remotePeer)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceKeepAliveClient remotePeer)
keepAliveClientTracer
}
where
f :: forall a. Semigroup a
=> (Tracers' remotePeer localPeer blk f -> a) -> a
f :: (Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f -> a
prj = Tracers' remotePeer localPeer blk f -> a
prj Tracers' remotePeer localPeer blk f
l a -> a -> a
forall a. Semigroup a => a -> a -> a
<> Tracers' remotePeer localPeer blk f -> a
prj Tracers' remotePeer localPeer blk f
r
type Tracers m remotePeer localPeer blk =
Tracers' remotePeer localPeer blk (Tracer m)
nullTracers :: Monad m => Tracers m remotePeer localPeer blk
nullTracers :: Tracers m remotePeer localPeer blk
nullTracers = Tracers :: forall remotePeer localPeer blk (f :: * -> *).
f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
-> f (TraceChainSyncServerEvent blk)
-> f (TraceChainSyncServerEvent blk)
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
-> f (TraceBlockFetchServerEvent blk)
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> f (TraceLocalTxSubmissionServerEvent blk)
-> f (TraceEventMempool blk)
-> f (TraceLabelCreds (TraceForgeEvent blk))
-> f (TraceBlockchainTimeEvent UTCTime)
-> f (TraceLabelCreds (ForgeStateInfo blk))
-> f (TraceKeepAliveClient remotePeer)
-> Tracers' remotePeer localPeer blk f
Tracers
{ chainSyncClientTracer :: Tracer
m (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer = Tracer
m (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, chainSyncServerHeaderTracer :: Tracer m (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTracer = Tracer m (TraceChainSyncServerEvent blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, chainSyncServerBlockTracer :: Tracer m (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer = Tracer m (TraceChainSyncServerEvent blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, blockFetchDecisionTracer :: Tracer
m [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer = Tracer
m [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, blockFetchClientTracer :: Tracer
m (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer = Tracer
m (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, blockFetchServerTracer :: Tracer m (TraceBlockFetchServerEvent blk)
blockFetchServerTracer = Tracer m (TraceBlockFetchServerEvent blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, txInboundTracer :: Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer = Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, txOutboundTracer :: Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer = Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, localTxSubmissionServerTracer :: Tracer m (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer = Tracer m (TraceLocalTxSubmissionServerEvent blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, mempoolTracer :: Tracer m (TraceEventMempool blk)
mempoolTracer = Tracer m (TraceEventMempool blk)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, forgeTracer :: Tracer m (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer = Tracer m (TraceLabelCreds (TraceForgeEvent blk))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, blockchainTimeTracer :: Tracer m (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer = Tracer m (TraceBlockchainTimeEvent UTCTime)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, forgeStateInfoTracer :: Tracer m (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer = Tracer m (TraceLabelCreds (ForgeStateInfo blk))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, keepAliveClientTracer :: Tracer m (TraceKeepAliveClient remotePeer)
keepAliveClientTracer = Tracer m (TraceKeepAliveClient remotePeer)
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
}
showTracers :: ( Show blk
, Show (GenTx blk)
, Show (Validated (GenTx blk))
, Show (GenTxId blk)
, Show (ApplyTxErr blk)
, Show (Header blk)
, Show (ForgeStateInfo blk)
, Show (ForgeStateUpdateError blk)
, Show (CannotForge blk)
, Show remotePeer
, LedgerSupportsProtocol blk
)
=> Tracer m String -> Tracers m remotePeer localPeer blk
showTracers :: Tracer m String -> Tracers m remotePeer localPeer blk
showTracers Tracer m String
tr = Tracers :: forall remotePeer localPeer blk (f :: * -> *).
f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
-> f (TraceChainSyncServerEvent blk)
-> f (TraceChainSyncServerEvent blk)
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
-> f (TraceBlockFetchServerEvent blk)
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
-> f (TraceLocalTxSubmissionServerEvent blk)
-> f (TraceEventMempool blk)
-> f (TraceLabelCreds (TraceForgeEvent blk))
-> f (TraceBlockchainTimeEvent UTCTime)
-> f (TraceLabelCreds (ForgeStateInfo blk))
-> f (TraceKeepAliveClient remotePeer)
-> Tracers' remotePeer localPeer blk f
Tracers
{ chainSyncClientTracer :: Tracer
m (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer = Tracer m String
-> Tracer
m (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, chainSyncServerHeaderTracer :: Tracer m (TraceChainSyncServerEvent blk)
chainSyncServerHeaderTracer = Tracer m String -> Tracer m (TraceChainSyncServerEvent blk)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, chainSyncServerBlockTracer :: Tracer m (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer = Tracer m String -> Tracer m (TraceChainSyncServerEvent blk)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, blockFetchDecisionTracer :: Tracer
m [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer = Tracer m String
-> Tracer
m [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, blockFetchClientTracer :: Tracer
m (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer = Tracer m String
-> Tracer
m (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, blockFetchServerTracer :: Tracer m (TraceBlockFetchServerEvent blk)
blockFetchServerTracer = Tracer m String -> Tracer m (TraceBlockFetchServerEvent blk)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, txInboundTracer :: Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer = Tracer m String
-> Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, txOutboundTracer :: Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer = Tracer m String
-> Tracer
m
(TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, localTxSubmissionServerTracer :: Tracer m (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer = Tracer m String -> Tracer m (TraceLocalTxSubmissionServerEvent blk)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, mempoolTracer :: Tracer m (TraceEventMempool blk)
mempoolTracer = Tracer m String -> Tracer m (TraceEventMempool blk)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, forgeTracer :: Tracer m (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer = Tracer m String -> Tracer m (TraceLabelCreds (TraceForgeEvent blk))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, blockchainTimeTracer :: Tracer m (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer = Tracer m String -> Tracer m (TraceBlockchainTimeEvent UTCTime)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, forgeStateInfoTracer :: Tracer m (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer = Tracer m String -> Tracer m (TraceLabelCreds (ForgeStateInfo blk))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, keepAliveClientTracer :: Tracer m (TraceKeepAliveClient remotePeer)
keepAliveClientTracer = Tracer m String -> Tracer m (TraceKeepAliveClient remotePeer)
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
}
data TraceForgeEvent blk
= TraceStartLeadershipCheck SlotNo
| TraceSlotIsImmutable SlotNo (Point blk) BlockNo
| TraceBlockFromFuture SlotNo SlotNo
| TraceBlockContext SlotNo BlockNo (Point blk)
| TraceNoLedgerState SlotNo (Point blk)
| TraceLedgerState SlotNo (Point blk)
| TraceNoLedgerView SlotNo OutsideForecastRange
| TraceLedgerView SlotNo
| TraceForgeStateUpdateError SlotNo (ForgeStateUpdateError blk)
| TraceNodeCannotForge SlotNo (CannotForge blk)
| TraceNodeNotLeader SlotNo
| TraceNodeIsLeader SlotNo
| TraceForgeTickedLedgerState SlotNo (Point blk)
| TraceForgingMempoolSnapshot SlotNo (Point blk) (ChainHash blk) SlotNo
| TraceForgedBlock SlotNo (Point blk) blk MempoolSize
| TraceDidntAdoptBlock SlotNo blk
| TraceForgedInvalidBlock SlotNo blk (InvalidBlockReason blk)
| TraceAdoptedBlock SlotNo blk [Validated (GenTx blk)]
deriving instance ( LedgerSupportsProtocol blk
, Eq blk
, Eq (Validated (GenTx blk))
, Eq (ForgeStateUpdateError blk)
, Eq (CannotForge blk)
) => Eq (TraceForgeEvent blk)
deriving instance ( LedgerSupportsProtocol blk
, Show blk
, Show (Validated (GenTx blk))
, Show (ForgeStateUpdateError blk)
, Show (CannotForge blk)
) => Show (TraceForgeEvent blk)
data TraceLabelCreds a = TraceLabelCreds Text a
deriving (TraceLabelCreds a -> TraceLabelCreds a -> Bool
(TraceLabelCreds a -> TraceLabelCreds a -> Bool)
-> (TraceLabelCreds a -> TraceLabelCreds a -> Bool)
-> Eq (TraceLabelCreds a)
forall a. Eq a => TraceLabelCreds a -> TraceLabelCreds a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TraceLabelCreds a -> TraceLabelCreds a -> Bool
$c/= :: forall a. Eq a => TraceLabelCreds a -> TraceLabelCreds a -> Bool
== :: TraceLabelCreds a -> TraceLabelCreds a -> Bool
$c== :: forall a. Eq a => TraceLabelCreds a -> TraceLabelCreds a -> Bool
Eq, Int -> TraceLabelCreds a -> ShowS
[TraceLabelCreds a] -> ShowS
TraceLabelCreds a -> String
(Int -> TraceLabelCreds a -> ShowS)
-> (TraceLabelCreds a -> String)
-> ([TraceLabelCreds a] -> ShowS)
-> Show (TraceLabelCreds a)
forall a. Show a => Int -> TraceLabelCreds a -> ShowS
forall a. Show a => [TraceLabelCreds a] -> ShowS
forall a. Show a => TraceLabelCreds a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TraceLabelCreds a] -> ShowS
$cshowList :: forall a. Show a => [TraceLabelCreds a] -> ShowS
show :: TraceLabelCreds a -> String
$cshow :: forall a. Show a => TraceLabelCreds a -> String
showsPrec :: Int -> TraceLabelCreds a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> TraceLabelCreds a -> ShowS
Show, a -> TraceLabelCreds b -> TraceLabelCreds a
(a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
(forall a b. (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b)
-> (forall a b. a -> TraceLabelCreds b -> TraceLabelCreds a)
-> Functor TraceLabelCreds
forall a b. a -> TraceLabelCreds b -> TraceLabelCreds a
forall a b. (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> TraceLabelCreds b -> TraceLabelCreds a
$c<$ :: forall a b. a -> TraceLabelCreds b -> TraceLabelCreds a
fmap :: (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
$cfmap :: forall a b. (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
Functor)