Conversation
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
| /// Error type deduced from `M: Mpc` | ||
| pub type ErrorM<M> = Error< | ||
| round_based::mpc::CompleteRoundErr<M, round_based::round::RoundInputError>, | ||
| <M as Mpc>::SendErr, | ||
| >; |
There was a problem hiding this comment.
Looks useful, maybe we should add this to the crate itself
There was a problem hiding this comment.
Error here is random beacon-specific error type, we can't add it to the crate itself
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
Signed-off-by: Denis Varlakov <denis@dfns.co>
| #[proc_macro_derive(ProtocolMessage, attributes(protocol_message))] | ||
| pub fn protocol_message(input: proc_macro::TokenStream) -> proc_macro::TokenStream { | ||
| #[proc_macro_derive(ProtocolMsg, attributes(protocol_msg))] | ||
| pub fn protocol_msg(input: proc_macro::TokenStream) -> proc_macro::TokenStream { |
There was a problem hiding this comment.
Did we really need to change the name here? It does nothing but make the diff bigger and force you to make changes in the consumer crate
There was a problem hiding this comment.
I did really need to change it, yes 🙂
|
I had a thought that this api has weird extension points. On the other hand, MpcParty now hardcodes RoundsRouter, which I previously used as an extension point. How big will ku23 code now become that I have to reimplement the whole of |
Signed-off-by: Denis Varlakov <denis@dfns.co>
|
Pushed changes per your review @maurges |
Yes, the whole point of this PR is that One of the use-cases: generic echo broadcast support for any protocol, that is provided out-of-box in this library. It wraps Among other use-cases, one can wrap Also this design is a step forwards composable protocols, e.g. we will be able to define subroutines (e.g.
Any code that was using The only "customization" you did in ku23 is defining your own RoundStore. It's still possible via |
|
@maurges okay to merge? |
|
@maurges reminder |
New API proposal that integrates the router into
Mpctrait. Protocol implementation registers rounds by using methods ofMpctrait, and then uses the same trait to send and receive messages.This allows the protocol expose its rounds structure to outside world. For instance, that can be used to generically implement echo broadcast mechanism that will work with any protocol.
Mpctrait.send_many()toMpcExecutiontrait so the protocol can send many messages followed by single flush (instead of flushing per each outgoing message, which can be impractical for p2p rounds for certain delivery implementations)StreamExt,SinkExt