Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- codecChainSync :: forall header point tip (m :: Type -> Type). MonadST m => (header -> Encoding) -> (forall s. Decoder s header) -> (point -> Encoding) -> (forall s. Decoder s point) -> (tip -> Encoding) -> (forall s. Decoder s tip) -> Codec (ChainSync header point tip) DeserialiseFailure m ByteString
- codecChainSyncId :: forall {k} {k1} {k2} (header :: k) (point :: k1) (tip :: k2) (m :: Type -> Type). Monad m => Codec (ChainSync header point tip) CodecFailure m (AnyMessage (ChainSync header point tip))
- byteLimitsChainSync :: forall {k} {k1} {k2} bytes (header :: k) (point :: k1) (tip :: k2). (bytes -> Word) -> ProtocolSizeLimits (ChainSync header point tip) bytes
- timeLimitsChainSync :: forall {k} {k1} {k2} (header :: k) (point :: k1) (tip :: k2). ChainSyncTimeout -> ProtocolTimeLimits (ChainSync header point tip)
- data ChainSyncTimeout = ChainSyncTimeout {}
Documentation
codecChainSync :: forall header point tip (m :: Type -> Type). MonadST m => (header -> Encoding) -> (forall s. Decoder s header) -> (point -> Encoding) -> (forall s. Decoder s point) -> (tip -> Encoding) -> (forall s. Decoder s tip) -> Codec (ChainSync header point tip) DeserialiseFailure m ByteString Source #
Codec for chain sync that encodes/decodes headers
NOTE: See wrapCBORinCBOR
and unwrapCBORinCBOR
if you want to use this
with a header type that has annotations.
codecChainSyncId :: forall {k} {k1} {k2} (header :: k) (point :: k1) (tip :: k2) (m :: Type -> Type). Monad m => Codec (ChainSync header point tip) CodecFailure m (AnyMessage (ChainSync header point tip)) Source #
An identity Codec
for the ChainSync
protocol. It does not do any
serialisation. It keeps the typed messages, wrapped in AnyMessage
.
byteLimitsChainSync :: forall {k} {k1} {k2} bytes (header :: k) (point :: k1) (tip :: k2). (bytes -> Word) -> ProtocolSizeLimits (ChainSync header point tip) bytes Source #
Byte Limits
timeLimitsChainSync :: forall {k} {k1} {k2} (header :: k) (point :: k1) (tip :: k2). ChainSyncTimeout -> ProtocolTimeLimits (ChainSync header point tip) Source #
Time Limits
'TokIdle' 'waitForever' (ie never times out) 'TokNext TokCanAwait' the given 'canAwaitTimeout' 'TokNext TokMustReply' the given 'mustReplyTimeout' 'TokIntersect' the given 'intersectTimeout'
data ChainSyncTimeout Source #
Configurable timeouts
These are configurable for at least the following reasons.
o So that deployment and testing can use different values.
o So that a net running Praos can better cope with streaks of empty slots.
(See intersectmbo/ouroboros-network#2245
.)