Skip to content

Commit d65efdb

Browse files
update go-libp2p to v0.28.1
1 parent f2a6c4f commit d65efdb

File tree

7 files changed

+25
-117
lines changed

7 files changed

+25
-117
lines changed

core/commands/id.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"github.com/libp2p/go-libp2p/core/peer"
2222
pstore "github.com/libp2p/go-libp2p/core/peerstore"
2323
"github.com/libp2p/go-libp2p/core/protocol"
24-
"github.com/libp2p/go-libp2p/p2p/protocol/identify"
2524
)
2625

2726
const offlineIDErrorMessage = "'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option"
@@ -217,7 +216,6 @@ func printSelf(keyEnc ke.KeyEncoder, node *core.IpfsNode) (interface{}, error) {
217216
info.Protocols = node.PeerHost.Mux().Protocols()
218217
sort.Slice(info.Protocols, func(i, j int) bool { return info.Protocols[i] < info.Protocols[j] })
219218
}
220-
info.ProtocolVersion = identify.DefaultProtocolVersion
221219
info.AgentVersion = version.GetUserAgentVersion()
222220
return info, nil
223221
}

core/corehttp/gateway.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ import (
1616
"github.com/ipfs/boxo/gateway"
1717
"github.com/ipfs/boxo/namesys"
1818
offlineroute "github.com/ipfs/boxo/routing/offline"
19-
cid "github.com/ipfs/go-cid"
19+
"github.com/ipfs/go-cid"
2020
version "github.com/ipfs/kubo"
21-
config "github.com/ipfs/kubo/config"
22-
core "github.com/ipfs/kubo/core"
21+
"github.com/ipfs/kubo/config"
22+
"github.com/ipfs/kubo/core"
2323
"github.com/ipfs/kubo/core/node"
2424
"github.com/libp2p/go-libp2p/core/routing"
25-
id "github.com/libp2p/go-libp2p/p2p/protocol/identify"
2625
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
2726
)
2827

@@ -72,7 +71,6 @@ func VersionOption() ServeOption {
7271
mux.HandleFunc("/version", func(w http.ResponseWriter, r *http.Request) {
7372
fmt.Fprintf(w, "Commit: %s\n", version.CurrentCommit)
7473
fmt.Fprintf(w, "Client Version: %s\n", version.GetUserAgentVersion())
75-
fmt.Fprintf(w, "Protocol Version: %s\n", id.DefaultProtocolVersion)
7674
})
7775
return mux, nil
7876
}

core/corehttp/gateway_test.go

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,20 @@ import (
99
"strings"
1010
"testing"
1111

12-
namesys "github.com/ipfs/boxo/namesys"
12+
"github.com/ipfs/boxo/namesys"
1313
version "github.com/ipfs/kubo"
14-
core "github.com/ipfs/kubo/core"
14+
"github.com/ipfs/kubo/core"
1515
"github.com/ipfs/kubo/core/coreapi"
16-
repo "github.com/ipfs/kubo/repo"
16+
"github.com/ipfs/kubo/repo"
1717
"github.com/stretchr/testify/assert"
1818

1919
iface "github.com/ipfs/boxo/coreiface"
2020
nsopts "github.com/ipfs/boxo/coreiface/options/namesys"
21-
path "github.com/ipfs/boxo/path"
22-
datastore "github.com/ipfs/go-datastore"
21+
"github.com/ipfs/boxo/path"
22+
"github.com/ipfs/go-datastore"
2323
syncds "github.com/ipfs/go-datastore/sync"
24-
config "github.com/ipfs/kubo/config"
24+
"github.com/ipfs/kubo/config"
2525
ci "github.com/libp2p/go-libp2p/core/crypto"
26-
id "github.com/libp2p/go-libp2p/p2p/protocol/identify"
2726
)
2827

2928
type mockNamesys map[string]path.Path
@@ -169,10 +168,6 @@ func TestVersion(t *testing.T) {
169168
if !strings.Contains(s, "Client Version: "+version.GetUserAgentVersion()) {
170169
t.Fatalf("response doesn't contain client version:\n%s", s)
171170
}
172-
173-
if !strings.Contains(s, "Protocol Version: "+id.DefaultProtocolVersion) {
174-
t.Fatalf("response doesn't contain protocol version:\n%s", s)
175-
}
176171
}
177172

178173
func TestDeserializedResponsesInheritance(t *testing.T) {

docs/examples/kubo-as-a-library/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ replace github.com/ipfs/kubo => ./../../..
99
require (
1010
github.com/ipfs/boxo v0.10.2-0.20230627105028-a87f9ed0b2a9
1111
github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
12-
github.com/libp2p/go-libp2p v0.27.7
12+
github.com/libp2p/go-libp2p v0.28.1
1313
github.com/multiformats/go-multiaddr v0.9.0
1414
)
1515

@@ -52,6 +52,7 @@ require (
5252
github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect
5353
github.com/google/uuid v1.3.0 // indirect
5454
github.com/gorilla/mux v1.8.0 // indirect
55+
github.com/gorilla/websocket v1.5.0 // indirect
5556
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
5657
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect
5758
github.com/hashicorp/errwrap v1.1.0 // indirect
@@ -109,7 +110,7 @@ require (
109110
github.com/libp2p/go-libp2p-xor v0.1.0 // indirect
110111
github.com/libp2p/go-mplex v0.7.0 // indirect
111112
github.com/libp2p/go-msgio v0.3.0 // indirect
112-
github.com/libp2p/go-nat v0.1.0 // indirect
113+
github.com/libp2p/go-nat v0.2.0 // indirect
113114
github.com/libp2p/go-netroute v0.2.1 // indirect
114115
github.com/libp2p/go-reuseport v0.3.0 // indirect
115116
github.com/libp2p/go-yamux/v4 v4.0.0 // indirect
@@ -194,5 +195,4 @@ require (
194195
google.golang.org/protobuf v1.30.0 // indirect
195196
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
196197
lukechampine.com/blake3 v1.2.1 // indirect
197-
nhooyr.io/websocket v1.8.7 // indirect
198198
)

0 commit comments

Comments
 (0)