| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB
Synopsis
- module Ouroboros.Consensus.Storage.LedgerDB.API
- module Ouroboros.Consensus.Storage.LedgerDB.Args
- module Ouroboros.Consensus.Storage.LedgerDB.Forker
- module Ouroboros.Consensus.Storage.LedgerDB.TraceEvent
- openDB ∷ (IOLike m, LedgerSupportsProtocol blk, InspectLedger blk, HasCallStack, HasHardForkHistory blk, LedgerSupportsLedgerDB blk) ⇒ Complete LedgerDbArgs m blk → StreamAPI m blk blk → Point blk → ResolveBlock m blk → GetVolatileSuffix m blk → WithTempRegistry st m (LedgerDB' m blk, Word64)
- openDBInternal ∷ ∀ m blk db (n ∷ Type → Type) st. (IOLike m, LedgerSupportsProtocol blk, InspectLedger blk, HasCallStack) ⇒ Complete LedgerDbArgs m blk → InitDB db m blk → SnapshotManager m n blk st → StreamAPI m blk blk → Point blk → m (LedgerDB' m blk, Word64, TestInternals' m blk)
API
Impl
Arguments
| ∷ (IOLike m, LedgerSupportsProtocol 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 |
| → GetVolatileSuffix m blk | |
| → WithTempRegistry st m (LedgerDB' m blk, Word64) |
Open the LedgerDB database
It's crucial that this is scoped within the same runWithTempRegistry call
that includes the allocation of the ChainDB itself into the top-level
resource registry. That's why the whole openDB function is in
WithTempRegistry even though there's just the one part of it that actually
puts stuff in that registry.
openDBInternal ∷ ∀ m blk db (n ∷ Type → Type) st. (IOLike m, LedgerSupportsProtocol blk, InspectLedger blk, HasCallStack) ⇒ Complete LedgerDbArgs m blk → InitDB db m blk → SnapshotManager m n blk st → 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