dandelion++ over libp2p
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Go to file
Rai Yang 9578df95fb
Update README.md
5 years ago
content-dht-provide-find Added CLI args parsing 6 years ago
pubsub Update js and test config file 5 years ago
util Separate keys for bootstrapper and peer 6 years ago
.gitignore Script for quick terminator 4x4 test 6 years ago
LICENSE Initial commit 6 years ago
PORTS Updated to use fixed ports (in PORTS file) 6 years ago
README.md Update README.md 5 years ago
TODO.md Update TODOs file 6 years ago

README.md

Raven

Decentralized messaging network that anyone can broadcast/subscribe messages anonymously.

Anonymity is achieved by implementing Dandelion protocol on top of libp2p's pub/sub module, dandelion is a privacy preserving protocol to make message sender anonymous, it has 2 phases, the first phase is stem phase, where messages go through a psuedo-random path, the second phase is fluffing, when the message reaches the last node(randomly chosen), the message is diffused to its surrounding peers, so the third party observer cannot track back the node original node who send the message, because the message is relayed through an anonymous graph. Message broadcasting is implemented by libp2p floodsub.

**Dandelion implementation on libp2p-pubsub **: https://github.com/rairyx/go-libp2p-pubsub/tree/dandelion

Demo

Directory: pubsub

What it demonstrates: Three Go peers, one JS peer are all created and run a chat server using a shared PubSub topic. Typing text in any peer sends it to all the other peers.

Quick test: cd pubsub and then run ./test/test.sh. Requires Terminator (eg, sudo apt-get install terminator). The rest of this section describes how to test manually.

(TODO: maybe eliminate centralized bootstrapper; any peer could then bootstrap from any other peer and peers could start in any order; downside is the code will be more complex in all peers)

First terminal: Create the bootstrapper node

cd pubsub
./pubsub-interop ../util/private_key.bin.bootstrapper.Wa --bootstrapper

The bootstrapper creates a new libp2p node, subscribes to the shared topic string, spawns a go routine to emit any publishes to that topic, and then waits forever.

(Note that the node ID of pubsub-interop is going to be Qm...6aJ9oRuEzWa. Node IDs in libp2p are just public keys, and the public key Qm...6aJ9oRuEzWa is derived from the private key file ../util/private_key.bin.bootstrapper.Wa. That file is just an X.509 keypair generated by the included program util/private-key-gen). We use fixed public/private keypairs for each node in this example to keep things simple.)