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