Expand description
API for protocol implementors.
A protocol is a directed acyclic graph with the nodes being objects of types implementing Round
(to be specific, “acyclic” means that the values returned in the id
field of TransitionInfo
should not repeat during the protocol execution; the types might).
The starting point is a type that implements EntryPoint
.
All the rounds must have their associated type Round::Protocol
set to the same Protocol
instance
to be executed by a Session
.
For more details, see the documentation of the mentioned traits.
Structs§
- Artifact
- Associated data created alongside a message in
Round::make_direct_message
. - Boxed
Format - A serializer/deserializer for protocol messages.
- Boxed
Round - A wrapped new round that may be returned by
Round::finalize
orEntryPoint::make_round
. - Communication
Info - Describes what other parties this rounds sends messages to, and what other parties it expects messages from.
- Deserialization
Error - An error that can be returned during deserialization error.
- Direct
Message - A serialized direct message.
- Direct
Message Error - An error during deserialization of a direct message.
- Echo
Broadcast - A serialized echo broadcast.
- Echo
Broadcast Error - An error during deserialization of an echo broadcast.
- Local
Error - An error indicating a local problem, most likely a misuse of the API or a bug in the code.
- NoProtocol
Errors - A stub type indicating that this protocol does not generate any provable errors.
- Normal
Broadcast - A serialized regular (non-echo) broadcast.
- Normal
Broadcast Error - An error during deserialization of a normal broadcast.
- Payload
- Message payload created in
Round::receive_message
. - Protocol
Message - A bundle containing the message parts for one round.
- Receive
Error - An error that can be returned from
Round::receive_message
. - Remote
Error - An error indicating a problem whose reason is another node sending invalid data.
- Required
Message Parts - Declares which parts of the message from a round have to be stored to serve as the evidence of malicious behavior.
- Required
Messages - Declares which messages from this and previous rounds have to be stored to serve as the evidence of malicious behavior.
- RoundId
- A round identifier.
- Transition
Info - Information about the position of the round in the state transition graph.
Enums§
- Echo
Round Participation - The specific way the node participates in the echo round (if any).
- Finalize
Outcome - Possible successful outcomes of
Round::finalize
. - Message
Validation Error - An error that can occur during the validation of an evidence of an invalid message.
- Protocol
Validation Error - An error that can occur during the validation of an evidence of a protocol error.
Traits§
- Entry
Point - A round that initiates a protocol.
- PartyId
- A trait alias for the combination of traits needed for a party identifier.
- Protocol
- A distributed protocol.
- Protocol
Error - Describes provable errors originating during protocol execution.
- Protocol
Message Part - A serialized part of the protocol message.
- Round
- A type representing a single round of a protocol.