Skip to content

Commit

Permalink
Cardano.Node.StateRep
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire authored and Denis Shevchenko committed Feb 7, 2022
1 parent 87e3211 commit fad81eb
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ library
Cardano.Node.Run
Cardano.Node.STM
Cardano.Node.Startup
Cardano.Node.StateRep
Cardano.Node.TraceConstraints
Cardano.Node.Tracing
Cardano.Node.Types
Expand Down
30 changes: 30 additions & 0 deletions cardano-node/src/Cardano/Node/StateRep.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module Cardano.Node.StateRep where

data NodeState blk
-- All node states prior to tracing system going online are effectively invisible.
= NodeTracingOnlineConfiguring -- <- initTraceDispatcher
| NodeConfigCompleteLoadingKernel -- just before Node.run
| NodeChainDBOpening (TraceEvent blk)
-- TraceOpenEvent (TraceOpenEvent blk)
-- StartedOpeningDB
-- StartedOpeningImmutableDB
-- OpenedImmutableDB
-- StartedOpeningVolatileDB
-- OpenedVolatileDB
-- StartedOpeningLgrDB
-- TraceLedgerReplayEvent (LedgerReplayEvent blk)
-- ReplayFromGenesis
-- ReplayFromSnapshot
-- ReplayedBlock
-- TraceOpenEvent (TraceOpenEvent blk)
-- OpenedLgrDB
-- TraceInitChainSelEvent (TraceInitChainSelEvent blk)
-- StartedInitChainSelection
-- InitalChainSelected
-- TraceOpenEvent (TraceOpenEvent blk)
-- OpenedDB
| NodeKernelOnlineSyncing -- just before onKernel in rnNodeKernelHook
| NodeSyncing (TraceEvent blk)
-- TraceAddBlockEvent (TraceAddBlockEvent blk)
-- ChainDB.AddedToCurrentChain
| NodeShutdownComplete -- <- finally in handleNodeWithTracers
24 changes: 24 additions & 0 deletions doc/new-tracing/initialisation-steps.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#+TITLE: Node state datapoints

* Node

Cardano.Node.StateRep

* Consensus
https://github.com/input-output-hk/ouroboros-network/blob/master/ouroboros-consensus/docs/initialization-steps-and-the-related-tracer.org

Consensus init:
+ open the Chain DB
+ open ImmutableDb
+ open VolatileDB
+ open LedgerDB
+ setup the NodeKernel
+ initialize the network layer

- Ouroboros.Consensus.Node.run
- Ouroboros.Consensus.Node.runWith

- TraceValidationEvent blk
- UpdateLedgerDbTraceEvent
- UpdateLedgerDbTraceEvent blk
- StartedPushingBlockToTheLedgerDb

0 comments on commit fad81eb

Please sign in to comment.