trace-forward-2.2.2: The forwarding protocols library for cardano node.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Trace.Forward.Protocol.DataPoint.Type

Description

The type of the DataPoint forwarding/accepting protocol.

Synopsis

Documentation

type DataPointName = Text Source #

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

IMPORTANT NOTE: the following terminology is used:

  1. From the protocol's point of view, two peers talk to each other: the forwarder and the acceptor.
  2. The forwarder is an application that collects DataPoints and sends them to the acceptor by request (with MsgDataPointsReply).
  3. The acceptor is an application that receives DataPoints from the forwarder.
  4. You can think of the acceptor as a client, and the forwarder as a server. After the connection is established, the acceptor asks for DataPoints, the forwarder replies to it.

data DataPointForward where Source #

Constructors

StIdle :: DataPointForward

Both acceptor and forwarder are in idle state. The acceptor can send a request for a list of DataPoints (MsgDataPointsRequest); the forwarder is waiting for a request, it will replay with MsgDataPointsReply.

StBusy :: DataPointForward

The acceptor has sent a next request for DataPoints. The acceptor is now waiting for a reply, and the forwarder is busy getting ready to send a reply with new list of DataPoints.

StDone :: DataPointForward

Both the acceptor and forwarder are in the terminal state. They're done.

Instances

Instances details
Protocol DataPointForward Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

ShowProxy DataPointForward Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show (ClientHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show (Message DataPointForward from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data ClientHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data Message DataPointForward (from :: DataPointForward) (to :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data NobodyHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data ServerHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

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

Instances details
Show (Message DataPointForward from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show lo => Show (Message (TraceObjectForward lo) from to) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data Message DataPointForward (from :: DataPointForward) (to :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data Message (TraceObjectForward lo) (from :: TraceObjectForward lo) (to :: TraceObjectForward lo) where

data family ClientHasAgency (st :: ps) Source #

Tokens for those protocol states in which the client has agency.

data family ServerHasAgency (st :: ps) Source #

Tokens for those protocol states in which the server has agency.

Instances

Instances details
Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

Show (ServerHasAgency st) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ServerHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data ServerHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data ServerHasAgency (st :: TraceObjectForward lo) where

data family NobodyHasAgency (st :: ps) Source #

Tokens for terminal protocol states in which neither the client nor server has agency.

Instances

Instances details
data NobodyHasAgency (st :: DataPointForward) Source # 
Instance details

Defined in Trace.Forward.Protocol.DataPoint.Type

data NobodyHasAgency (st :: TraceObjectForward lo) Source # 
Instance details

Defined in Trace.Forward.Protocol.TraceObject.Type

data NobodyHasAgency (st :: TraceObjectForward lo) where