ouroboros-network-0.1.0.0: A networking layer for the Ouroboros blockchain protocol

Ouroboros.Network.Protocol.ChainSync.Type

Description

The type of the chain synchronisation protocol.

Since we are using a typed protocol framework this is in some sense the definition of the protocol: what is allowed and what is not allowed.

Synopsis

# Documentation

data ChainSync header point tip where Source #

A kind to identify our protocol, and the types of the states in the state transition diagram of the protocol.

Constructors

 StIdle ∷ ChainSync header point tip Both client and server are idle. The client can send a request and the server is waiting for a request. StNext ∷ StNextKind → ChainSync header point tip The client has sent a next update request. The client is now waiting for a response, and the server is busy getting ready to send a response. There are two possibilities here, since the server can send a reply immediately or it can send an initial await message followed later by the normal reply. StIntersect ∷ ChainSync header point tip The client has sent an intersection request. The client is now waiting for a response, and the server is busy getting ready to send a response. StDone ∷ ChainSync header point tip Both the client and server are in the terminal state. They're done.

#### Instances

Instances details

data StNextKind where Source #

Sub-cases of the StNext state. This is needed since the server can either send one reply back, or two.

Constructors

 StCanAwait ∷ StNextKind The server can reply or send an await msg. StMustReply ∷ StNextKind The server must now reply, having already sent an await message.

data TokNextKind (k ∷ StNextKind) where Source #

Constructors