Cothority ONET Causal Message propogation and sending a map in a message

6 views
Skip to first unread message

Pasindu Tennage

unread,
Apr 26, 2020, 5:25:20 PM4/26/20
to Cothority Discussion
Dear Team Cothority,

I have two questions regarding the ONET framework.

1. I am using the rawSend() method of service to send messages among services. Is there an inbuilt functionality in ONET and Cothority to implement Causal message propagation among a set of nodes? 

2. Is there a way to send an array of messages of a specific type (type described in a struct) using rawSend? for example I am trying to send a message of the following type using RawSend()
type CatchUpMessage struct {
Id *network.ServerIdentity
Step int
RecievedThresholdwitnessedMessages map[int][]*WitnessedMessage
}

But the runtime complains that "protobuf: map only support []byte or string as repeated value"


Gasser Linus

unread,
Apr 27, 2020, 2:19:37 AM4/27/20
to Pasindu Tennage, Cothority Discussion
Hi Tennage,

Thanks for your interest in the onet framework. Can you explain a little bit more what you’re trying to achieve? Are you currently working in the DEDIS lab?

Did you already read through https://github.com/dedis/onet#components ? Are you trying to create a protocol? A service?

There is a template available here: https://github.com/dedis/cothority_template - it shows how to use the different components of onet.

RawSend should only be used for short messages that don’t need any answer. If you need an answer, you should write a protocol.

With regard to your question 2., you ran into a restriction of protobuf, and the way it is implemented in dedis/protobuf. The problem comes from the `map[int][]*WitnessedMessage`. Protobuf only supports `map[x][]byte` and map[x]string`. So you have to put the `[]*WitnessedMessage` in its own structure, and it should work.

Best,

Linus

--
You received this message because you are subscribed to the Google Groups "Cothority Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cothority+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cothority/da3adc04-1d14-4fcf-a371-3436e6e41e0a%40googlegroups.com.

C4DT
- Mr. Linus Gasser Lead Developer
- +41 21 693 6770 linus....@epfl.ch
 

EPFL – C4DT | Station 14
CH – 1015 Lausanne
www.c4dt.org


Reply all
Reply to author
Forward
0 new messages