Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Opts = Opts {}
- run ∷ Opts → IO ()
- data DBDirs a = DBDirs {}
- withDBs ∷ ∀ m blk a. (IOLike m, ConvertRawHash blk, LedgerSupportsProtocol blk, ImmutableDbSerialiseConstraints blk, VolatileDbSerialiseConstraints blk, NodeInitStorage blk) ⇒ TopLevelConfig blk → ResourceRegistry m → DBDirs (SomeHasFS m) → (ImmutableDB m blk → VolatileDB m blk → m a) → m a
- data TraceImmutalisationEvent blk
- = TraceStartImmutalisation (WithOrigin (Tip blk)) MaxSlotNo
- | TraceNoVolatileCandidate
- | TraceFoundCandidate (HeaderHash blk) Int (SelectView (BlockProtocol blk))
- | TraceCopiedtoImmutableDB (WithOrigin (Tip blk))
- immutalise ∷ ∀ m blk. (IOLike m, BlockSupportsProtocol blk) ⇒ BlockConfig blk → Tracer m (TraceImmutalisationEvent blk) → ImmutableDB m blk → VolatileDB m blk → m ()
Documentation
Setup
Instances
Foldable DBDirs Source # | |
Defined in Cardano.Tools.DBImmutaliser.Run fold ∷ Monoid m ⇒ DBDirs m → m # foldMap ∷ Monoid m ⇒ (a → m) → DBDirs a → m # foldMap' ∷ Monoid m ⇒ (a → m) → DBDirs a → m # foldr ∷ (a → b → b) → b → DBDirs a → b # foldr' ∷ (a → b → b) → b → DBDirs a → b # foldl ∷ (b → a → b) → b → DBDirs a → b # foldl' ∷ (b → a → b) → b → DBDirs a → b # foldr1 ∷ (a → a → a) → DBDirs a → a # foldl1 ∷ (a → a → a) → DBDirs a → a # elem ∷ Eq a ⇒ a → DBDirs a → Bool # maximum ∷ Ord a ⇒ DBDirs a → a # | |
Traversable DBDirs Source # | |
Functor DBDirs Source # | |
withDBs ∷ ∀ m blk a. (IOLike m, ConvertRawHash blk, LedgerSupportsProtocol blk, ImmutableDbSerialiseConstraints blk, VolatileDbSerialiseConstraints blk, NodeInitStorage blk) ⇒ TopLevelConfig blk → ResourceRegistry m → DBDirs (SomeHasFS m) → (ImmutableDB m blk → VolatileDB m blk → m a) → m a Source #
Immutalise
data TraceImmutalisationEvent blk Source #
TraceStartImmutalisation | |
| |
TraceNoVolatileCandidate | No blocks in the VolatileDB extend the immutable tip. |
TraceFoundCandidate | Found a volatile candidate extending the immutable tip. |
| |
TraceCopiedtoImmutableDB | |
|
Instances
(ConsensusProtocol (BlockProtocol blk), StandardHash blk) ⇒ Show (TraceImmutalisationEvent blk) Source # | |
Defined in Cardano.Tools.DBImmutaliser.Run showsPrec ∷ Int → TraceImmutalisationEvent blk → ShowS # show ∷ TraceImmutalisationEvent blk → String # showList ∷ [TraceImmutalisationEvent blk] → ShowS # |
immutalise ∷ ∀ m blk. (IOLike m, BlockSupportsProtocol blk) ⇒ BlockConfig blk → Tracer m (TraceImmutalisationEvent blk) → ImmutableDB m blk → VolatileDB m blk → m () Source #
Copy a specific chain from the given VolatileDB
to the ImmutableDB
,
such that other tools that only work with an ImmutableDB
can process the
corresponding blocks.
This function requires exclusive access to the databases.
Currently, this will pick the best (according to the SelectView
) chain
extending the immutable tip, and it will _not_ do any kind of validation.
Future work might include customizing this behavior, like:
- picking the best _valid_ chain (requires reading a ledger snapshot and/or replaying)
- picking a chain that contains particular points (user input)