| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.Args
Contents
Description
Arguments for LedgerDB initialization.
Synopsis
- data LedgerDbArgs (f ∷ Type → Type) (m ∷ Type → Type) blk = LedgerDbArgs {
- lgrSnapshotPolicyArgs ∷ SnapshotPolicyArgs
- lgrGenesis ∷ HKD f (m (ExtLedgerState blk ValuesMK))
- lgrHasFS ∷ HKD f (SomeHasFS m)
- lgrConfig ∷ LedgerDbCfgF f (ExtLedgerState blk)
- lgrTracer ∷ !(Tracer m (TraceEvent blk))
- lgrBackendArgs ∷ LedgerDbBackendArgs m blk
- lgrRegistry ∷ HKD f (ResourceRegistry m)
- lgrQueryBatchSize ∷ QueryBatchSize
- lgrStartSnapshot ∷ Maybe DiskSnapshot
- data LedgerDbBackendArgs (m ∷ Type → Type) blk
- = LedgerDbBackendArgsV1 (LedgerDbBackendArgs m (ExtLedgerState blk))
- | LedgerDbBackendArgsV2 (SomeBackendArgs m blk)
- data QueryBatchSize
- defaultArgs ∷ ∀ (m ∷ Type → Type) blk. Applicative m ⇒ SomeBackendArgs m blk → Incomplete LedgerDbArgs m blk
- defaultQueryBatchSize ∷ QueryBatchSize → Word64
- newtype GetVolatileSuffix (m ∷ Type → Type) blk = GetVolatileSuffix {
- getVolatileSuffix ∷ ∀ s. Anchorable (WithOrigin SlotNo) s s ⇒ STM m (AnchoredSeq (WithOrigin SlotNo) s s → AnchoredSeq (WithOrigin SlotNo) s s)
- praosGetVolatileSuffix ∷ ∀ (m ∷ Type → Type) blk. IOLike m ⇒ SecurityParam → GetVolatileSuffix m blk
Documentation
data LedgerDbArgs (f ∷ Type → Type) (m ∷ Type → Type) blk Source #
Arguments required to initialize a LedgerDB.
Constructors
| LedgerDbArgs | |
Fields
| |
data LedgerDbBackendArgs (m ∷ Type → Type) blk Source #
Constructors
| LedgerDbBackendArgsV1 (LedgerDbBackendArgs m (ExtLedgerState blk)) | |
| LedgerDbBackendArgsV2 (SomeBackendArgs m blk) |
data QueryBatchSize Source #
The maximum number of keys to read in a forker range query.
When performing a ledger state query that involves on-disk parts of the
ledger state, we might have to read ranges of key-value pair data (e.g.,
UTxO) from disk using forker range queries. Instead of reading all
data in one go, we read it in batches. QueryBatchSize determines the size
of these batches.
INVARIANT: Should be at least 1.
It is fine if the result of a range read contains less than this number of keys, but it should never return more.
Constructors
| DefaultQueryBatchSize | A default value, which is determined by a specific
|
| RequestedQueryBatchSize Word64 | A requested value: the number of keys to read from disk in each batch. |
Instances
defaultArgs ∷ ∀ (m ∷ Type → Type) blk. Applicative m ⇒ SomeBackendArgs m blk → Incomplete LedgerDbArgs m blk Source #
Default arguments
GetVolatileSuffix
newtype GetVolatileSuffix (m ∷ Type → Type) blk Source #
Get the volatile suffix of the given AnchoredSeq of states that the
LedgerDB maintains.
Constructors
| GetVolatileSuffix | |
Fields
| |
Instances
| NoThunks (GetVolatileSuffix m blk) Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.Args | |
praosGetVolatileSuffix ∷ ∀ (m ∷ Type → Type) blk. IOLike m ⇒ SecurityParam → GetVolatileSuffix m blk Source #
Return the the most recent k blocks, which is the rule mandated by Praos.