Module round_based::state_machine
source · Available on crate feature
state-machine
only.Expand description
Wraps the protocol defined as async function and provides sync API to execute it
In round_based
framework, MPC protocols are defined as async function. However, sometimes it
may not be possible/desirable to have async runtime which drives the futures until completion.
For such use-cases, we provide wrap_protocol
function that wraps an MPC protocol defined as
async function and returns the StateMachine
that exposes sync API to carry out the protocol.
Structs§
- Error type which indicates that state machine failed to carry out the protocol
- Stream of incoming messages
- Sink for outgoing messages
- State machine runtime
- Error returned by
Outgoings
sink - Future returned by
runtime.yield_now()
Enums§
- Tells why protocol execution stopped
Traits§
- Provides interface to execute the protocol
Functions§
- Wraps the protocol and provides sync API to execute it
Type Aliases§
- Delivery implementation used in the state machine
- MpcParty instantiated with state machine implementation of delivery and async runtime