mirror of
https://github.com/arnaucube/go-dht.git
synced 2026-03-22 23:46:38 +01:00
No description
- Go 98%
- Shell 2%
| cmd | ||
| config | ||
| kademlia | ||
| node | ||
| rpc-test | ||
| .gitignore | ||
| .travis.yml | ||
| config.test0.yaml | ||
| config.test1.yaml | ||
| config.test2.yaml | ||
| config.test3.yaml | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
| run-dev-nodes.sh | ||
go-dht

Kademlia DHT Go implementation.
Following the specification from
- https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf
- http://xlattice.sourceforge.net/components/protocol/kademlia/specs.html
Run
To run a node:
go run main.go --config config.test0.yaml --debug start
Test
- Scenario:
+--+ +--+
|n0+-----------+n1|
+-++ +--+
|
|
| +--+ +--+
+----+n2+-----------+n3|
+--+ +--+
- To run 4 test nodes inside a tmux session:
bash run-dev-nodes.sh
Using the test.go in the rpc-test directory:
- calls to the node to perform lookups
go run test.go -find- performs an
admincall toFindnode, to then0, asking about then3
- performs an
- calls to simulate kademlia protocol rpc calls
go run test.go -ping- performs the
PINGcall
- performs the
go run test.go -findnode- performs the
FIND_NODEcall
- performs the
go run test.go -findvalue- performs the
FIND_VALUEcall
- performs the
go run test.go -store- performs the
STOREcall
- performs the