Skip to content

Commit 4c45e03

Browse files
committed
update boxo v0.36.0
1 parent 1ecd0b8 commit 4c45e03

File tree

14 files changed

+775
-2760
lines changed

14 files changed

+775
-2760
lines changed

.github/workflows/go-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
submodules: recursive
1717
- uses: actions/setup-go@v3
1818
with:
19-
go-version: "1.19.x"
19+
go-version: "1.24.x"
2020
- name: Run repo-specific setup
2121
uses: ./.github/actions/go-check-setup
2222
if: hashFiles('./.github/actions/go-check-setup') != ''

.github/workflows/go-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
os: [ "ubuntu", "windows", "macos" ]
13-
go: [ "1.18.x", "1.19.x" ]
13+
go: [ "1.24.x", "1.25.x" ]
1414
env:
1515
COVERAGES: ""
1616
runs-on: ${{ format('{0}-latest', matrix.os) }}

benchmarks/benchmark_test.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package graphsync_test
33
import (
44
"bytes"
55
"context"
6+
crand "crypto/rand"
67
"fmt"
78
"math/rand"
89
"os"
@@ -13,17 +14,17 @@ import (
1314
"testing"
1415
"time"
1516

16-
"github.com/ipfs/go-blockservice"
17+
"github.com/ipfs/boxo/blockservice"
18+
"github.com/ipfs/boxo/blockstore"
19+
chunker "github.com/ipfs/boxo/chunker"
20+
"github.com/ipfs/boxo/exchange/offline"
21+
"github.com/ipfs/boxo/files"
22+
"github.com/ipfs/boxo/ipld/merkledag"
23+
"github.com/ipfs/boxo/ipld/unixfs/importer/balanced"
24+
ihelper "github.com/ipfs/boxo/ipld/unixfs/importer/helpers"
1725
"github.com/ipfs/go-cid"
18-
blockstore "github.com/ipfs/go-ipfs-blockstore"
19-
chunker "github.com/ipfs/go-ipfs-chunker"
2026
delay "github.com/ipfs/go-ipfs-delay"
21-
offline "github.com/ipfs/go-ipfs-exchange-offline"
22-
files "github.com/ipfs/go-ipfs-files"
2327
ipldformat "github.com/ipfs/go-ipld-format"
24-
"github.com/ipfs/go-merkledag"
25-
"github.com/ipfs/go-unixfs/importer/balanced"
26-
ihelper "github.com/ipfs/go-unixfs/importer/helpers"
2728
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
2829
"github.com/ipld/go-ipld-prime/node/basicnode"
2930
ipldselector "github.com/ipld/go-ipld-prime/traversal/selector"
@@ -100,7 +101,7 @@ func benchmarkRepeatedDisconnects(ctx context.Context, b *testing.B, numnodes in
100101
require.NoError(b, err)
101102
start := time.Now()
102103
errgrp, grpctx := errgroup.WithContext(ctx)
103-
for j := 0; j < numnodes; j++ {
104+
for j := range numnodes {
104105
instance := instances[j+1]
105106
_, errChan := fetcher.Exchange.Request(grpctx, instance.Peer, cidlink.Link{Cid: allCids[i][j]}, allSelector)
106107
other := instance.Peer
@@ -151,7 +152,7 @@ func p2pStrestTest(ctx context.Context, b *testing.B, numfiles int, df distFunc,
151152
instances, err := ig.Instances(1 + b.N)
152153
require.NoError(b, err)
153154
var allCids []cid.Cid
154-
for i := 0; i < numfiles; i++ {
155+
for range numfiles {
155156
thisCids := df(ctx, b, instances[:1])
156157
allCids = append(allCids, thisCids...)
157158
}
@@ -169,7 +170,7 @@ func p2pStrestTest(ctx context.Context, b *testing.B, numfiles int, df distFunc,
169170
require.NoError(b, err)
170171
start := time.Now()
171172
errgrp, grpctx := errgroup.WithContext(ctx)
172-
for j := 0; j < numfiles; j++ {
173+
for j := range numfiles {
173174
responseChan, errChan := fetcher.Exchange.Request(grpctx, instances[0].Peer, cidlink.Link{Cid: allCids[j]}, allSelector)
174175
errgrp.Go(func() error {
175176
for range responseChan {
@@ -222,7 +223,7 @@ func subtestDistributeAndFetch(ctx context.Context, b *testing.B, numnodes int,
222223
require.NoError(b, err)
223224
start := time.Now()
224225
errgrp, grpctx := errgroup.WithContext(ctx)
225-
for j := 0; j < numnodes; j++ {
226+
for j := range numnodes {
226227
instance := instances[j]
227228
_, errChan := fetcher.Exchange.Request(grpctx, instance.Peer, cidlink.Link{Cid: destCids[j]}, allSelector)
228229

@@ -264,7 +265,7 @@ const defaultUnixfsLinksPerLevel = 1024
264265
func loadRandomUnixFxFile(ctx context.Context, b *testing.B, bs blockstore.Blockstore, size uint64, unixfsChunkSize uint64, unixfsLinksPerLevel int, useRawNodes bool) cid.Cid {
265266

266267
data := make([]byte, size)
267-
_, err := rand.Read(data)
268+
_, err := crand.Read(data)
268269
require.NoError(b, err)
269270
buf := bytes.NewReader(data)
270271
file := files.NewReaderFile(buf)

benchmarks/testinstance/testinstance.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import (
44
"context"
55
"time"
66

7+
"github.com/ipfs/boxo/blockstore"
78
ds "github.com/ipfs/go-datastore"
89
"github.com/ipfs/go-datastore/delayed"
910
ds_sync "github.com/ipfs/go-datastore/sync"
1011
badgerds "github.com/ipfs/go-ds-badger"
11-
blockstore "github.com/ipfs/go-ipfs-blockstore"
1212
delay "github.com/ipfs/go-ipfs-delay"
1313
"github.com/ipld/go-ipld-prime"
1414
tnet "github.com/libp2p/go-libp2p-testing/net"
1515
p2ptestutil "github.com/libp2p/go-libp2p-testing/netutil"
16-
peer "github.com/libp2p/go-libp2p/core/peer"
16+
"github.com/libp2p/go-libp2p/core/peer"
1717

1818
graphsync "github.com/filecoin-project/boost-graphsync"
1919
tn "github.com/filecoin-project/boost-graphsync/benchmarks/testnet"
@@ -73,7 +73,7 @@ func (g *InstanceGenerator) Next() (Instance, error) {
7373
// them to each other
7474
func (g *InstanceGenerator) Instances(n int) ([]Instance, error) {
7575
var instances []Instance
76-
for j := 0; j < n; j++ {
76+
for range n {
7777
inst, err := g.Next()
7878
if err != nil {
7979
return nil, err

benchmarks/testnet/peernet.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package testnet
22

33
import (
44
"context"
5+
"slices"
56

67
tnet "github.com/libp2p/go-libp2p-testing/net"
78
"github.com/libp2p/go-libp2p/core/peer"
@@ -32,12 +33,7 @@ func (pn *peernet) Adapter(p tnet.Identity) gsnet.GraphSyncNetwork {
3233
}
3334

3435
func (pn *peernet) HasPeer(p peer.ID) bool {
35-
for _, member := range pn.Mocknet.Peers() {
36-
if p == member {
37-
return true
38-
}
39-
}
40-
return false
36+
return slices.Contains(pn.Mocknet.Peers(), p)
4137
}
4238

4339
var _ Network = (*peernet)(nil)

go.mod

Lines changed: 70 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,120 @@
11
module github.com/filecoin-project/boost-graphsync
22

3-
go 1.18
3+
go 1.24.6
44

55
require (
6-
github.com/google/go-cmp v0.5.9
7-
github.com/google/uuid v1.3.0
6+
github.com/google/go-cmp v0.7.0
7+
github.com/google/uuid v1.6.0
88
github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1
99
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e
10-
github.com/ipfs/go-block-format v0.0.3
11-
github.com/ipfs/go-blockservice v0.2.1
12-
github.com/ipfs/go-cid v0.4.1
13-
github.com/ipfs/go-datastore v0.6.0
14-
github.com/ipfs/go-ds-badger v0.3.0
10+
github.com/ipfs/boxo v0.36.0
11+
github.com/ipfs/go-block-format v0.2.3
12+
github.com/ipfs/go-cid v0.6.0
13+
github.com/ipfs/go-datastore v0.9.0
14+
github.com/ipfs/go-ds-badger v0.3.4
1515
github.com/ipfs/go-ipfs-blockstore v1.1.2
1616
github.com/ipfs/go-ipfs-blocksutil v0.0.1
1717
github.com/ipfs/go-ipfs-chunker v0.0.5
1818
github.com/ipfs/go-ipfs-delay v0.0.1
19-
github.com/ipfs/go-ipfs-exchange-offline v0.1.1
2019
github.com/ipfs/go-ipfs-files v0.0.8
21-
github.com/ipfs/go-ipfs-pq v0.0.2
20+
github.com/ipfs/go-ipfs-pq v0.0.4
2221
github.com/ipfs/go-ipfs-routing v0.3.0
23-
github.com/ipfs/go-ipfs-util v0.0.2
24-
github.com/ipfs/go-ipld-format v0.2.0
25-
github.com/ipfs/go-log/v2 v2.5.1
26-
github.com/ipfs/go-merkledag v0.5.1
27-
github.com/ipfs/go-peertaskqueue v0.8.0
28-
github.com/ipfs/go-unixfs v0.4.3
29-
github.com/ipfs/go-unixfsnode v1.5.2
30-
github.com/ipld/go-codec-dagpb v1.5.0
22+
github.com/ipfs/go-ipfs-util v0.0.3
23+
github.com/ipfs/go-ipld-format v0.6.3
24+
github.com/ipfs/go-log/v2 v2.9.1
25+
github.com/ipfs/go-peertaskqueue v0.8.3
26+
github.com/ipfs/go-unixfsnode v1.10.2
27+
github.com/ipld/go-codec-dagpb v1.7.0
3128
github.com/ipld/go-ipld-prime v0.21.0
3229
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
3330
github.com/libp2p/go-buffer-pool v0.1.0
34-
github.com/libp2p/go-libp2p v0.25.0
31+
github.com/libp2p/go-libp2p v0.47.0
3532
github.com/libp2p/go-libp2p-testing v0.12.0
3633
github.com/libp2p/go-msgio v0.3.0
37-
github.com/multiformats/go-multiaddr v0.8.0
34+
github.com/multiformats/go-multiaddr v0.16.1
3835
github.com/multiformats/go-multihash v0.2.3
39-
github.com/stretchr/testify v1.8.1
40-
go.opentelemetry.io/otel v1.2.0
41-
go.opentelemetry.io/otel/sdk v1.2.0
42-
go.opentelemetry.io/otel/trace v1.2.0
43-
golang.org/x/sync v0.1.0
44-
google.golang.org/protobuf v1.28.1
36+
github.com/stretchr/testify v1.11.1
37+
go.opentelemetry.io/otel v1.39.0
38+
go.opentelemetry.io/otel/sdk v1.38.0
39+
go.opentelemetry.io/otel/trace v1.39.0
40+
golang.org/x/sync v0.19.0
41+
google.golang.org/protobuf v1.36.11
4542
)
4643

4744
require (
4845
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
49-
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
50-
github.com/benbjohnson/clock v1.3.0 // indirect
46+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
47+
github.com/benbjohnson/clock v1.3.5 // indirect
5148
github.com/beorn7/perks v1.0.1 // indirect
5249
github.com/cespare/xxhash v1.1.0 // indirect
53-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
50+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
5451
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
55-
github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect
52+
github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf // indirect
5653
github.com/davecgh/go-spew v1.1.1 // indirect
57-
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
54+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
5855
github.com/dgraph-io/badger v1.6.2 // indirect
5956
github.com/dgraph-io/ristretto v0.0.2 // indirect
60-
github.com/dustin/go-humanize v1.0.0 // indirect
57+
github.com/dustin/go-humanize v1.0.1 // indirect
58+
github.com/gammazero/chanqueue v1.1.1 // indirect
59+
github.com/gammazero/deque v1.2.0 // indirect
60+
github.com/go-logr/logr v1.4.3 // indirect
61+
github.com/go-logr/stdr v1.2.2 // indirect
6162
github.com/gogo/protobuf v1.3.2 // indirect
62-
github.com/golang/protobuf v1.5.2 // indirect
63-
github.com/google/gopacket v1.1.19 // indirect
64-
github.com/hashicorp/golang-lru v0.5.4 // indirect
65-
github.com/huin/goupnp v1.0.3 // indirect
63+
github.com/golang/protobuf v1.5.3 // indirect
64+
github.com/hashicorp/golang-lru v1.0.2 // indirect
65+
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
66+
github.com/huin/goupnp v1.3.0 // indirect
6667
github.com/ipfs/bbloom v0.0.4 // indirect
6768
github.com/ipfs/go-bitfield v1.1.0 // indirect
69+
github.com/ipfs/go-cidutil v0.1.0 // indirect
70+
github.com/ipfs/go-dsqueue v0.1.2 // indirect
6871
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
69-
github.com/ipfs/go-ipfs-exchange-interface v0.1.0 // indirect
70-
github.com/ipfs/go-ipfs-posinfo v0.0.1 // indirect
71-
github.com/ipfs/go-ipld-cbor v0.0.5 // indirect
72-
github.com/ipfs/go-ipld-legacy v0.1.0 // indirect
73-
github.com/ipfs/go-libipfs v0.1.0 // indirect
72+
github.com/ipfs/go-ipld-legacy v0.2.2 // indirect
7473
github.com/ipfs/go-log v1.0.5 // indirect
75-
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
76-
github.com/ipfs/go-verifcid v0.0.1 // indirect
74+
github.com/ipfs/go-metrics-interface v0.3.0 // indirect
7775
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
78-
github.com/jbenet/goprocess v0.1.4 // indirect
79-
github.com/klauspost/cpuid/v2 v2.2.1 // indirect
80-
github.com/koron/go-ssdp v0.0.3 // indirect
81-
github.com/libp2p/go-cidranger v1.1.0 // indirect
82-
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
83-
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
84-
github.com/libp2p/go-nat v0.1.0 // indirect
85-
github.com/libp2p/go-netroute v0.2.1 // indirect
86-
github.com/mattn/go-isatty v0.0.16 // indirect
87-
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
88-
github.com/miekg/dns v1.1.50 // indirect
89-
github.com/minio/sha256-simd v1.0.0 // indirect
76+
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
77+
github.com/koron/go-ssdp v0.0.6 // indirect
78+
github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect
79+
github.com/libp2p/go-libp2p-record v0.3.1 // indirect
80+
github.com/libp2p/go-netroute v0.4.0 // indirect
81+
github.com/mattn/go-isatty v0.0.20 // indirect
82+
github.com/minio/sha256-simd v1.0.1 // indirect
9083
github.com/mr-tron/base58 v1.2.0 // indirect
9184
github.com/multiformats/go-base32 v0.1.0 // indirect
9285
github.com/multiformats/go-base36 v0.2.0 // indirect
93-
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
9486
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
95-
github.com/multiformats/go-multibase v0.1.1 // indirect
96-
github.com/multiformats/go-multicodec v0.9.0 // indirect
97-
github.com/multiformats/go-multistream v0.4.0 // indirect
98-
github.com/multiformats/go-varint v0.0.7 // indirect
87+
github.com/multiformats/go-multibase v0.2.0 // indirect
88+
github.com/multiformats/go-multicodec v0.10.0 // indirect
89+
github.com/multiformats/go-multistream v0.6.1 // indirect
90+
github.com/multiformats/go-varint v0.1.0 // indirect
91+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
9992
github.com/opentracing/opentracing-go v1.2.0 // indirect
10093
github.com/pkg/errors v0.9.1 // indirect
10194
github.com/pmezard/go-difflib v1.0.0 // indirect
10295
github.com/polydawn/refmt v0.89.0 // indirect
103-
github.com/prometheus/client_golang v1.14.0 // indirect
104-
github.com/prometheus/client_model v0.3.0 // indirect
105-
github.com/prometheus/common v0.37.0 // indirect
106-
github.com/prometheus/procfs v0.8.0 // indirect
96+
github.com/prometheus/client_golang v1.23.2 // indirect
97+
github.com/prometheus/client_model v0.6.2 // indirect
98+
github.com/prometheus/common v0.66.1 // indirect
99+
github.com/prometheus/procfs v0.17.0 // indirect
107100
github.com/russross/blackfriday/v2 v2.0.1 // indirect
108101
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
109102
github.com/spaolacci/murmur3 v1.1.0 // indirect
110103
github.com/urfave/cli/v2 v2.0.0 // indirect
111-
github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d // indirect
112104
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect
105+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
106+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
113107
go.uber.org/atomic v1.10.0 // indirect
114-
go.uber.org/multierr v1.8.0 // indirect
115-
go.uber.org/zap v1.24.0 // indirect
116-
golang.org/x/crypto v0.4.0 // indirect
117-
golang.org/x/mod v0.7.0 // indirect
118-
golang.org/x/net v0.4.0 // indirect
119-
golang.org/x/sys v0.3.0 // indirect
120-
golang.org/x/tools v0.3.0 // indirect
121-
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
108+
go.uber.org/multierr v1.11.0 // indirect
109+
go.uber.org/zap v1.27.1 // indirect
110+
go.yaml.in/yaml/v2 v2.4.3 // indirect
111+
golang.org/x/crypto v0.47.0 // indirect
112+
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
113+
golang.org/x/mod v0.32.0 // indirect
114+
golang.org/x/net v0.49.0 // indirect
115+
golang.org/x/sys v0.40.0 // indirect
116+
golang.org/x/time v0.12.0 // indirect
117+
golang.org/x/tools v0.41.0 // indirect
122118
gopkg.in/yaml.v3 v3.0.1 // indirect
123-
lukechampine.com/blake3 v1.1.7 // indirect
119+
lukechampine.com/blake3 v1.4.1 // indirect
124120
)

0 commit comments

Comments
 (0)