Skip to content

Commit

Permalink
Add peer discovery (cosmos#17)
Browse files Browse the repository at this point in the history
* Use DHT for bootstrapping and active peer discovery
* Pass context instead of storing it in struct
* Wrap libp2p host with RoutedHost
* Ensure that context passed to libp2p is cancelled

Resolves cosmos#2.
  • Loading branch information
tzdybal authored Mar 23, 2021
1 parent cd64a50 commit 567292e
Show file tree
Hide file tree
Showing 6 changed files with 440 additions and 53 deletions.
5 changes: 5 additions & 0 deletions config/defaults.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package config

const (
DefaultListenAddress = "/ip4/0.0.0.0/tcp/7676"
)
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ module github.com/lazyledger/optimint
go 1.15

require (
github.com/ipfs/go-log v1.0.4
github.com/lazyledger/lazyledger-core v0.0.0-20210219190522-0eccfb24e2aa
github.com/libp2p/go-libp2p v0.13.0 // indirect
github.com/libp2p/go-libp2p v0.13.0
github.com/libp2p/go-libp2p-core v0.8.5
github.com/multiformats/go-multiaddr v0.3.1 // indirect
github.com/multiformats/go-multihash v0.0.14 // indirect
github.com/libp2p/go-libp2p-discovery v0.5.0
github.com/libp2p/go-libp2p-kad-dht v0.11.1
github.com/multiformats/go-multiaddr v0.3.1
github.com/stretchr/testify v1.7.0
)
Loading

0 comments on commit 567292e

Please sign in to comment.