Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exactly-once message propagation. #50

Open
iwasaki-kenta opened this issue Jun 29, 2018 · 4 comments
Open

Exactly-once message propagation. #50

iwasaki-kenta opened this issue Jun 29, 2018 · 4 comments
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@iwasaki-kenta
Copy link
Contributor

iwasaki-kenta commented Jun 29, 2018

Not mandatory for release.

Syntax:

  • 0<2 implies that Node 2 bootstrapped with Node 0.
  • 0<=2 implies that Node 2 sent a message to Node 0.

Say we have a setup 0<1 + 1<2. Proxying means: 0=>1 + 1=>2. Node 0 sends a message to Node 1 who notices the request to have the message proxied/propagated to Node 2.

To do this, some requirements need to be done:

  • If we have 1000 nodes, we don't want to redundantly keep having nodes proxy a single particular message multiple times. To do this, our message keeps track of nodes that have already been proxied through via. a space-efficient data structure (Bloom/Cuckoo Filter).
  • We have a routing table from Kademlia. We can use this to our advantage, as XOR'ing the proxy target node ID with our own node ID will give us the bucket ID filled with nodes most likely closest to the target node. Hence, if the target node is not in our list of nodes, we broadcast and have the closest nodes proxy the message forward. If the target node is in our list of nodes, just send the message directly to it.
@iwasaki-kenta iwasaki-kenta added feature New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jun 29, 2018
@iwasaki-kenta iwasaki-kenta added this to the Release milestone Jun 29, 2018
@iwasaki-kenta
Copy link
Contributor Author

iwasaki-kenta commented Jun 30, 2018

Update: findNode in network/discovery/rpc.go can be made public s.t. we can find the most probable closest nodes to the target and have a few of the closest nodes proxy the message over to the target.

If no nodes appear to be close to the target, we can consider the proxying to have failed.

@iwasaki-kenta iwasaki-kenta changed the title Efficient message propagation and proxying. At-most-once message propagation. Jul 2, 2018
@iwasaki-kenta iwasaki-kenta changed the title At-most-once message propagation. Exactly-once message propagation. Jul 3, 2018
@iwasaki-kenta iwasaki-kenta modified the milestone: Release Jul 5, 2018
@samsends
Copy link

Perhaps FindNode + a hop counter in the msg for tuning spread

@tongxin97
Copy link

Hi! Has anyone implemented this yet? We are using Noise for our network, and it'd be helpful to have this feature.
Also, I noticed the given Broadcast(Async) method broadcasts to peers closest to the node itself only, does that mean Noise does not support global broadcasting (gossiping) right now?

@creamwhip
Copy link

I am curious about how this is done in modern Wavelet. When Transactions are gossiped through the network, is it possible for a node to receive the same data several times?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants