Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asabya/libp2p-kad-dht-trail
Hello world libp2p local network with rendezvous discovery
https://github.com/asabya/libp2p-kad-dht-trail
discovery go-libp2p rendezvous
Last synced: 7 days ago
JSON representation
Hello world libp2p local network with rendezvous discovery
- Host: GitHub
- URL: https://github.com/asabya/libp2p-kad-dht-trail
- Owner: asabya
- License: mit
- Created: 2020-04-18T04:12:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T04:31:48.000Z (over 4 years ago)
- Last Synced: 2024-12-05T17:15:50.067Z (28 days ago)
- Topics: discovery, go-libp2p, rendezvous
- Language: Go
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# libp2p-kad-dht-trail
Hello world local libp2p network with kad-dht rendezvous discovery
# How to test
First clone the repo, then goto `bootstrap` and run that. You will get a multiaddress.
```
$ cd bootstrap
$ go run main.goThis node is QmRDzQAZ9bdDWwfK4i33qtPW3Eziditovvg3D7Sn3dWN7f
Available multiaddrs :
/ip4/127.0.0.1/tcp/4000/p2p/QmRDzQAZ9bdDWwfK4i33qtPW3Eziditovvg3D7Sn3dWN7f```
Now in root run the `main.go` file```
$ go run main.go --bootstrap /ip4/127.0.0.1/tcp/4000/p2p/QmRDzQAZ9bdDWwfK4i33qtPW3Eziditovvg3D7Sn3dWN7f --port 3000
```you will be connected to the bootstrap. In another terminal run the same command with different port
```
$ go run main.go --bootstrap /ip4/127.0.0.1/tcp/4000/p2p/QmRDzQAZ9bdDWwfK4i33qtPW3Eziditovvg3D7Sn3dWN7f --port 3001
```You should see bot nodes getting connected
# Project52
It is one of my [project 52](https://github.com/Sab94/project52).