ouroboros-network-protocols-0.8.1.0: Ouroboros Network Protocols
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

StIdleChainSync header point tip

Both client and server are idle. The client can send a request and the server is waiting for a request.

StNextStNextKindChainSync 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.

StIntersectChainSync 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.

StDoneChainSync header point tip

Both the client and server are in the terminal state. They're done.

Instances

Instances details
(ShowProxy header, ShowProxy tip) ⇒ ShowProxy (ChainSync header point tip ∷ Type) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

showProxyProxy (ChainSync header point tip) → String Source #

Show (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

NFData (ClientHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfClientHasAgency st → () #

NFData (NobodyHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfNobodyHasAgency st → () #

NFData (ServerHasAgency st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfServerHasAgency st → () #

(Show header, Show point, Show tip) ⇒ Show (Message (ChainSync header point tip) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

showsPrecIntMessage (ChainSync header point tip) from to → ShowS #

showMessage (ChainSync header point tip) from to → String #

showList ∷ [Message (ChainSync header point tip) from to] → ShowS #

(NFData header, NFData point, NFData tip) ⇒ NFData (Message (ChainSync header point tip) from to) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfMessage (ChainSync header point tip) from to → () #

NFData (PeerHasAgency pr st) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfPeerHasAgency pr st → () #

Protocol (ChainSync header point tip) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Associated Types

data Message (ChainSync header point tip) st st' Source #

data ClientHasAgency st Source #

data ServerHasAgency st Source #

data NobodyHasAgency st Source #

data ClientHasAgency (st ∷ ChainSync header point tip) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

data ClientHasAgency (st ∷ ChainSync header point tip) where
data Message (ChainSync header point tip) (from ∷ ChainSync header point tip) (to ∷ ChainSync header point tip) Source # 
Instance details

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 NobodyHasAgency (st ∷ ChainSync header point tip) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

data NobodyHasAgency (st ∷ ChainSync header point tip) where
data ServerHasAgency (st ∷ ChainSync header point tip) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

data ServerHasAgency (st ∷ ChainSync header point tip) where

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

StCanAwaitStNextKind

The server can reply or send an await msg.

StMustReplyStNextKind

The server must now reply, having already sent an await message.

data TokNextKind (k ∷ StNextKind) where Source #

Instances

Instances details
NFData (TokNextKind k) Source # 
Instance details

Defined in Ouroboros.Network.Protocol.ChainSync.Type

Methods

rnfTokNextKind k → () #