Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data HistoricalChainSyncMessage
- data HistoricityCheck m blk = HistoricityCheck {}
- newtype HistoricityCutoff = HistoricityCutoff {}
- data HistoricityException = ∀ blk.HasHeader blk ⇒ HistoricityException {}
- mkCheck ∷ ∀ m blk. (Monad m, HasHeader blk, HasAnnTip blk) ⇒ SystemTime m → m GsmState → HistoricityCutoff → HistoricityCheck m blk
- noCheck ∷ Applicative m ⇒ HistoricityCheck m blk
Interface
data HistoricalChainSyncMessage Source #
ChainSync historicity checks are performed for MsgRollBackward
s and
MsgAwaitReply
s, see HistoricityCheck
.
data HistoricityCheck m blk Source #
Interface for the ChainSync client for deciding whether MsgRollBackward
s
and MsgAwaitReply
s are historical.
HistoricityCheck | |
|
newtype HistoricityCutoff Source #
Instances
data HistoricityException Source #
∀ blk.HasHeader blk ⇒ HistoricityException | We received a INVARIANT: |
|
Instances
Exception HistoricityException Source # | |
Show HistoricityException Source # | |
Eq HistoricityException Source # | The maximum age of a This should be set to at least the maximum duration (across all eras) of a
stability window (the number of slots in which at least For example, on Cardano mainnet today, the Praos Chain Growth property
implies that |
Real implementation
∷ ∀ m blk. (Monad m, HasHeader blk, HasAnnTip blk) | |
⇒ SystemTime m | |
→ m GsmState | Get the current This is used to disable the historicity check when we are caught up. The rationale is extra resilience against disconnects between honest nodes in disaster scenarios with very low chain density. |
→ HistoricityCutoff | |
→ HistoricityCheck m blk |
Deny all rollbacks that rewind blocks older than
HistoricityCutoff
upon arrival.
noCheck ∷ Applicative m ⇒ HistoricityCheck m blk Source #
Do not perform any historicity checks. This is useful when we only sync from trusted peers (Praos mode) or when the impact of historical messages is already mitigated by other means (for example indirectly by the Limit on Patience in the case of Genesis without ChainSync Jumping).