You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
arnaucube ff0ba3995a add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
cmd add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
config add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
kademlia add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
node add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
rpc-test add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
.gitignore add FindClosestKBucket, add rpc FindNode & FindValue & Store (wip) 4 years ago
.travis.yml add travis 4 years ago
LICENSE Initial commit 4 years ago
README.md add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
config.test0.yaml add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
config.test1.yaml add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
config.test2.yaml add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
config.test3.yaml add admin RPC find call, add kademlia NodeLookup interactive 4 years ago
go.mod add node structure (cmd, config...) 4 years ago
go.sum add node structure (cmd, config...) 4 years ago
main.go node rpc PING & PONG methods and calls 4 years ago
run-dev-nodes.sh add admin RPC find call, add kademlia NodeLookup interactive 4 years ago

README.md

go-dht Go Report Card Build Status

Kademlia DHT Go implementation.

Following the specification from

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 admin call to Find node, to the n0, asking about the n3
  • calls to simulate kademlia protocol rpc calls
    • go run test.go -ping
      • performs the PING call
    • go run test.go -findnode
      • performs the FIND_NODE call
    • go run test.go -findvalue
      • performs the FIND_VALUE call
    • go run test.go -store
      • performs the STORE call