Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

LeiosNotify

Mini-protocol number: 18

Warning

This protocol is proposed and not yet part of the Cardano mainnet. It is specified as part of Leios (CIP-0164), an extension to the Ouroboros consensus protocol aimed at significantly increasing transaction throughput. Details are subject to change.

LeiosNotify is the mini-protocol responsible for announcing Endorser Blocks (EBs) and offering EB bodies and their associated transaction closures to peers. It is a pull-based protocol: the client drives progress by requesting the next notification, and the server replies with whatever is available.

Leios introduces Endorser Blocks as a mechanism to endorse and achieve consensus on transaction inclusion independently and overlayed on the Praos block chain. LeiosNotify is the dissemination layer that lets peers discover new EBs before fetching them via LeiosFetch. The protocol is intended to run in a pipelined fashion where the client issues multiple MsgRequestNext even before receiving a notification, so that the server can push announcements to downstream peers with minimal latency.

Warning

TODO: Add more detail about admitted pipeline depth and other punishable requirements

State machine

graph LR
   classDef client color:black,fill:PaleGreen,stroke:DarkGreen;
   classDef server color:black,fill:PowderBlue,stroke:DarkBlue;
   linkStyle default stroke:gray

   StDone(((StDone)))

   i(( )) --> StIdle
   StIdle --MsgClientDone--> StDone
   StIdle --MsgLeiosNotificationRequestNext--> StBusy
   StBusy --MsgLeiosBlockAnnouncement--> StIdle
   StBusy --MsgLeiosBlockOffer--> StIdle
   StBusy --MsgLeiosBlockTxsOffer--> StIdle
   StBusy --MsgLeiosVotesOffer--> StIdle

   class StIdle client
   class StBusy server

State agencies

StateAgency
StIdleInitiator
StBusyResponder

State transitions

From stateMessageParametersTo state
StIdleMsgClientDoneEnd
StIdleMsgLeiosNotificationRequestNextStBusy
StBusyMsgLeiosBlockAnnouncementannouncementStIdle
StBusyMsgLeiosBlockOfferpoint, sizeStIdle
StBusyMsgLeiosBlockTxsOfferpointStIdle
StBusyMsgLeiosVotesOffer[1* (slot, voterId)]StIdle

Codecs

The messages depicted in the state machine follow this CDDL specification:

;; messages.cddl
leiosNotifyMessage
     = msgLeiosNotificationRequestNext
     / msgLeiosBlockAnnouncement
     / msgLeiosBlockOffer
     / msgLeiosBlockTxsOffer
     / msgLeiosVotesOffer
     / msgClientDone

msgLeiosNotificationRequestNext = [0]
msgLeiosBlockAnnouncement       = [1, announcement_header]
msgLeiosBlockOffer              = [2, point]
msgLeiosBlockTxsOffer           = [3, point]
msgLeiosVotesOffer              = [4, [1* (slot, voter_id) ]]
msgClientDone                   = [5]

announcement_header = any ; TODO
point = (slot, eb_hash)
slot = base.slotNo
eb_hash = base.hash
voter_id = base.word16  ; REVIEW: size?

;# import base as base

Note

The CBOR tags in this specification are provisional. Several types remain underspecified (any) pending further protocol design. See CIP-0164 for rationale and ongoing discussion.