| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.V2.InMemory
Synopsis
- class NoThunks (Resources m backend) ⇒ Backend (m ∷ Type → Type) backend blk where
- data Args (m ∷ Type → Type) backend
- data Resources (m ∷ Type → Type) backend
- data Trace backend
- mkResources ∷ Proxy blk → Tracer m LedgerDBV2Trace → Args m backend → SomeHasFS m → WithTempRegistry fState m (Resources m backend)
- releaseResources ∷ Proxy blk → Resources m backend → m ()
- createAndPopulateStateRefFromGenesis ∷ Tracer m LedgerDBV2Trace → Resources m backend → ExtLedgerState blk ValuesMK → m (StateRef m ExtLedgerState blk)
- openStateRefFromSnapshot ∷ Tracer m LedgerDBV2Trace → CodecConfig blk → SomeHasFS m → Resources m backend → DiskSnapshot → ExceptT (SnapshotFailure blk) m (StateRef m ExtLedgerState blk, RealPoint blk)
- snapshotManager ∷ Proxy blk → Resources m backend → CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → SnapshotManager m blk (StateRef m ExtLedgerState blk)
- data family Args (m ∷ Type → Type) backend
- data family Trace backend
- data Mem
- data family YieldArgs (m ∷ Type → Type) backend (l ∷ Type → (Type → Type → Type) → Type) blk
- data family SinkArgs (m ∷ Type → Type) backend (l ∷ Type → (Type → Type → Type) → Type) blk
- mkInMemoryArgs ∷ ∀ (m ∷ Type → Type) blk a. (IOLike m, LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk, CanUpgradeLedgerTables LedgerState blk) ⇒ a → (LedgerDbBackendArgs m blk, a)
Documentation
class NoThunks (Resources m backend) ⇒ Backend (m ∷ Type → Type) backend blk where Source #
Operations needed to open and operate a LedgerDB V2
Associated Types
data Args (m ∷ Type → Type) backend Source #
The Arguments that will be used initially to create the Resources.
data Resources (m ∷ Type → Type) backend Source #
The Resources that will be stored in the LedgerDB environment and given to the handle operations.
A trace dependent on the particular backend.
Methods
mkResources ∷ Proxy blk → Tracer m LedgerDBV2Trace → Args m backend → SomeHasFS m → WithTempRegistry fState m (Resources m backend) Source #
releaseResources ∷ Proxy blk → Resources m backend → m () Source #
Release the acquired resources.
createAndPopulateStateRefFromGenesis ∷ Tracer m LedgerDBV2Trace → Resources m backend → ExtLedgerState blk ValuesMK → m (StateRef m ExtLedgerState blk) Source #
Create a new handle from the given Genesis state.
openStateRefFromSnapshot ∷ Tracer m LedgerDBV2Trace → CodecConfig blk → SomeHasFS m → Resources m backend → DiskSnapshot → ExceptT (SnapshotFailure blk) m (StateRef m ExtLedgerState blk, RealPoint blk) Source #
Create a new handle from a snapshot.
snapshotManager ∷ Proxy blk → Resources m backend → CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → SnapshotManager m blk (StateRef m ExtLedgerState blk) Source #
Instantiate the SnapshotManager for this backend.
Instances
| (IOLike m, LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk, CanUpgradeLedgerTables LedgerState blk) ⇒ Backend m Mem blk Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.V2.InMemory Methods mkResources ∷ Proxy blk → Tracer m LedgerDBV2Trace → Args m Mem → SomeHasFS m → WithTempRegistry fState m (Resources m Mem) Source # releaseResources ∷ Proxy blk → Resources m Mem → m () Source # createAndPopulateStateRefFromGenesis ∷ Tracer m LedgerDBV2Trace → Resources m Mem → ExtLedgerState blk ValuesMK → m (StateRef m ExtLedgerState blk) Source # openStateRefFromSnapshot ∷ Tracer m LedgerDBV2Trace → CodecConfig blk → SomeHasFS m → Resources m Mem → DiskSnapshot → ExceptT (SnapshotFailure blk) m (StateRef m ExtLedgerState blk, RealPoint blk) Source # snapshotManager ∷ Proxy blk → Resources m Mem → CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → SnapshotManager m blk (StateRef m ExtLedgerState blk) Source # | |
data family Args (m ∷ Type → Type) backend Source #
The Arguments that will be used initially to create the Resources.
data family Trace backend Source #
A trace dependent on the particular backend.
Instances
data family YieldArgs (m ∷ Type → Type) backend (l ∷ Type → (Type → Type → Type) → Type) blk Source #
data family SinkArgs (m ∷ Type → Type) backend (l ∷ Type → (Type → Type → Type) → Type) blk Source #
Instances
| data SinkArgs m Mem l blk Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.V2.InMemory data SinkArgs m Mem l blk = SinkInMemory Int (TxIn blk → Encoding) (TxOut blk → Encoding) (SomeHasFS m) DiskSnapshot | |
mkInMemoryArgs ∷ ∀ (m ∷ Type → Type) blk a. (IOLike m, LedgerDbSerialiseConstraints blk, LedgerSupportsProtocol blk, CanUpgradeLedgerTables LedgerState blk) ⇒ a → (LedgerDbBackendArgs m blk, a) Source #
Create arguments for initializing the LedgerDB using the InMemory backend.