Skip to content

Commit b46a700

Browse files
authored
chore(deps): incorporate upstream concurrency fix (#302)
1 parent de9214e commit b46a700

File tree

4 files changed

+16
-131
lines changed

4 files changed

+16
-131
lines changed

builtin/v9/migration/miner.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/filecoin-project/go-amt-ipld/v4"
1212
"golang.org/x/xerrors"
1313

14-
commp "github.com/filecoin-project/go-commp-utils/nonffi"
14+
commp "github.com/filecoin-project/go-commp-utils/v2"
1515
"github.com/filecoin-project/go-state-types/builtin"
1616
"github.com/filecoin-project/go-state-types/builtin/v8/market"
1717
miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner"
@@ -214,7 +214,7 @@ func (m minerMigrator) migratePrecommits(ctx context.Context, wrappedStore adt8.
214214
}
215215

216216
if len(pieces) != 0 {
217-
commd, err := commp.GenerateUnsealedCID(info.Info.SealProof, pieces)
217+
commd, _, err := commp.PieceAggregateCommP(info.Info.SealProof, pieces)
218218
if err != nil {
219219
return xerrors.Errorf("failed to generate unsealed CID: %w", err)
220220
}

builtin/v9/migration/test/miner_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/filecoin-project/go-state-types/test_util"
88

9-
commp "github.com/filecoin-project/go-commp-utils/nonffi"
9+
commp "github.com/filecoin-project/go-commp-utils/v2"
1010
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
1111

1212
"github.com/filecoin-project/go-address"
@@ -289,7 +289,7 @@ func TestMinerMigration(t *testing.T) {
289289
require.NoError(t, err)
290290
require.True(t, ok)
291291
require.NotNil(t, pc.Info.UnsealedCid)
292-
expectedCid, err := commp.GenerateUnsealedCID(abi.RegisteredSealProof_StackedDrg32GiBV1_1, []abi.PieceInfo{{PieceCID: deal0.PieceCID, Size: deal0.PieceSize}})
292+
expectedCid, _, err := commp.PieceAggregateCommP(abi.RegisteredSealProof_StackedDrg32GiBV1_1, []abi.PieceInfo{{PieceCID: deal0.PieceCID, Size: deal0.PieceSize}})
293293
require.NoError(t, err)
294294

295295
require.Equal(t, expectedCid, *pc.Info.UnsealedCid)
@@ -298,7 +298,7 @@ func TestMinerMigration(t *testing.T) {
298298
require.NoError(t, err)
299299
require.True(t, ok)
300300
require.NotNil(t, pc.Info.UnsealedCid)
301-
expectedCid, err = commp.GenerateUnsealedCID(abi.RegisteredSealProof_StackedDrg32GiBV1_1, []abi.PieceInfo{
301+
expectedCid, _, err = commp.PieceAggregateCommP(abi.RegisteredSealProof_StackedDrg32GiBV1_1, []abi.PieceInfo{
302302
{PieceCID: deal1.PieceCID, Size: deal1.PieceSize},
303303
{PieceCID: deal2.PieceCID, Size: deal2.PieceSize}})
304304
require.NoError(t, err)

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/filecoin-project/go-address v1.1.0
99
github.com/filecoin-project/go-amt-ipld/v4 v4.4.0
1010
github.com/filecoin-project/go-bitfield v0.2.4
11-
github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837
11+
github.com/filecoin-project/go-commp-utils/v2 v2.1.0
1212
github.com/filecoin-project/go-hamt-ipld/v3 v3.4.0
1313
github.com/ipfs/go-block-format v0.2.0
1414
github.com/ipfs/go-cid v0.4.1
@@ -28,8 +28,9 @@ require (
2828

2929
require (
3030
github.com/davecgh/go-spew v1.1.1 // indirect
31-
github.com/filecoin-project/go-commp-utils v0.1.3 // indirect
3231
github.com/filecoin-project/go-fil-commcid v0.1.0 // indirect
32+
github.com/filecoin-project/go-fil-commp-hashhash v0.2.0 // indirect
33+
github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f // indirect
3334
github.com/ipfs/go-ipfs-util v0.0.3 // indirect
3435
github.com/ipfs/go-ipld-format v0.6.0 // indirect
3536
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
@@ -39,7 +40,8 @@ require (
3940
github.com/pmezard/go-difflib v1.0.0 // indirect
4041
github.com/polydawn/refmt v0.89.0 // indirect
4142
github.com/spaolacci/murmur3 v1.1.0 // indirect
42-
golang.org/x/sys v0.22.0 // indirect
43+
golang.org/x/sys v0.23.0 // indirect
44+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
4345
gopkg.in/yaml.v3 v3.0.1 // indirect
4446
lukechampine.com/blake3 v1.3.0 // indirect
4547
)

0 commit comments

Comments
 (0)