Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.V2.InMemory
Contents
Synopsis
- newInMemoryLedgerTablesHandle ∷ ∀ m (l ∷ LedgerStateKind). (IOLike m, HasLedgerTables l, CanUpgradeLedgerTables l, SerializeTablesWithHint l) ⇒ SomeHasFS m → LedgerTables l ValuesMK → m (LedgerTablesHandle m l)
- loadSnapshot ∷ ∀ blk (m ∷ Type → Type). (LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk, IOLike m, LedgerSupportsInMemoryLedgerDB blk) ⇒ ResourceRegistry m → CodecConfig blk → SomeHasFS m → DiskSnapshot → ExceptT (SnapshotFailure blk) m (LedgerSeq' m blk, RealPoint blk)
- snapshotToStatePath ∷ DiskSnapshot → FsPath
- snapshotToTablePath ∷ DiskSnapshot → FsPath
- takeSnapshot ∷ (IOLike m, LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk) ⇒ CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → Maybe String → StateRef m (ExtLedgerState blk) → m (Maybe (DiskSnapshot, RealPoint blk))
LedgerTablesHandle
newInMemoryLedgerTablesHandle ∷ ∀ m (l ∷ LedgerStateKind). (IOLike m, HasLedgerTables l, CanUpgradeLedgerTables l, SerializeTablesWithHint l) ⇒ SomeHasFS m → LedgerTables l ValuesMK → m (LedgerTablesHandle m l) Source #
Snapshots
loadSnapshot ∷ ∀ blk (m ∷ Type → Type). (LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk, IOLike m, LedgerSupportsInMemoryLedgerDB blk) ⇒ ResourceRegistry m → CodecConfig blk → SomeHasFS m → DiskSnapshot → ExceptT (SnapshotFailure blk) m (LedgerSeq' m blk, RealPoint blk) Source #
Read snapshot from disk.
Fail on data corruption, i.e. when the checksum of the read data differs
from the one tracked by
.DiskSnapshot
snapshotToStatePath ∷ DiskSnapshot → FsPath Source #
The path within the LedgerDB's filesystem to the file that contains the snapshot's serialized ledger state
takeSnapshot ∷ (IOLike m, LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk) ⇒ CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → Maybe String → StateRef m (ExtLedgerState blk) → m (Maybe (DiskSnapshot, RealPoint blk)) Source #