Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore
Contents
Description
See Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API for the documentation. This module just puts together the implementations for the API, currently two:
- Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.InMemory: a
TVar
holding a Data.Map. - Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.Impl.LMDB: an external disk-based database.
Synopsis
- module Ouroboros.Consensus.Storage.LedgerDB.V1.BackingStore.API
- newBackingStore ∷ (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → l EmptyMK → LedgerTables l ValuesMK → m (LedgerBackingStore m l)
- restoreBackingStore ∷ (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → l EmptyMK → FsPath → m (LedgerBackingStore m l)
- data FlavorImplSpecificTrace
- data FlavorImplSpecificTraceInMemory
- data FlavorImplSpecificTraceOnDisk
- newBackingStoreInitialiser ∷ ∀ m (l ∷ LedgerStateKind). (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → BackingStoreInitialiser m l
API
Most of the documentation on the behaviour of the BackingStore
lives
in this module.
Initialization
newBackingStore ∷ (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → l EmptyMK → LedgerTables l ValuesMK → m (LedgerBackingStore m l) Source #
Create a BackingStore
from the given initial tables.
restoreBackingStore ∷ (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → l EmptyMK → FsPath → m (LedgerBackingStore m l) Source #
Overwrite the BackingStore
tables with the snapshot's tables
Tracing
data FlavorImplSpecificTrace Source #
Constructors
FlavorImplSpecificTraceInMemory FlavorImplSpecificTraceInMemory | |
FlavorImplSpecificTraceOnDisk FlavorImplSpecificTraceOnDisk |
Instances
Testing
newBackingStoreInitialiser ∷ ∀ m (l ∷ LedgerStateKind). (IOLike m, HasLedgerTables l, HasCallStack, CanUpgradeLedgerTables l, MemPackIdx l EmptyMK ~ l EmptyMK, SerializeTablesWithHint l) ⇒ Tracer m FlavorImplSpecificTrace → Complete BackingStoreArgs m → SnapshotsFS m → BackingStoreInitialiser m l Source #