ethresearch / sharding-p2p-poc

Proof of Concept of Ethereum Serenity Peer-to-Peer Layer on libp2p PubSub System
40 stars 19 forks source link

Pass bootnode info when starting a node #31

Closed mhchia closed 6 years ago

mhchia commented 6 years ago

What is wrong?

To let nodes defined in docker-compose file #13 be easily bootstrapped, a config argument to assign bootnode address is required.

How can it be fixed?

Add a config argument to assign bootnode address

mhchia commented 6 years ago

Note: I was stuck for a while because dht.Bootstrap seemed not working. After adjusting the Period to a smaller number, e.g. 100 * time.Millisecond in DefaultBootstrapConfig, dht.Bootstrap worked. The reason seems to be dht.FindPeer is not performed right after dht.Bootstrap is called. We need to wait for Period. So I found it is solved by a recent PR https://github.com/libp2p/go-libp2p-kad-dht/pull/170. Just need to change our dependency on libp2p/go-libp2p-kad-dht to the latest version in gx.

TODO

mhchia commented 6 years ago

Closed by #35