ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Ledger.Inspect

Documentation

class (Show (LedgerWarning blk), Show (LedgerUpdate blk), Eq (LedgerWarning blk), Eq (LedgerUpdate blk), Condense (LedgerUpdate blk)) ⇒ InspectLedger blk where Source #

Minimal complete definition

Nothing

Associated Types

type LedgerWarning blk ∷ Type Source #

type LedgerWarning blk = Void

type LedgerUpdate blk ∷ Type Source #

type LedgerUpdate blk = Void

Methods

inspectLedger Source #

Arguments

TopLevelConfig blk 
LedgerState blk

Before

LedgerState blk

After

→ [LedgerEvent blk] 

Inspect the ledger

The point of the inspection is to see if the state of the ledger might indicate a potential misconfiguration of the node.

TODO: We might at some point need to generalize this to ExtLedgerState instead. That doesn't fit quite so neatly with the HFC at present, so leaving it at this for now.

default inspectLedger ∷ (LedgerWarning blk ~ Void, LedgerUpdate blk ~ Void) ⇒ TopLevelConfig blk → LedgerState blk → LedgerState blk → [LedgerEvent blk] Source #

Instances

Instances details
CanHardFork xs ⇒ InspectLedger (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

InspectLedger m ⇒ InspectLedger (DualBlock m a) Source #

InspectLedger just refers to the main block

InspectLedger is intended to check the ledger state against the node's configuration, and hence takes a full TopLevelConfig. However, we cannot construct that for the auxiliary block, since we have no protocol config for it. We therefore just use the main block.

Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type LedgerWarning (DualBlock m a) Source #

type LedgerUpdate (DualBlock m a) Source #

data LedgerEvent blk Source #

Instances

Instances details
InspectLedger blk ⇒ Show (LedgerEvent blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Inspect

Methods

showsPrecIntLedgerEvent blk → ShowS #

showLedgerEvent blk → String #

showList ∷ [LedgerEvent blk] → ShowS #

InspectLedger blk ⇒ Eq (LedgerEvent blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Inspect

Methods

(==)LedgerEvent blk → LedgerEvent blk → Bool #

(/=)LedgerEvent blk → LedgerEvent blk → Bool #