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

Ouroboros.Consensus.Storage.LedgerDB.Query

Synopsis

Documentation

ledgerDbAnchorLedgerDB l → l Source #

Information about the state of the ledger at the anchor

ledgerDbCurrentGetTip l ⇒ LedgerDB l → l Source #

The ledger state at the tip of the chain

ledgerDbIsSaturatedGetTip l ⇒ SecurityParamLedgerDB l → Bool Source #

Have we seen at least k blocks?

ledgerDbMaxRollbackGetTip l ⇒ LedgerDB l → Word64 Source #

How many blocks can we currently roll back?

ledgerDbPast ∷ (HasHeader blk, IsLedger l, HeaderHash l ~ HeaderHash blk) ⇒ Point blk → LedgerDB l → Maybe l Source #

Get a past ledger state

\( O(\log(\min(i,n-i)) \)

When no ledger state (or anchor) has the given Point, Nothing is returned.

ledgerDbSnapshotsLedgerDB l → [(Word64, l)] Source #

All snapshots currently stored by the ledger DB (new to old)

This also includes the snapshot at the anchor. For each snapshot we also return the distance from the tip.

ledgerDbTipGetTip l ⇒ LedgerDB l → Point l Source #

Reference to the block at the tip of the chain