Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback libp2p kad dht dependency update #6084

Merged
merged 5 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions beacon-chain/p2p/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@ func NewService(cfg *Config) (*Service, error) {

if len(cfg.KademliaBootStrapAddr) != 0 && !cfg.NoDiscovery {
dopts := []dhtopts.Option{
kaddht.Datastore(dsync.MutexWrap(ds.NewMapDatastore())),
kaddht.ProtocolPrefix(
dhtopts.Datastore(dsync.MutexWrap(ds.NewMapDatastore())),
dhtopts.Protocols(
prysmProtocolPrefix + "/dht",
),
kaddht.RoutingTableRefreshPeriod(30 * time.Second),
}

s.dht, err = kaddht.New(ctx, h, dopts...)
Expand Down Expand Up @@ -255,7 +254,9 @@ func (s *Service) Start() {
}
s.host.ConnManager().Protect(peer.ID, "bootnode")
}
if err := s.dht.Bootstrap(s.ctx); err != nil {
bcfg := kaddht.DefaultBootstrapConfig
bcfg.Period = 30 * time.Second
if err := s.dht.BootstrapWithConfig(s.ctx, bcfg); err != nil {
log.WithError(err).Error("Failed to bootstrap DHT")
}
}
Expand Down
230 changes: 220 additions & 10 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,20 @@ def prysm_deps():
go_repository(
name = "com_github_azure_go_autorest_autorest_adal",
importpath = "github.com/Azure/go-autorest/autorest/adal",
sum = "h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=",
version = "v0.5.0",
sum = "h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I=",
version = "v0.8.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_date",
importpath = "github.com/Azure/go-autorest/autorest/date",
sum = "h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=",
version = "v0.1.0",
sum = "h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=",
version = "v0.2.0",
)
go_repository(
name = "com_github_azure_go_autorest_autorest_mocks",
importpath = "github.com/Azure/go-autorest/autorest/mocks",
sum = "h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=",
version = "v0.2.0",
sum = "h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=",
version = "v0.3.0",
)
go_repository(
name = "com_github_azure_go_autorest_logger",
Expand Down Expand Up @@ -2278,14 +2278,14 @@ def prysm_deps():
name = "com_github_libp2p_go_libp2p_kad_dht",
build_file_proto_mode = "disable_global",
importpath = "github.com/libp2p/go-libp2p-kad-dht",
sum = "h1:PS/mgLSzFqH5lS3PnnxcqsIrHy+qbQ5GkhzcrT12LyA=",
version = "v0.8.1",
sum = "h1:+pb1DCkV/6oNQjTZVXl+Y++eV0rnelx/L8y1t4J+Rnw=",
version = "v0.2.1",
)
go_repository(
name = "com_github_libp2p_go_libp2p_kbucket",
importpath = "github.com/libp2p/go-libp2p-kbucket",
sum = "h1:wg+VPpCtY61bCasGRexCuXOmEmdKjN+k1w+JtTwu9gA=",
version = "v0.4.2",
sum = "h1:XtNfN4WUy0cfeJoJgWCf1lor4Pp3kBkFJ9vQ+Zs+VUM=",
version = "v0.2.3",
)
go_repository(
name = "com_github_libp2p_go_libp2p_loggables",
Expand Down Expand Up @@ -2977,3 +2977,213 @@ def prysm_deps():
sum = "h1:4Z09Hglb792X0kfOBBJUPFEyvVfQWrYT/l8h5EKA6JQ=",
version = "v0.0.0-20190525122527-15d366b2352e",
)
go_repository(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are all of geth's deps re-imported here ? we are already using a rule for it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gazelle did it.

One thing to keep in mind is that this go_repository alias is a "maybe" style import. So if we have already imported geth's dependencies via bazel rule, then this would not override it.

name = "com_github_aristanetworks_goarista",
importpath = "github.com/aristanetworks/goarista",
sum = "h1:cgk6xsRVshE29qzHDCQ+tqmu7ny8GnjPQhAw/RTk/Co=",
version = "v0.0.0-20200521140103-6c3304613b30",
)
go_repository(
name = "com_github_btcsuite_btcd",
importpath = "github.com/btcsuite/btcd",
sum = "h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw=",
version = "v0.20.1-beta",
)
go_repository(
name = "com_github_btcsuite_websocket",
importpath = "github.com/btcsuite/websocket",
sum = "h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc=",
version = "v0.0.0-20150119174127-31079b680792",
)
go_repository(
name = "com_github_cespare_xxhash",
importpath = "github.com/cespare/xxhash",
sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=",
version = "v1.1.0",
)
go_repository(
name = "com_github_cespare_xxhash_v2",
importpath = "github.com/cespare/xxhash/v2",
sum = "h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=",
version = "v2.1.1",
)
go_repository(
name = "com_github_davecgh_go_spew",
importpath = "github.com/davecgh/go-spew",
sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
version = "v1.1.1",
)
go_repository(
name = "com_github_edsrzf_mmap_go",
importpath = "github.com/edsrzf/mmap-go",
sum = "h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=",
version = "v1.0.0",
)
go_repository(
name = "com_github_elastic_gosigar",
importpath = "github.com/elastic/gosigar",
sum = "h1:GzPQ+78RaAb4J63unidA/JavQRKrB6s8IOzN6Ib59jo=",
version = "v0.10.5",
)
go_repository(
name = "com_github_fatih_color",
importpath = "github.com/fatih/color",
sum = "h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=",
version = "v1.9.0",
)
go_repository(
name = "com_github_fjl_memsize",
importpath = "github.com/fjl/memsize",
sum = "h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=",
version = "v0.0.0-20190710130421-bcb5799ab5e5",
)
go_repository(
name = "com_github_go_stack_stack",
importpath = "github.com/go-stack/stack",
sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=",
version = "v1.8.0",
)
go_repository(
name = "com_github_google_uuid",
importpath = "github.com/google/uuid",
sum = "h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=",
version = "v1.1.1",
)
go_repository(
name = "com_github_graph_gophers_graphql_go",
importpath = "github.com/graph-gophers/graphql-go",
sum = "h1:kLnsdud6Fl1/7ZX/5oD23cqYAzBfuZBhNkGr2NvuEsU=",
version = "v0.0.0-20200309224638-dae41bde9ef9",
)
go_repository(
name = "com_github_huin_goupnp",
importpath = "github.com/huin/goupnp",
sum = "h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo=",
version = "v1.0.0",
)
go_repository(
name = "com_github_influxdata_influxdb",
importpath = "github.com/influxdata/influxdb",
sum = "h1:/X+G+i3udzHVxpBMuXdPZcUbkIE0ouT+6U+CzQTsOys=",
version = "v1.8.0",
)
go_repository(
name = "com_github_ipfs_go_todocounter",
importpath = "github.com/ipfs/go-todocounter",
sum = "h1:kITWA5ZcQZfrUnDNkRn04Xzh0YFaDFXsoO2A81Eb6Lw=",
version = "v0.0.1",
)
go_repository(
name = "com_github_jackpal_go_nat_pmp",
importpath = "github.com/jackpal/go-nat-pmp",
sum = "h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=",
version = "v1.0.2",
)
go_repository(
name = "com_github_libp2p_go_libp2p_routing",
importpath = "github.com/libp2p/go-libp2p-routing",
sum = "h1:hFnj3WR3E2tOcKaGpyzfP4gvFZ3t8JkQmbapN0Ct+oU=",
version = "v0.1.0",
)
go_repository(
name = "com_github_mattn_go_colorable",
importpath = "github.com/mattn/go-colorable",
sum = "h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=",
version = "v0.1.4",
)
go_repository(
name = "com_github_mattn_go_isatty",
importpath = "github.com/mattn/go-isatty",
sum = "h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=",
version = "v0.0.11",
)
go_repository(
name = "com_github_mattn_go_runewidth",
importpath = "github.com/mattn/go-runewidth",
sum = "h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54=",
version = "v0.0.7",
)
go_repository(
name = "com_github_naoina_go_stringutil",
importpath = "github.com/naoina/go-stringutil",
sum = "h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks=",
version = "v0.1.0",
)
go_repository(
name = "com_github_naoina_toml",
importpath = "github.com/naoina/toml",
sum = "h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0=",
version = "v0.1.2-0.20170918210437-9fafd6967416",
)
go_repository(
name = "com_github_opentracing_opentracing_go",
importpath = "github.com/opentracing/opentracing-go",
sum = "h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=",
version = "v1.1.0",
)
go_repository(
name = "com_github_pborman_uuid",
importpath = "github.com/pborman/uuid",
sum = "h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=",
version = "v1.2.0",
)
go_repository(
name = "com_github_peterh_liner",
importpath = "github.com/peterh/liner",
sum = "h1:w/UPXyl5GfahFxcTOz2j9wCIHNI+pUPr2laqpojKNCg=",
version = "v1.2.0",
)
go_repository(
name = "com_github_rjeczalik_notify",
importpath = "github.com/rjeczalik/notify",
sum = "h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=",
version = "v0.9.1",
)
go_repository(
name = "com_github_rs_cors",
importpath = "github.com/rs/cors",
sum = "h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=",
version = "v1.7.0",
)
go_repository(
name = "com_github_syndtr_goleveldb",
importpath = "github.com/syndtr/goleveldb",
sum = "h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs=",
version = "v1.0.1-0.20190923125748-758128399b1d",
)
go_repository(
name = "com_github_urfave_cli",
importpath = "github.com/urfave/cli",
sum = "h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=",
version = "v1.22.1",
)
go_repository(
name = "com_github_whyrusleeping_base32",
importpath = "github.com/whyrusleeping/base32",
sum = "h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4=",
version = "v0.0.0-20170828182744-c30ac30633cc",
)
go_repository(
name = "com_github_whyrusleeping_go_notifier",
importpath = "github.com/whyrusleeping/go-notifier",
sum = "h1:M/lL30eFZTKnomXY6huvM6G0+gVquFNf6mxghaWlFUg=",
version = "v0.0.0-20170827234753-097c5d47330f",
)
go_repository(
name = "in_gopkg_natefinch_npipe_v2",
importpath = "gopkg.in/natefinch/npipe.v2",
sum = "h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=",
version = "v2.0.0-20160621034901-c1b8fa8bdcce",
)
go_repository(
name = "in_gopkg_olebedev_go_duktape_v3",
importpath = "gopkg.in/olebedev/go-duktape.v3",
sum = "h1:ITeyKbRetrVzqR3U1eY+ywgp7IBspGd1U/bkwd1gWu4=",
version = "v3.0.0-20200316214253-d7b0ff38cac9",
)
go_repository(
name = "in_gopkg_urfave_cli_v1",
importpath = "gopkg.in/urfave/cli.v1",
sum = "h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=",
version = "v1.20.0",
)
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ require (
github.com/ipfs/go-datastore v0.4.4
github.com/ipfs/go-detect-race v0.0.1
github.com/ipfs/go-ipfs-addr v0.0.1
github.com/ipfs/go-ipns v0.0.2 // indirect
github.com/ipfs/go-log v1.0.4
github.com/ipfs/go-log/v2 v2.1.1
github.com/joonix/log v0.0.0-20200409080653-9c1d2ceb5f1d
Expand All @@ -55,12 +56,14 @@ require (
github.com/libp2p/go-libp2p-core v0.5.6
github.com/libp2p/go-libp2p-crypto v0.1.0
github.com/libp2p/go-libp2p-host v0.1.0
github.com/libp2p/go-libp2p-kad-dht v0.8.1
github.com/libp2p/go-libp2p-kad-dht v0.2.1
github.com/libp2p/go-libp2p-kbucket v0.2.3 // indirect
github.com/libp2p/go-libp2p-net v0.1.0
github.com/libp2p/go-libp2p-noise v0.1.1
github.com/libp2p/go-libp2p-peer v0.2.0
github.com/libp2p/go-libp2p-peerstore v0.2.4
github.com/libp2p/go-libp2p-pubsub v0.3.1
github.com/libp2p/go-libp2p-routing-helpers v0.2.3 // indirect
github.com/libp2p/go-libp2p-swarm v0.2.5
github.com/libp2p/go-libp2p-tls v0.1.4-0.20200421131144-8a8ad624a291 // indirect
github.com/libp2p/go-libp2p-yamux v0.2.8 // indirect
Expand Down Expand Up @@ -88,6 +91,7 @@ require (
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect
github.com/tyler-smith/go-bip39 v1.0.2 // indirect
github.com/urfave/cli/v2 v2.2.0
github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30 // indirect
github.com/wealdtech/eth2-signer-api v1.3.0
github.com/wealdtech/go-bytesutil v1.1.1
github.com/wealdtech/go-eth2-wallet v1.9.4
Expand Down