| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.MiniProtocol.LeiosFetch.Type
Description
The LeiosFetch mini-protocol's types and codec.
Synopsis
- data LeiosFetch point eb tx
- = StIdle
- | StBusy (LeiosFetchBusy point eb tx)
- | StDone
- data LeiosFetchBusy point eb tx
- data family Message ps (st ∷ ps) (st' ∷ ps)
- data SingLeiosFetch (st ∷ LeiosFetch point eb tx) where
- SingIdle ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StIdle ∷ LeiosFetch point eb tx)
- SingBlock ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StBusy ('StBlock ∷ LeiosFetchBusy point eb tx))
- SingBlockTxs ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StBusy ('StBlockTxs ∷ LeiosFetchBusy point eb tx))
- SingDone ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StDone ∷ LeiosFetch point eb tx)
- type TxBitmaps = [(Word16, Word64)]
- bitmapOffsets ∷ TxBitmaps → [Int]
- byteLimitsLeiosFetch ∷ (bytes → Word) → ProtocolSizeLimits (LeiosFetch point eb tx) bytes
- codecLeiosFetch ∷ ∀ point eb tx (m ∷ Type → Type). MonadST m ⇒ Int → (point → Encoding) → (∀ s. Decoder s point) → (eb → Encoding) → (∀ s. Decoder s (ByteString → eb)) → (tx → Encoding) → (∀ s. Decoder s tx) → AnnotatedCodec (LeiosFetch point eb tx) DeserialiseFailure m ByteString
- codecLeiosFetchId ∷ ∀ point eb tx (m ∷ Type → Type). Monad m ⇒ Codec (LeiosFetch point eb tx) CodecFailure m (AnyMessage (LeiosFetch point eb tx))
- maxLeiosTxsRequestBytesSize ∷ Word32
- timeLimitsLeiosFetch ∷ ProtocolTimeLimits (LeiosFetch point eb tx)
Documentation
data LeiosFetch point eb tx Source #
The LeiosFetch mini-protocol's states, as the cardano-blueprint specifies them: https://cardano-scaling.github.io/cardano-blueprint/network/node-to-node/leios-fetch/index.html?leios=on. CIP-0164 specifies the Leios mini-protocols, https://cips.cardano.org/cip/CIP-0164.
Constructors
| StIdle | |
| StBusy (LeiosFetchBusy point eb tx) | |
| StDone |
Instances
data LeiosFetchBusy point eb tx Source #
Constructors
| StBlock | |
| StBlockTxs |
data family Message ps (st ∷ ps) (st' ∷ ps) Source #
The messages for this protocol. It is expected to be a GADT that is
indexed by the from and to protocol states. That is the protocol state
the message transitions from, and the protocol state it transitions into.
These are the edges of the protocol state transition system.
Instances
| NFData (Message (LeiosFetch point eb tx) from to) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosFetch.Type Methods rnf ∷ Message (LeiosFetch point eb tx) from to → () # | |
| NFData (Message (LeiosNotify point announcement vote) from to) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosNotify.Type Methods rnf ∷ Message (LeiosNotify point announcement vote) from to → () # | |
| (NFData block, NFData point) ⇒ NFData (Message (BlockFetch block point) from to) # | |
Defined in Ouroboros.Network.Protocol.BlockFetch.Type | |
| (NFData header, NFData point, NFData tip) ⇒ NFData (Message (ChainSync header point tip) from to) # | |
Defined in Ouroboros.Network.Protocol.ChainSync.Type | |
| NFData (Message KeepAlive from to) # | |
Defined in Ouroboros.Network.Protocol.KeepAlive.Type | |
| (∀ result. NFData (query result), NFData point) ⇒ NFData (Message (LocalStateQuery block point query) from to) # | |
| (NFData txid, NFData tx, NFData slot) ⇒ NFData (Message (LocalTxMonitor txid tx slot) from to) # | |
| (NFData tx, NFData reject) ⇒ NFData (Message (LocalTxSubmission tx reject) from to) # | |
| (NFData objectId, NFData object) ⇒ NFData (Message (ObjectDiffusion objectId object) from to) # | |
| NFData peerAddress ⇒ NFData (Message (PeerSharing peerAddress) from to) # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type | |
| (NFData txid, NFData tx) ⇒ NFData (Message (TxSubmission2 txid tx) from to) # | |
| (Eq point, Eq eb, Eq tx) ⇒ Eq (Message (LeiosFetch point eb tx) from to) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosFetch.Type Methods (==) ∷ Message (LeiosFetch point eb tx) from to → Message (LeiosFetch point eb tx) from to → Bool # (/=) ∷ Message (LeiosFetch point eb tx) from to → Message (LeiosFetch point eb tx) from to → Bool # | |
| (Eq point, Eq announcement, Eq vote) ⇒ Eq (Message (LeiosNotify point announcement vote) from to) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosNotify.Type Methods (==) ∷ Message (LeiosNotify point announcement vote) from to → Message (LeiosNotify point announcement vote) from to → Bool # (/=) ∷ Message (LeiosNotify point announcement vote) from to → Message (LeiosNotify point announcement vote) from to → Bool # | |
| (Eq tx, Eq reject) ⇒ Eq (Message (LocalTxSubmission tx reject) from to) # | |
| (Eq objectId, Eq object) ⇒ Eq (Message (ObjectDiffusion objectId object) from to) # | |
| (Eq txid, Eq tx) ⇒ Eq (Message (TxSubmission2 txid tx) from to) # | |
| (Show point, Show eb, Show tx) ⇒ Show (Message (LeiosFetch point eb tx) from to) Source # | |
| (Show point, Show announcement, Show vote) ⇒ Show (Message (LeiosNotify point announcement vote) from to) Source # | |
| (Show block, Show point) ⇒ Show (Message (BlockFetch block point) from to) # | |
| (Show header, Show point, Show tip) ⇒ Show (Message (ChainSync header point tip) from to) # | |
| Show (Message KeepAlive from to) # | |
| (Show txid, Show tx, Show slot) ⇒ Show (Message (LocalTxMonitor txid tx slot) from to) # | |
| (Show tx, Show reject) ⇒ Show (Message (LocalTxSubmission tx reject) from to) # | |
| (Show objectId, Show object) ⇒ Show (Message (ObjectDiffusion objectId object) from to) # | |
| Show peer ⇒ Show (Message (PeerSharing peer) from to) # | |
| (Show txid, Show tx) ⇒ Show (Message (TxSubmission2 txid tx) from to) # | |
| data Message KeepAlive (from ∷ KeepAlive) (to ∷ KeepAlive) # | |
Defined in Ouroboros.Network.Protocol.KeepAlive.Type data Message KeepAlive (from ∷ KeepAlive) (to ∷ KeepAlive) where
| |
| data Message (PeerSharing peerAddress) (from ∷ PeerSharing peerAddress) (to ∷ PeerSharing peerAddress) # | |
Defined in Ouroboros.Network.Protocol.PeerSharing.Type data Message (PeerSharing peerAddress) (from ∷ PeerSharing peerAddress) (to ∷ PeerSharing peerAddress) where
| |
| data Message (BlockFetch block point) (from ∷ BlockFetch block point) (to ∷ BlockFetch block point) # | |
Defined in Ouroboros.Network.Protocol.BlockFetch.Type data Message (BlockFetch block point) (from ∷ BlockFetch block point) (to ∷ BlockFetch block point) where
| |
| data Message (LocalTxSubmission tx reject) (from ∷ LocalTxSubmission tx reject) (to ∷ LocalTxSubmission tx reject) # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type data Message (LocalTxSubmission tx reject) (from ∷ LocalTxSubmission tx reject) (to ∷ LocalTxSubmission tx reject) where
| |
| data Message (ObjectDiffusion objectId object) (from ∷ ObjectDiffusion objectId object) (to ∷ ObjectDiffusion objectId object) # | |
Defined in Ouroboros.Network.Protocol.ObjectDiffusion.Type data Message (ObjectDiffusion objectId object) (from ∷ ObjectDiffusion objectId object) (to ∷ ObjectDiffusion objectId object) where
| |
| data Message (TxSubmission2 txid tx) (from ∷ TxSubmission2 txid tx) (to ∷ TxSubmission2 txid tx) # | |
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type data Message (TxSubmission2 txid tx) (from ∷ TxSubmission2 txid tx) (to ∷ TxSubmission2 txid tx) where
| |
| data Message (LeiosFetch point eb tx) (from ∷ LeiosFetch point eb tx) (to ∷ LeiosFetch point eb tx) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosFetch.Type data Message (LeiosFetch point eb tx) (from ∷ LeiosFetch point eb tx) (to ∷ LeiosFetch point eb tx) where
| |
| data Message (LeiosNotify point announcement vote) (from ∷ LeiosNotify point announcement vote) (to ∷ LeiosNotify point announcement vote) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosNotify.Type data Message (LeiosNotify point announcement vote) (from ∷ LeiosNotify point announcement vote) (to ∷ LeiosNotify point announcement vote) where
| |
| data Message (ChainSync header point tip) (from ∷ ChainSync header point tip) (to ∷ ChainSync header point tip) # | |
Defined in Ouroboros.Network.Protocol.ChainSync.Type data Message (ChainSync header point tip) (from ∷ ChainSync header point tip) (to ∷ ChainSync header point tip) where
| |
| data Message (LocalStateQuery block point query) (from ∷ LocalStateQuery block point query) (to ∷ LocalStateQuery block point query) # | |
Defined in Ouroboros.Network.Protocol.LocalStateQuery.Type data Message (LocalStateQuery block point query) (from ∷ LocalStateQuery block point query) (to ∷ LocalStateQuery block point query) where
| |
| data Message (LocalTxMonitor txid tx slot) (from ∷ LocalTxMonitor txid tx slot) (to ∷ LocalTxMonitor txid tx slot) # | |
Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type data Message (LocalTxMonitor txid tx slot) (from ∷ LocalTxMonitor txid tx slot) (to ∷ LocalTxMonitor txid tx slot) where
| |
data SingLeiosFetch (st ∷ LeiosFetch point eb tx) where Source #
Constructors
| SingIdle ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StIdle ∷ LeiosFetch point eb tx) | |
| SingBlock ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StBusy ('StBlock ∷ LeiosFetchBusy point eb tx)) | |
| SingBlockTxs ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StBusy ('StBlockTxs ∷ LeiosFetchBusy point eb tx)) | |
| SingDone ∷ ∀ {point} {eb} {tx}. SingLeiosFetch ('StDone ∷ LeiosFetch point eb tx) |
Instances
| Show (SingLeiosFetch st) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.LeiosFetch.Type Methods showsPrec ∷ Int → SingLeiosFetch st → ShowS # show ∷ SingLeiosFetch st → String # showList ∷ [SingLeiosFetch st] → ShowS # | |
type TxBitmaps = [(Word16, Word64)] Source #
Which of an endorser block's transactions a request names: each entry is the index of a run of 64 transactions and a bitmap of those 64, the most significant bit naming the first of them.
bitmapOffsets ∷ TxBitmaps → [Int] Source #
The offsets of the transactions the bitmaps name, in the bitmaps' order.
byteLimitsLeiosFetch ∷ (bytes → Word) → ProtocolSizeLimits (LeiosFetch point eb tx) bytes Source #
The limits assume that peers write the parts of a message that are not hashed, such as the framing around its payloads, in tight CBOR: each integer and length in its fewest bytes. The decoders accept wider ones too, but the limits do not make room for them.
Arguments
| ∷ ∀ point eb tx (m ∷ Type → Type). MonadST m | |
| ⇒ Int | The most txs an EB can hold. The decoder rejects a larger count before it allocates. |
| → (point → Encoding) | |
| → (∀ s. Decoder s point) | |
| → (eb → Encoding) | |
| → (∀ s. Decoder s (ByteString → eb)) | Decode an endorser block, given the bytes of the whole message. Its byte offsets count from the start of the message, as the ledger's annotators expect, so it slices its own bytes out of them. |
| → (tx → Encoding) | |
| → (∀ s. Decoder s tx) | |
| → AnnotatedCodec (LeiosFetch point eb tx) DeserialiseFailure m ByteString |
codecLeiosFetchId ∷ ∀ point eb tx (m ∷ Type → Type). Monad m ⇒ Codec (LeiosFetch point eb tx) CodecFailure m (AnyMessage (LeiosFetch point eb tx)) Source #
maxLeiosTxsRequestBytesSize ∷ Word32 Source #
The most transaction bytes an honest client asks for in one
MsgLeiosBlockTxsRequest, so that it fetches an endorser block's closure as
several smaller requests, smoothing out its load on the peer. The server need
not enforce it. The client bounds the size of a MsgLeiosBlockTxs by it.
Its value is a design choice; no protocol parameter bounds it.
timeLimitsLeiosFetch ∷ ProtocolTimeLimits (LeiosFetch point eb tx) Source #