ouroboros-network-protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.BlockFetch.Codec

Synopsis

Documentation

codecBlockFetch Source #

Arguments

:: forall block point (m :: Type -> Type). MonadST m 
=> (block -> Encoding)

encode block

-> (forall s. Decoder s block)

decode block

-> (point -> Encoding)

encode point

-> (forall s. Decoder s point)

decode point

-> Codec (BlockFetch block point) DeserialiseFailure m ByteString 

Codec for chain sync that encodes/decodes blocks and points.

NOTE: See wrapCBORinCBOR and unwrapCBORinCBOR if you want to use this with a block type that has annotations.

codecBlockFetchId :: forall block point (m :: Type -> Type). Monad m => Codec (BlockFetch block point) CodecFailure m (AnyMessage (BlockFetch block point)) Source #

byteLimitsBlockFetch Source #

Arguments

:: (bytes -> Word)

compute size of bytes

-> ProtocolSizeLimits (BlockFetch block point) bytes 

Byte Limit.