14
14
15
15
module Cardano.Node.Tracing.Tracers.Consensus
16
16
(
17
- TraceStartLeadershipCheckPlus (.. )
18
- , ForgeTracerType
19
- , forgeTracerTransform
20
- , initialClientMetrics
17
+ initialClientMetrics
21
18
, calculateBlockFetchClientMetrics
22
19
, servedBlockLatest
23
20
, ClientMetrics
@@ -31,7 +28,6 @@ import Cardano.Node.Tracing.Era.Shelley ()
31
28
import Cardano.Node.Tracing.Formatting ()
32
29
import Cardano.Node.Tracing.Render
33
30
import Cardano.Node.Tracing.Tracers.ConsensusStartupException ()
34
- import Cardano.Node.Tracing.Tracers.StartLeadershipCheck
35
31
import Cardano.Protocol.TPraos.OCert (KESPeriod (.. ))
36
32
import Cardano.Slotting.Slot (WithOrigin (.. ))
37
33
import Cardano.Tracing.OrphanInstances.Network (Verbose (.. ))
@@ -76,7 +72,7 @@ import Ouroboros.Network.TxSubmission.Outbound
76
72
77
73
import Control.Monad (guard )
78
74
import Control.Monad.Class.MonadTime.SI (Time (.. ))
79
- import Data.Aeson (ToJSON , Value (Number , String ), toJSON , (.=) )
75
+ import Data.Aeson (ToJSON , Value (.. ), toJSON , (.=) )
80
76
import qualified Data.Aeson as Aeson
81
77
import Data.Foldable (Foldable (toList ))
82
78
import Data.Int (Int64 )
@@ -1386,102 +1382,6 @@ instance MetaTrace (TraceEventMempool blk) where
1386
1382
, Namespace [] [" Synced" ]
1387
1383
]
1388
1384
1389
- --------------------------------------------------------------------------------
1390
- -- ForgeTracerType
1391
- --------------------------------------------------------------------------------
1392
-
1393
- instance ( tx ~ GenTx blk
1394
- , ConvertRawHash blk
1395
- , GetHeader blk
1396
- , HasHeader blk
1397
- , HasKESInfo blk
1398
- , LedgerSupportsProtocol blk
1399
- , LedgerSupportsMempool blk
1400
- , SerialiseNodeToNodeConstraints blk
1401
- , HasTxId (GenTx blk )
1402
- , Show (ForgeStateUpdateError blk )
1403
- , Show (CannotForge blk )
1404
- , LogFormatting (CannotForge blk )
1405
- , LogFormatting (ExtValidationError blk )
1406
- , LogFormatting (ForgeStateUpdateError blk ))
1407
- => LogFormatting (ForgeTracerType blk ) where
1408
- forMachine dtal (Left i) = forMachine dtal i
1409
- forMachine dtal (Right i) = forMachine dtal i
1410
- forHuman (Left i) = forHumanOrMachine i
1411
- forHuman (Right i) = forHumanOrMachine i
1412
- asMetrics (Left i) = asMetrics i
1413
- asMetrics (Right i) = asMetrics i
1414
-
1415
- instance MetaTrace (ForgeTracerType blk ) where
1416
- namespaceFor (Left ev) =
1417
- nsCast (namespaceFor ev)
1418
- namespaceFor (Right _ev) =
1419
- Namespace [] [" StartLeadershipCheckPlus" ]
1420
-
1421
- severityFor (Namespace _ [" StartLeadershipCheckPlus" ]) _ = Just
1422
- Info
1423
- severityFor ns (Just (Left ev')) =
1424
- severityFor (nsCast ns) (Just ev')
1425
- severityFor ns Nothing =
1426
- severityFor (nsCast ns :: Namespace (TraceForgeEvent blk )) Nothing
1427
- severityFor _ _ = Nothing
1428
-
1429
- detailsFor (Namespace _ [" StartLeadershipCheckPlus" ]) _ = Just
1430
- DNormal
1431
- detailsFor ns (Just (Left ev')) =
1432
- detailsFor (nsCast ns) (Just ev')
1433
- detailsFor ns Nothing =
1434
- detailsFor (nsCast ns :: Namespace (TraceForgeEvent blk )) Nothing
1435
- detailsFor _ _ = Nothing
1436
-
1437
- privacyFor (Namespace _ [" StartLeadershipCheckPlus" ]) _ = Just
1438
- Public
1439
- privacyFor ns (Just (Left ev')) =
1440
- privacyFor (nsCast ns) (Just ev')
1441
- privacyFor ns Nothing =
1442
- privacyFor (nsCast ns :: Namespace (TraceForgeEvent blk )) Nothing
1443
- privacyFor _ _ = Nothing
1444
-
1445
- metricsDocFor (Namespace _ [" StartLeadershipCheckPlus" ]) =
1446
- [ (" Forge.UtxoSize" , " UTxO set size" )
1447
- , (" Forge.DelegMapSize" , " Delegation map size" )
1448
- ]
1449
- metricsDocFor ns =
1450
- metricsDocFor (nsCast ns :: Namespace (TraceForgeEvent blk ))
1451
-
1452
- documentFor (Namespace _ [" StartLeadershipCheckPlus" ]) = Just $ mconcat
1453
- [ " We adopted the block we produced, we also trace the transactions"
1454
- , " that were adopted."
1455
- ]
1456
- documentFor ns =
1457
- documentFor (nsCast ns :: Namespace (TraceForgeEvent blk ))
1458
-
1459
- allNamespaces =
1460
- Namespace [] [" StartLeadershipCheckPlus" ]
1461
- : map nsCast (allNamespaces :: [Namespace (TraceForgeEvent blk )])
1462
-
1463
- --------------------------------------------------------------------------------
1464
- -- TraceStartLeadershipCheck
1465
- --------------------------------------------------------------------------------
1466
-
1467
- instance LogFormatting TraceStartLeadershipCheckPlus where
1468
- forMachine _dtal TraceStartLeadershipCheckPlus {.. } =
1469
- mconcat [ " kind" .= String " TraceStartLeadershipCheck"
1470
- , " slot" .= toJSON (unSlotNo tsSlotNo)
1471
- , " utxoSize" .= Number (fromIntegral tsUtxoSize)
1472
- , " delegMapSize" .= Number (fromIntegral tsDelegMapSize)
1473
- , " chainDensity" .= Number (fromRational (toRational tsChainDensity))
1474
- ]
1475
- forHuman TraceStartLeadershipCheckPlus {.. } =
1476
- " Checking for leadership in slot " <> showT (unSlotNo tsSlotNo)
1477
- <> " utxoSize " <> showT tsUtxoSize
1478
- <> " delegMapSize " <> showT tsDelegMapSize
1479
- <> " chainDensity " <> showT tsChainDensity
1480
- asMetrics TraceStartLeadershipCheckPlus {.. } =
1481
- [IntM " utxoSize" (fromIntegral tsUtxoSize),
1482
- IntM " delegMapSize" (fromIntegral tsDelegMapSize)]
1483
-
1484
-
1485
1385
--------------------------------------------------------------------------------
1486
1386
-- ForgeEvent Tracer
1487
1387
--------------------------------------------------------------------------------
0 commit comments