dandelion++ over libp2p
Go to file
Mike Goelzer 71a7f22bda
Merge pull request #1 from mgoelzer/jhiesey-dht-interop
Replace master with jhiesey-dht-interop branch
2018-09-09 06:47:10 -07:00
content-dht-provide-find Moved DHT interop example to subdir 2018-09-09 06:36:00 -07:00
.gitignore Moved DHT interop example to subdir 2018-09-09 06:36:00 -07:00
LICENSE Initial commit 2018-08-14 13:30:10 -07:00
README.txt Updated readme 2018-09-09 06:44:43 -07:00

# libp2p Demos

## Demo 1:  DHT Peer & Content with Go and JS Nodes

**What it demonstrates:**  A new DHT is created by the Go program `dht-interop`.  In a separate terminal or machine, a Node.js program connects to this DHT.

**First terminal:**
```
cd content-dht-provide-find
make
./dht-interop
```

**Second terminal:**  run the command printed out by dht-interop, replacing 127.0.0.1 with the IP of the server where dht-interop is listening.  Example:

```
node js-dht-test/index.js /ip4/127.0.0.1/tcp/9876/ipfs/QmehVYruznbyDZuHBV4vEHESpDevMoAovET6aJ9oRuEzWa
```

Note that the node ID of `dht-interop` is always `Qm...RuEzWa` because it is being read in from `util/private_key.bin` (an X.509 private key generated by `util/private-key-gen`).


## Demo 2:  PubSub

**What it demonstrates**:  Two Go nodes are created and run a chat server using a shared PubSub topic.  **TODO**:  Should be a Go node and a JS node, once I get the two Go nodes version working.


_Acknowledgements:  @jhiesey for DHT (content & peer routing) JS+Go interop, @stebalien for PubSub_




--------------------------------------------

util/private-key-gen -> private_key.bin (marshalled private key that is used for stable peer id of bootstrap server)



0.  Help me fix node "Error: Cannot find module 'libp2p'"
Answer:
  cd js-dht-test
  npm install


2.  Let's run it on bootstrap box (go) and locally (js)
	WORKS!

3.  Explain to me how you generated peer CIDs
	One is the hash of a pubsub topic
	The other is just mine

All this is example does is verify that two peers can find each other's content