{-# 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.Exception (SomeException)
import Control.Tracer (Tracer, nullTracer, showTracing)
import Data.Text (Text)
import Data.Time (UTCTime)
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.BlockchainTime
import Ouroboros.Consensus.Forecast (OutsideForecastRange)
import Ouroboros.Consensus.Genesis.Governor (TraceGDDEvent)
import Ouroboros.Consensus.Ledger.Extended (ExtValidationError)
import Ouroboros.Consensus.Ledger.SupportsMempool
import Ouroboros.Consensus.Ledger.SupportsProtocol
import Ouroboros.Consensus.Mempool (MempoolSize, TraceEventMempool)
import Ouroboros.Consensus.MiniProtocol.BlockFetch.Server
(TraceBlockFetchServerEvent)
import Ouroboros.Consensus.MiniProtocol.ChainSync.Client
(TraceChainSyncClientEvent)
import Ouroboros.Consensus.MiniProtocol.ChainSync.Server
(TraceChainSyncServerEvent)
import Ouroboros.Consensus.MiniProtocol.LocalTxSubmission.Server
(TraceLocalTxSubmissionServerEvent (..))
import Ouroboros.Consensus.Node.GSM (TraceGsmEvent)
import Ouroboros.Network.Block (Tip)
import Ouroboros.Network.BlockFetch (FetchDecision,
TraceFetchClientState, TraceLabelPeer)
import Ouroboros.Network.KeepAlive (TraceKeepAliveClient)
import Ouroboros.Network.TxSubmission.Inbound
(TraceTxSubmissionInbound)
import Ouroboros.Network.TxSubmission.Outbound
(TraceTxSubmissionOutbound)
data Tracers' remotePeer localPeer blk f = Tracers
{ forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
chainSyncClientTracer :: f (TraceLabelPeer remotePeer (TraceChainSyncClientEvent blk))
, :: f (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceChainSyncServerEvent blk)
chainSyncServerBlockTracer :: f (TraceChainSyncServerEvent blk)
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f [TraceLabelPeer
remotePeer (FetchDecision [Point (Header blk)])]
blockFetchDecisionTracer :: f [TraceLabelPeer remotePeer (FetchDecision [Point (Header blk)])]
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceFetchClientState (Header blk)))
blockFetchClientTracer :: f (TraceLabelPeer remotePeer (TraceFetchClientState (Header blk)))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
blockFetchServerTracer :: f (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
txInboundTracer :: f (TraceLabelPeer remotePeer (TraceTxSubmissionInbound (GenTxId blk) (GenTx blk)))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer
remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
txOutboundTracer :: f (TraceLabelPeer remotePeer (TraceTxSubmissionOutbound (GenTxId blk) (GenTx blk)))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLocalTxSubmissionServerEvent blk)
localTxSubmissionServerTracer :: f (TraceLocalTxSubmissionServerEvent blk)
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f (TraceEventMempool blk)
mempoolTracer :: f (TraceEventMempool blk)
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (TraceForgeEvent blk))
forgeTracer :: f (TraceLabelCreds (TraceForgeEvent blk))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceBlockchainTimeEvent UTCTime)
blockchainTimeTracer :: f (TraceBlockchainTimeEvent UTCTime)
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelCreds (ForgeStateInfo blk))
forgeStateInfoTracer :: f (TraceLabelCreds (ForgeStateInfo blk))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceKeepAliveClient remotePeer)
keepAliveClientTracer :: f (TraceKeepAliveClient remotePeer)
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f SanityCheckIssue
consensusSanityCheckTracer :: f SanityCheckIssue
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f SomeException
consensusErrorTracer :: f SomeException
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f (TraceGsmEvent (Tip blk))
gsmTracer :: f (TraceGsmEvent (Tip blk))
, forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceGDDEvent remotePeer blk)
gddTracer :: f (TraceGDDEvent remotePeer blk)
}
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
{ 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 (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
chainSyncServerHeaderTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk)))
-> f (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (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 (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
blockFetchServerTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk)))
-> f (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceLabelPeer remotePeer (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
, consensusSanityCheckTracer :: f SanityCheckIssue
consensusSanityCheckTracer = (Tracers' remotePeer localPeer blk f -> f SanityCheckIssue)
-> f SanityCheckIssue
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f -> f SanityCheckIssue
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f SanityCheckIssue
consensusSanityCheckTracer
, consensusErrorTracer :: f SomeException
consensusErrorTracer = (Tracers' remotePeer localPeer blk f -> f SomeException)
-> f SomeException
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f -> f SomeException
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f SomeException
consensusErrorTracer
, gsmTracer :: f (TraceGsmEvent (Tip blk))
gsmTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceGsmEvent (Tip blk)))
-> f (TraceGsmEvent (Tip blk))
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f -> f (TraceGsmEvent (Tip blk))
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f -> f (TraceGsmEvent (Tip blk))
gsmTracer
, gddTracer :: f (TraceGDDEvent remotePeer blk)
gddTracer = (Tracers' remotePeer localPeer blk f
-> f (TraceGDDEvent remotePeer blk))
-> f (TraceGDDEvent remotePeer blk)
forall a.
Semigroup a =>
(Tracers' remotePeer localPeer blk f -> a) -> a
f Tracers' remotePeer localPeer blk f
-> f (TraceGDDEvent remotePeer blk)
forall remotePeer localPeer blk (f :: * -> *).
Tracers' remotePeer localPeer blk f
-> f (TraceGDDEvent remotePeer blk)
gddTracer
}
where
f :: forall a. Semigroup a
=> (Tracers' remotePeer localPeer blk f -> a) -> a
f :: forall a.
Semigroup a =>
(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 :: forall (m :: * -> *) remotePeer localPeer blk.
Monad m =>
Tracers m remotePeer localPeer blk
nullTracers = 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 (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
chainSyncServerHeaderTracer = Tracer
m (TraceLabelPeer remotePeer (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 (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
blockFetchServerTracer = Tracer
m (TraceLabelPeer remotePeer (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
, consensusSanityCheckTracer :: Tracer m SanityCheckIssue
consensusSanityCheckTracer = Tracer m SanityCheckIssue
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, consensusErrorTracer :: Tracer m SomeException
consensusErrorTracer = Tracer m SomeException
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, gsmTracer :: Tracer m (TraceGsmEvent (Tip blk))
gsmTracer = Tracer m (TraceGsmEvent (Tip blk))
forall (m :: * -> *) a. Applicative m => Tracer m a
nullTracer
, gddTracer :: Tracer m (TraceGDDEvent remotePeer blk)
gddTracer = Tracer m (TraceGDDEvent remotePeer blk)
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 :: forall blk remotePeer (m :: * -> *) localPeer.
(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
tr = 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 (TraceLabelPeer remotePeer (TraceChainSyncServerEvent blk))
chainSyncServerHeaderTracer = Tracer m String
-> Tracer
m (TraceLabelPeer remotePeer (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 (TraceLabelPeer remotePeer (TraceBlockFetchServerEvent blk))
blockFetchServerTracer = Tracer m String
-> Tracer
m (TraceLabelPeer remotePeer (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
, consensusSanityCheckTracer :: Tracer m SanityCheckIssue
consensusSanityCheckTracer = Tracer m String -> Tracer m SanityCheckIssue
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, consensusErrorTracer :: Tracer m SomeException
consensusErrorTracer = Tracer m String -> Tracer m SomeException
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, gsmTracer :: Tracer m (TraceGsmEvent (Tip blk))
gsmTracer = Tracer m String -> Tracer m (TraceGsmEvent (Tip blk))
forall a (m :: * -> *). Show a => Tracer m String -> Tracer m a
showTracing Tracer m String
tr
, gddTracer :: Tracer m (TraceGDDEvent remotePeer blk)
gddTracer = Tracer m String -> Tracer m (TraceGDDEvent remotePeer blk)
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
| TraceAdoptionThreadDied SlotNo blk
| TraceForgedInvalidBlock SlotNo blk (ExtValidationError 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
$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
/= :: 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
$cshowsPrec :: forall a. Show a => Int -> TraceLabelCreds a -> ShowS
showsPrec :: Int -> TraceLabelCreds a -> ShowS
$cshow :: forall a. Show a => TraceLabelCreds a -> String
show :: TraceLabelCreds a -> String
$cshowList :: forall a. Show a => [TraceLabelCreds a] -> ShowS
showList :: [TraceLabelCreds a] -> ShowS
Show, (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
$cfmap :: forall a b. (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
fmap :: forall a b. (a -> b) -> TraceLabelCreds a -> TraceLabelCreds b
$c<$ :: forall a b. a -> TraceLabelCreds b -> TraceLabelCreds a
<$ :: forall a b. a -> TraceLabelCreds b -> TraceLabelCreds a
Functor)