ouroboros-consensus-0.26.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.LedgerDB

Contents

Synopsis

API

Impl

openDB Source #

Arguments

∷ (IOLike m, LedgerSupportsProtocol blk, LedgerDbSerialiseConstraints blk, InspectLedger blk, HasCallStack, HasHardForkHistory blk, LedgerSupportsLedgerDB blk) 
Complete LedgerDbArgs m blk

Stateless initializaton arguments

StreamAPI m blk blk

Stream source for blocks.

After reading a snapshot from disk, the ledger DB will be brought up to date with the tip of this steam of blocks. The corresponding ledger state can then be used as the starting point for chain selection in the ChainDB driver.

Point blk

The Replay goal i.e. the tip of the stream of blocks.

ResolveBlock m blk

How to get blocks from the ChainDB

→ m (LedgerDB' m blk, Word64) 

openDBInternal ∷ (IOLike m, LedgerSupportsProtocol blk, InspectLedger blk, HasCallStack) ⇒ Complete LedgerDbArgs m blk → InitDB db m blk → StreamAPI m blk blk → Point blk → m (LedgerDB' m blk, Word64, TestInternals' m blk) Source #

Open the ledger DB and expose internals for testing purposes