ouroboros-consensus-0.28.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.LedgerDB.V2.Backend

Description

Common interface for LedgerDB V2 backends

Synopsis

Backend API

class NoThunks (Resources m backend) ⇒ Backend (m ∷ TypeType) backend blk where Source #

Operations needed to open and operate a LedgerDB V2

Associated Types

data Args (m ∷ TypeType) backend Source #

The Arguments that will be used initially to create the Resources.

data Resources (m ∷ TypeType) backend Source #

The Resources that will be stored in the LedgerDB environment and given to the handle operations.

data Trace (m ∷ TypeType) backend Source #

A trace dependent on the particular backend.

Methods

mkResourcesProxy blk → Tracer m LedgerDBV2TraceArgs m backend → ResourceRegistry m → SomeHasFS m → m (Resources m backend) Source #

Transform Args into Resources, with some context made up of LedgerDbArgs.

releaseResourcesProxy blk → Resources m backend → m () Source #

Release the acquired resources.

newHandleFromValuesTracer m LedgerDBV2TraceResourceRegistry m → Resources m backend → ExtLedgerState blk ValuesMK → m (LedgerTablesHandle m (ExtLedgerState blk)) Source #

Create a new handle from the given values. This will only be called when starting Consensus from Genesis.

newHandleFromSnapshotTracer m LedgerDBV2TraceResourceRegistry m → CodecConfig blk → SomeHasFS m → Resources m backend → DiskSnapshotExceptT (SnapshotFailure blk) m (LedgerSeq' m blk, RealPoint blk) Source #

Create a new handle from a snapshot.

snapshotManagerProxy blk → Resources m backend → CodecConfig blk → Tracer m (TraceSnapshotEvent blk) → SomeHasFS m → SnapshotManager m m blk (StateRef m (ExtLedgerState blk)) Source #

Instantiate the SnapshotManager for this backend.

Existentials

data SomeBackendTrace where Source #

Constructors

SomeBackendTrace ∷ ∀ (m ∷ TypeType) backend. Show (Trace m backend) ⇒ Trace m backend → SomeBackendTrace 

data SomeBackendArgs (m ∷ TypeType) blk where Source #

Constructors

SomeBackendArgs ∷ ∀ (m ∷ TypeType) backend blk. Backend m backend blk ⇒ Args m backend → SomeBackendArgs m blk 

data SomeResources (m ∷ TypeType) blk where Source #

Constructors

SomeResources ∷ ∀ (m ∷ TypeType) backend blk. Backend m backend blk ⇒ Resources m backend → SomeResources m blk 

Instances

Instances details
NoThunks (SomeResources m blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.V2.Backend

Tracing