Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy
Contents
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.
Constructors
DiskPolicy | |
Fields
|
Instances
data DiskPolicyArgs Source #
The components used by cardano-node to construct a
.DiskPolicy
Constructors
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
Constructors
DefaultNumOfDiskSnapshots | |
RequestedNumOfDiskSnapshots Word |
Instances
Generic NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Associated Types type Rep NumOfDiskSnapshots ∷ Type → Type # Methods | |
Show NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods showsPrec ∷ Int → NumOfDiskSnapshots → ShowS # show ∷ NumOfDiskSnapshots → String # showList ∷ [NumOfDiskSnapshots] → ShowS # | |
Eq NumOfDiskSnapshots Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods | |
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.22.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
Constructors
DefaultSnapshotInterval | |
RequestedSnapshotInterval DiffTime |
Instances
data TimeSinceLast time Source #
Constructors
NoSnapshotTakenYet | |
TimeSinceLast time |
Instances
Functor TimeSinceLast Source # | |
Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy Methods 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 Methods 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.