Skip to content

Commit

Permalink
Update libp2p and libp2p-pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed May 21, 2024
1 parent 4e742e0 commit 9b5edf0
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 55 deletions.
5 changes: 5 additions & 0 deletions dagsync/ipnisync/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ func NewSync(lsys ipld.LinkSystem, blockHook func(peer.ID, cid.Cid), options ...
},
clientHost: &libp2phttp.Host{
StreamHost: opts.streamHost,
// Allow compatibility with older version of libp2phttp.
//
// This should be deprecated once all storage providers have
// upgraded to a version of ipni that uses go-libp2p v0.34.0.
EnableCompatibilityWithLegacyWellKnownEndpoint: true,
},
lsys: lsys,
authPeerID: opts.authPeerID,
Expand Down
4 changes: 1 addition & 3 deletions dagsync/subscriber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ func TestConcurrentSync(t *testing.T) {
require.NoError(t, err)

wg := sync.WaitGroup{}
// Now sync again. We shouldn't call the hook because we persisted our latestSync
for _, pub := range publishers {
wg.Add(1)

Expand All @@ -212,10 +211,9 @@ func TestConcurrentSync(t *testing.T) {
}
_, err := sub.SyncAdChain(context.Background(), peerInfo)
if err != nil {
panic("sync failed")
panic("sync failed: " + err.Error())
}
}(pub)

}

doneChan := make(chan struct{})
Expand Down
50 changes: 33 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ require (
github.com/ipfs/go-ipld-format v0.6.0
github.com/ipfs/go-log/v2 v2.5.1
github.com/ipld/go-ipld-prime v0.21.0
github.com/libp2p/go-libp2p v0.33.2
github.com/libp2p/go-libp2p-pubsub v0.10.1
github.com/libp2p/go-libp2p v0.34.0
github.com/libp2p/go-libp2p-pubsub v0.11.0
github.com/libp2p/go-msgio v0.3.0
github.com/mr-tron/base58 v1.2.0
github.com/multiformats/go-multiaddr v0.12.4
github.com/multiformats/go-multicodec v0.9.0
github.com/multiformats/go-multihash v0.2.3
github.com/multiformats/go-varint v0.0.7
github.com/stretchr/testify v1.8.4
github.com/stretchr/testify v1.9.0
github.com/whyrusleeping/cbor-gen v0.1.1
golang.org/x/crypto v0.23.0
google.golang.org/protobuf v1.33.0
google.golang.org/protobuf v1.34.1
)

require (
Expand All @@ -33,7 +33,7 @@ require (
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/flynn/noise v1.1.0 // indirect
Expand All @@ -49,14 +49,14 @@ require (
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/ipfs/go-block-format v0.1.2 // indirect
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/klauspost/compress v1.17.6 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
Expand All @@ -81,31 +81,47 @@ require (
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pion/datachannel v1.5.6 // indirect
github.com/pion/dtls/v2 v2.2.11 // indirect
github.com/pion/ice/v2 v2.3.24 // indirect
github.com/pion/interceptor v0.1.29 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.12 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.14 // indirect
github.com/pion/rtp v1.8.6 // indirect
github.com/pion/sctp v1.8.16 // indirect
github.com/pion/sdp/v3 v3.0.9 // indirect
github.com/pion/srtp/v2 v2.0.18 // indirect
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.5 // indirect
github.com/pion/turn/v2 v2.1.6 // indirect
github.com/pion/webrtc/v3 v3.2.40 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.42.0 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/quic-go/quic-go v0.44.0 // indirect
github.com/quic-go/webtransport-go v0.8.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/smartystreets/assertions v1.13.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.1 // indirect
go.uber.org/fx v1.21.1 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/tools v0.21.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
Expand Down
Loading

0 comments on commit 9b5edf0

Please sign in to comment.