Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DiskPolicy = DiskPolicy {
- onDiskNumSnapshots ∷ Word
- onDiskShouldTakeSnapshot ∷ TimeSinceLast DiffTime → Word64 → Bool
- onDiskShouldChecksumSnapshots ∷ Flag "DoDiskSnapshotChecksum"
- data DiskPolicyArgs = DiskPolicyArgs SnapshotInterval NumOfDiskSnapshots (Flag "DoDiskSnapshotChecksum")
- data NumOfDiskSnapshots
- data SnapshotInterval
- data TimeSinceLast time
- = NoSnapshotTakenYet
- | TimeSinceLast time
- defaultDiskPolicyArgs ∷ DiskPolicyArgs
- mkDiskPolicy ∷ SecurityParam → DiskPolicyArgs → DiskPolicy
- pattern DoDiskSnapshotChecksum ∷ Flag "DoDiskSnapshotChecksum"
- pattern NoDoDiskSnapshotChecksum ∷ Flag "DoDiskSnapshotChecksum"
- newtype Flag (name ∷ Symbol) = Flag {}
Documentation
data DiskPolicy Source #
On-disk policy
We only write ledger states that are older than k
blocks to disk (that is,
snapshots that are guaranteed valid). The on-disk policy determines how often
we write to disk and how many checkpoints we keep.
DiskPolicy | |
|
Instances
data DiskPolicyArgs Source #
The components used by cardano-node to construct a
.DiskPolicy
DiskPolicyArgs SnapshotInterval NumOfDiskSnapshots (Flag "DoDiskSnapshotChecksum") |
data NumOfDiskSnapshots Source #
Number of snapshots to be stored on disk. This is either the default value
as determined by the
, or it is provided by the user. See the
DiskPolicy
documentation for more information.DiskPolicy
Instances
Generic NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy type Rep NumOfDiskSnapshots ∷ Type → Type # | |
Show NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy showsPrec ∷ Int → NumOfDiskSnapshots → ShowS # show ∷ NumOfDiskSnapshots → String # showList ∷ [NumOfDiskSnapshots] → ShowS # | |
Eq NumOfDiskSnapshots Source # | |
type Rep NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy type Rep NumOfDiskSnapshots = D1 ('MetaData "NumOfDiskSnapshots" "Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "DefaultNumOfDiskSnapshots" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "RequestedNumOfDiskSnapshots" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word))) |
data SnapshotInterval Source #
Length of time, requested by the user, that has to pass after which a snapshot is taken. It can be:
- either explicitly provided by user in seconds
- or default value can be requested - the specific
determines what that is exactly, seeDiskPolicy
mkDiskPolicy
as an example
Instances
Generic SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy type Rep SnapshotInterval ∷ Type → Type # from ∷ SnapshotInterval → Rep SnapshotInterval x # to ∷ Rep SnapshotInterval x → SnapshotInterval # | |
Show SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy showsPrec ∷ Int → SnapshotInterval → ShowS # show ∷ SnapshotInterval → String # showList ∷ [SnapshotInterval] → ShowS # | |
Eq SnapshotInterval Source # | |
type Rep SnapshotInterval Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy type Rep SnapshotInterval = D1 ('MetaData "SnapshotInterval" "Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy" "ouroboros-consensus-0.21.0.0-inplace" 'False) (C1 ('MetaCons "DefaultSnapshotInterval" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "RequestedSnapshotInterval" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DiffTime))) |
data TimeSinceLast time Source #
Instances
Functor TimeSinceLast Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy fmap ∷ (a → b) → TimeSinceLast a → TimeSinceLast b # (<$) ∷ a → TimeSinceLast b → TimeSinceLast a # | |
Show time ⇒ Show (TimeSinceLast time) Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy showsPrec ∷ Int → TimeSinceLast time → ShowS # show ∷ TimeSinceLast time → String # showList ∷ [TimeSinceLast time] → ShowS # |
defaultDiskPolicyArgs ∷ DiskPolicyArgs Source #
Default on-disk policy arguments suitable to use with cardano-node
pattern DoDiskSnapshotChecksum ∷ Flag "DoDiskSnapshotChecksum" Source #
Type-safe flag to regulate the checksum policy of the ledger state snapshots.
These patterns are exposed to cardano-node and will be passed as part of
.DiskPolicy
pattern NoDoDiskSnapshotChecksum ∷ Flag "DoDiskSnapshotChecksum" Source #
Type-safe flag to regulate the checksum policy of the ledger state snapshots.
These patterns are exposed to cardano-node and will be passed as part of
.DiskPolicy
Re-exports
newtype Flag (name ∷ Symbol) Source #
Type-safe boolean flags with type level tags
It is recommended to create pattern synonyms for the true and false values.
See DiskSnapshotChecksum
for an example.