pub enum CompleteRoundError<ProcessErr, IoErr> {
ProcessMsg(ProcessErr),
Router(RouterError),
Io(IoErr),
UnexpectedEof,
}Expand description
Error returned by MpcParty::complete
May indicate malicious behavior (e.g. adversary sent a message that aborts protocol execution)
or some misconfiguration of the protocol network (e.g. received a message from the round that
was not registered via Mpc::add_round).
Variants§
ProcessMsg(ProcessErr)
RoundStore returned an error
Refer to this rounds store documentation to understand why it could fail
Router(RouterError)
Router error
Indicates that for some reason router was not able to process a message. This can be the case of:
- Router API misuse
E.g. when received a message from the round that was not registered in the router - Improper
RoundStoreimplementation
Indicates that round store is not properly implemented and contains a flaw.
For instance, this error is returned when round store indicates that it doesn’t need any more messages (RoundStore::wants_morereturnsfalse), but then it didn’t output anything (RoundStore::outputreturnsErr(_)) - Bug in the router
This error is always related to some implementation flaw or bug: either in the code that uses the router, or in the round store implementation, or in the router itself. When implementation is correct, this error never appears. Thus, it should not be possible for the adversary to “make this error happen.”
Io(IoErr)
Receiving the next message resulted into I/O error
UnexpectedEof
Channel of incoming messages was closed before protocol completion
Implementations§
Source§impl<ProcessErr, IoErr> CompleteRoundError<ProcessErr, IoErr>
impl<ProcessErr, IoErr> CompleteRoundError<ProcessErr, IoErr>
Sourcepub fn map_io_err<E>(
self,
f: impl FnOnce(IoErr) -> E,
) -> CompleteRoundError<ProcessErr, E>
pub fn map_io_err<E>( self, f: impl FnOnce(IoErr) -> E, ) -> CompleteRoundError<ProcessErr, E>
Maps I/O error