MaidSafe Dev Update - August 24, 2017

Right here! :stuck_out_tongue:

In the current code an “accumulator” node collects signatures for each message that requires group consensus. Once enough signatures have been collected, the accumulator broadcasts the message and the signatures to as many nodes in the section as it can. The accumulator tells these nodes about who it has sent the message to using a simple set of node names that we call the sent_to list. If any node receives a signed message from an accumulator and notices that the sent_to list is missing a known node, then it will swarm (re-send) the message to all such nodes. You can see the sent_to list (set) in the code here: https://github.com/maidsafe/routing/blob/a5cb22f11d6350560d32ccabe3d433e0b4e882a5/src/messages/mod.rs#L191-L201

Now, the problem with the above approach is that nodes receiving such a message have to believe that the accumulator told the truth when it constructed the sent_to list. If the accumulator lies, then it can pretend to have sent the message to more nodes than it actually did, and nobody will know that the message needs to be swarmed to their peers. The easy fix is to just get rid of the sent_to list and swarm every message received, but this would require O(n2) single messages to be sent. Instead, we’d like to keep the number of messages sent low, whilst removing the issue mentioned. A few of the solutions we’ve been thinking about involve including signatures in the sent_to list, so that nodes sign something to say they received the message, and everybody else can verify this without trusting the accumulator. We’ve also been considering a few more varied ways to send messages, including gossip protocols, which would be a bigger change, but might also allow us to decrease the number of connections per node, and thus scale up the size of sections (which is good for security).

22 Likes