ouroboros-consensus-0.26.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
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 Source #

type LedgerWarning blk = Void

type LedgerUpdate blk Source #

type LedgerUpdate blk = Void

Methods

inspectLedger Source #

Arguments

∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). TopLevelConfig blk 
LedgerState blk mk1

Before

LedgerState blk mk2

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 Source #

Arguments

∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). (LedgerWarning blk ~ Void, LedgerUpdate blk ~ Void) 
TopLevelConfig blk 
LedgerState blk mk1

Before

LedgerState blk mk2

After

→ [LedgerEvent blk] 

Instances

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

Methods

inspectLedger ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). TopLevelConfig (HardForkBlock xs) → LedgerState (HardForkBlock xs) mk1 → LedgerState (HardForkBlock xs) mk2 → [LedgerEvent (HardForkBlock xs)] Source #

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) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type LedgerUpdate (DualBlock m a) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

inspectLedger ∷ ∀ (mk1 ∷ MapKind) (mk2 ∷ MapKind). TopLevelConfig (DualBlock m a) → LedgerState (DualBlock m a) mk1 → LedgerState (DualBlock m a) mk2 → [LedgerEvent (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 #