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

specs actors v0.6 #274

Merged
merged 3 commits into from
Jun 15, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ require (
github.com/filecoin-project/go-statemachine v0.0.0-20200612181802-4eb3d0c68eba
github.com/filecoin-project/go-statestore v0.1.0
github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b
github.com/filecoin-project/sector-storage v0.0.0-20200508203401-a74812ba12f3
github.com/filecoin-project/specs-actors v0.3.0
github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6
github.com/filecoin-project/specs-actors v0.6.0
github.com/hannahhoward/cbor-gen-for v0.0.0-20191218204337-9ab7b1bcc099
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e
github.com/ipfs/go-block-format v0.0.2
Expand Down
21 changes: 13 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 h1:6xT9KW8zLC5IlbaIF5Q7JNieBoACT7iW0YTxQHR0in0=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=
github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU=
github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk=
github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ=
github.com/dgraph-io/badger v1.6.0-rc1 h1:JphPpoBZJ3WHha133BGYlQqltSGIhV+VsEID0++nN9A=
github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
Expand All @@ -67,10 +69,13 @@ github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:T
github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0=
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e h1:IOoff6yAZSJ5zHCPY2jzGNwQYQU6ygsRVe/cSnJrY+o=
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg=
github.com/filecoin-project/go-bitfield v0.0.0-20200309034705-8c7ac40bd550 h1:aockulLU8Qjkdj4FQz53WQpNosAIYk8DxRediRLkE5c=
github.com/filecoin-project/go-bitfield v0.0.0-20200309034705-8c7ac40bd550/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw=
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 h1:jamfsxfK0Q9yCMHt8MPWx7Aa/O9k2Lve8eSc6FILYGQ=
github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg=
github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060 h1:/3qjGMn6ukXgZJHsIbuwGL7ipla8DOV3uHZDBJkBYfU=
github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw=
github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY=
github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e h1:gkG/7G+iKy4He+IiQNeQn+nndFznb/vCoOR8iRQsm60=
github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY=
github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8=
github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg=
github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus=
Expand All @@ -89,16 +94,16 @@ github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIi
github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI=
github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b h1:fkRZSPrYpk42PV3/lIXiL0LHetxde7vyYYvSsttQtfg=
github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8=
github.com/filecoin-project/sector-storage v0.0.0-20200508203401-a74812ba12f3 h1:WezmdxkWlnTe9xLzIitUrsvUVmjmWDEEuAe9l8A+Os0=
github.com/filecoin-project/sector-storage v0.0.0-20200508203401-a74812ba12f3/go.mod h1:B+xzopr/oWZJz2hBL5Ekb7Obcum5ntmfbaAUlaaho28=
github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6 h1:NIcubpeasVs++K5EFelMXeURRb8sWCuXQNOSWnvTc14=
github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM=
github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf h1:fbxBG12yrxilPFV1EG2lYqpUyAlRZWkvtqjk2svSeXY=
github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA=
github.com/filecoin-project/specs-actors v0.0.0-20200409043918-e569f4a2f504 h1:mwuAaqxKThl70+7FkGdFKVLdwaQZQ8XmscKdhSBBtnc=
github.com/filecoin-project/specs-actors v0.0.0-20200409043918-e569f4a2f504/go.mod h1:mdJraXq5vMy0+/FqVQIrnNlpQ/Em6zeu06G/ltQ0/lA=
github.com/filecoin-project/specs-actors v0.3.0 h1:QxgAuTrZr5TPqjyprZk0nTYW5o0JWpzbb5v+4UHHvN0=
github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y=
github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102 h1:T3f/zkuvgtgqcXrb0NO3BicuveGOxxUAMPa/Yif2kuE=
github.com/filecoin-project/specs-storage v0.0.0-20200417134612-61b2d91a6102/go.mod h1:xJ1/xl9+8zZeSSSFmDC3Wr6uusCTxyYPI0VeNVSFmPE=
github.com/filecoin-project/specs-actors v0.6.0 h1:IepUsmDGY60QliENVTkBTAkwqGWw9kNbbHOcU/9oiC0=
github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY=
github.com/filecoin-project/specs-storage v0.1.0 h1:PkDgTOT5W5Ao7752onjDl4QSv+sgOVdJbvFjOnD5w94=
github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI=
Expand Down
6 changes: 3 additions & 3 deletions pieceio/pieceio.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewPieceIOWithStore(carIO CarIO, store filestore.FileStore, bs blockstore.B
return &pieceIOWithStore{pieceIO{carIO, bs}, store}
}

func (pio *pieceIO) GeneratePieceCommitment(rt abi.RegisteredProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error) {
func (pio *pieceIO) GeneratePieceCommitment(rt abi.RegisteredSealProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error) {
preparedCar, err := pio.carIO.PrepareCar(context.Background(), pio.bs, payloadCid, selector)
if err != nil {
return cid.Undef, 0, err
Expand Down Expand Up @@ -88,7 +88,7 @@ func (pio *pieceIO) GeneratePieceCommitment(rt abi.RegisteredProof, payloadCid c
return commitment, paddedSize, nil
}

func (pio *pieceIOWithStore) GeneratePieceCommitmentToFile(rt abi.RegisteredProof, payloadCid cid.Cid, selector ipld.Node, userOnNewCarBlocks ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error) {
func (pio *pieceIOWithStore) GeneratePieceCommitmentToFile(rt abi.RegisteredSealProof, payloadCid cid.Cid, selector ipld.Node, userOnNewCarBlocks ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error) {
f, err := pio.store.CreateTemp()
if err != nil {
return cid.Undef, "", 0, err
Expand Down Expand Up @@ -117,7 +117,7 @@ func (pio *pieceIOWithStore) GeneratePieceCommitmentToFile(rt abi.RegisteredProo
return commitment, f.Path(), paddedSize, nil
}

func GeneratePieceCommitment(rt abi.RegisteredProof, rd io.Reader, pieceSize uint64) (cid.Cid, abi.UnpaddedPieceSize, error) {
func GeneratePieceCommitment(rt abi.RegisteredSealProof, rd io.Reader, pieceSize uint64) (cid.Cid, abi.UnpaddedPieceSize, error) {
paddedReader, paddedSize := padreader.New(rd, pieceSize)
commitment, err := ffiwrapper.GeneratePieceCIDFromFile(rt, paddedReader, paddedSize)
if err != nil {
Expand Down
20 changes: 10 additions & 10 deletions pieceio/pieceio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func Test_ThereAndBackAgain(t *testing.T) {
ssb.ExploreIndex(1, ssb.ExploreRecursive(selector.RecursionLimitNone(), ssb.ExploreAll(ssb.ExploreRecursiveEdge()))))
}).Node()

pcid, tmpPath, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
pcid, tmpPath, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.NoError(t, err)
tmpFile, err := store.Open(tmpPath)
require.NoError(t, err)
Expand Down Expand Up @@ -156,7 +156,7 @@ func Test_StoreRestoreMemoryBuffer(t *testing.T) {
ssb.ExploreIndex(1, ssb.ExploreRecursive(selector.RecursionLimitNone(), ssb.ExploreAll(ssb.ExploreRecursiveEdge()))))
}).Node()

commitment, tmpPath, paddedSize, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
commitment, tmpPath, paddedSize, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.NoError(t, err)
tmpFile, err := store.Open(tmpPath)
require.NoError(t, err)
Expand All @@ -175,7 +175,7 @@ func Test_StoreRestoreMemoryBuffer(t *testing.T) {
_, err = tmpFile.Read(buf)
require.NoError(t, err)
buffer := bytes.NewBuffer(buf)
secondCommitment, err := ffiwrapper.GeneratePieceCIDFromFile(abi.RegisteredProof_StackedDRG2KiBPoSt, buffer, paddedSize)
secondCommitment, err := ffiwrapper.GeneratePieceCIDFromFile(abi.RegisteredSealProof_StackedDrg2KiBV1, buffer, paddedSize)
require.NoError(t, err)
require.Equal(t, commitment, secondCommitment)
}
Expand Down Expand Up @@ -221,13 +221,13 @@ func Test_PieceCommitmentEquivalenceMemoryFile(t *testing.T) {
ssb.ExploreIndex(1, ssb.ExploreRecursive(selector.RecursionLimitNone(), ssb.ExploreAll(ssb.ExploreRecursiveEdge()))))
}).Node()

fcommitment, tmpPath, fpaddedSize, ferr := pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
fcommitment, tmpPath, fpaddedSize, ferr := pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
defer func() {
deferErr := store.Delete(tmpPath)
require.NoError(t, deferErr)
}()

mcommitment, mpaddedSize, merr := pio.GeneratePieceCommitment(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
mcommitment, mpaddedSize, merr := pio.GeneratePieceCommitment(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Equal(t, fcommitment, mcommitment)
require.Equal(t, fpaddedSize, mpaddedSize)
require.Equal(t, ferr, merr)
Expand Down Expand Up @@ -272,7 +272,7 @@ func Test_Failures(t *testing.T) {
fsmock := fsmocks.FileStore{}
fsmock.On("CreateTemp").Return(nil, fmt.Errorf("Failed"))
pio := pieceio.NewPieceIOWithStore(nil, &fsmock, sourceBs)
_, _, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
_, _, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Error(t, err)
})
t.Run("write CAR fails", func(t *testing.T) {
Expand All @@ -284,7 +284,7 @@ func Test_Failures(t *testing.T) {
any := mock.Anything
ciomock.On("WriteCar", any, any, any, any, any).Return(fmt.Errorf("failed to write car"))
pio := pieceio.NewPieceIOWithStore(&ciomock, store, sourceBs)
_, _, _, err = pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
_, _, _, err = pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Error(t, err)
})
t.Run("prepare CAR fails", func(t *testing.T) {
Expand All @@ -293,7 +293,7 @@ func Test_Failures(t *testing.T) {
any := mock.Anything
ciomock.On("PrepareCar", any, any, any, any).Return(nil, fmt.Errorf("failed to prepare car"))
pio := pieceio.NewPieceIO(&ciomock, sourceBs)
_, _, err := pio.GeneratePieceCommitment(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
_, _, err := pio.GeneratePieceCommitment(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Error(t, err)
})
t.Run("PreparedCard dump operation fails", func(t *testing.T) {
Expand All @@ -304,7 +304,7 @@ func Test_Failures(t *testing.T) {
preparedCarMock.On("Size").Return(uint64(1000))
preparedCarMock.On("Dump", any).Return(fmt.Errorf("failed to write car"))
pio := pieceio.NewPieceIO(&ciomock, sourceBs)
_, _, err := pio.GeneratePieceCommitment(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
_, _, err := pio.GeneratePieceCommitment(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Error(t, err)
})
t.Run("seek fails", func(t *testing.T) {
Expand All @@ -331,7 +331,7 @@ func Test_Failures(t *testing.T) {
mockfile.On("Seek", mock.Anything, mock.Anything).Return(int64(0), fmt.Errorf("seek failed"))

pio := pieceio.NewPieceIOWithStore(cio, &fsmock, sourceBs)
_, _, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredProof_StackedDRG2KiBPoSt, nd3.Cid(), node)
_, _, _, err := pio.GeneratePieceCommitmentToFile(abi.RegisteredSealProof_StackedDrg2KiBV1, nd3.Cid(), node)
require.Error(t, err)
})
}
4 changes: 2 additions & 2 deletions pieceio/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ type ReadStore interface {

// PieceIO converts between payloads and pieces
type PieceIO interface {
GeneratePieceCommitment(rt abi.RegisteredProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error)
GeneratePieceCommitment(rt abi.RegisteredSealProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error)
ReadPiece(r io.Reader) (cid.Cid, error)
}

type PieceIOWithStore interface {
PieceIO
GeneratePieceCommitmentToFile(rt abi.RegisteredProof, payloadCid cid.Cid, selector ipld.Node, userOnNewCarBlocks ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error)
GeneratePieceCommitmentToFile(rt abi.RegisteredSealProof, payloadCid cid.Cid, selector ipld.Node, userOnNewCarBlocks ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error)
}
4 changes: 2 additions & 2 deletions retrievalmarket/storage_retrieval_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func newStorageHarness(ctx context.Context, t *testing.T) *storageHarness {
dt2,
providerNode,
providerAddr,
abi.RegisteredProof_StackedDRG2KiBPoSt,
abi.RegisteredSealProof_StackedDrg2KiBV1,
storedAsk,
)
require.NoError(t, err)
Expand Down Expand Up @@ -285,7 +285,7 @@ func (sh *storageHarness) ProposeStorageDeal(t *testing.T, dataRef *storagemarke
sh.Epoch+20100,
big.NewInt(1),
big.NewInt(0),
abi.RegisteredProof_StackedDRG2KiBPoSt,
abi.RegisteredSealProof_StackedDrg2KiBV1,
)
assert.NoError(t, err)
return result
Expand Down
2 changes: 1 addition & 1 deletion storagemarket/impl/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (c *Client) ProposeStorageDeal(
endEpoch abi.ChainEpoch,
price abi.TokenAmount,
collateral abi.TokenAmount,
rt abi.RegisteredProof,
rt abi.RegisteredSealProof,
) (*storagemarket.ProposeStorageDealResult, error) {
commP, pieceSize, err := clientutils.CommP(ctx, c.pio, rt, data)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion storagemarket/impl/clientutils/clientutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

// CommP calculates the commP for a given dataref
func CommP(ctx context.Context, pieceIO pieceio.PieceIO, rt abi.RegisteredProof, data *storagemarket.DataRef) (cid.Cid, abi.UnpaddedPieceSize, error) {
func CommP(ctx context.Context, pieceIO pieceio.PieceIO, rt abi.RegisteredSealProof, data *storagemarket.DataRef) (cid.Cid, abi.UnpaddedPieceSize, error) {
if data.PieceCid != nil {
return *data.PieceCid, data.PieceSize, nil
}
Expand Down
6 changes: 3 additions & 3 deletions storagemarket/impl/clientutils/clientutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

func TestCommP(t *testing.T) {
ctx := context.Background()
proofType := abi.RegisteredProof_StackedDRG2KiBPoSt
proofType := abi.RegisteredSealProof_StackedDrg2KiBV1
t.Run("when PieceCID is present on data ref", func(t *testing.T) {
pieceCid := &shared_testutil.GenerateCids(1)[0]
pieceSize := abi.UnpaddedPieceSize(rand.Uint64())
Expand Down Expand Up @@ -108,15 +108,15 @@ func TestVerifyResponse(t *testing.T) {

type testPieceIO struct {
t *testing.T
expectedRt abi.RegisteredProof
expectedRt abi.RegisteredSealProof
expectedPayloadCid cid.Cid
expectedSelector ipld.Node
pieceCID cid.Cid
pieceSize abi.UnpaddedPieceSize
err error
}

func (t *testPieceIO) GeneratePieceCommitment(rt abi.RegisteredProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error) {
func (t *testPieceIO) GeneratePieceCommitment(rt abi.RegisteredSealProof, payloadCid cid.Cid, selector ipld.Node) (cid.Cid, abi.UnpaddedPieceSize, error) {
require.Equal(t.t, rt, t.expectedRt)
require.Equal(t.t, payloadCid, t.expectedPayloadCid)
require.Equal(t.t, selector, t.expectedSelector)
Expand Down
4 changes: 2 additions & 2 deletions storagemarket/impl/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type StoredAsk interface {
type Provider struct {
net network.StorageMarketNetwork

proofType abi.RegisteredProof
proofType abi.RegisteredSealProof

spn storagemarket.StorageProviderNode
fs filestore.FileStore
Expand Down Expand Up @@ -105,7 +105,7 @@ func NewProvider(net network.StorageMarketNetwork,
dataTransfer datatransfer.Manager,
spn storagemarket.StorageProviderNode,
minerAddress address.Address,
rt abi.RegisteredProof,
rt abi.RegisteredSealProof,
storedAsk StoredAsk,
options ...StorageProviderOption,
) (storagemarket.StorageProvider, error) {
Expand Down
4 changes: 2 additions & 2 deletions storagemarket/impl/providerutils/providerutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ func SignMinerData(ctx context.Context, data interface{}, address address.Addres
}

// CommPGenerator is a commP generating function that writes to a file
type CommPGenerator func(abi.RegisteredProof, cid.Cid, ipld.Node, ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error)
type CommPGenerator func(abi.RegisteredSealProof, cid.Cid, ipld.Node, ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error)

// GeneratePieceCommitmentWithMetadata generates a piece commitment along with block metadata
func GeneratePieceCommitmentWithMetadata(
fileStore filestore.FileStore,
commPGenerator CommPGenerator,
proofType abi.RegisteredProof,
proofType abi.RegisteredSealProof,
payloadCid cid.Cid,
selector ipld.Node) (cid.Cid, filestore.Path, filestore.Path, error) {
metadataFile, err := fileStore.CreateTemp()
Expand Down
4 changes: 2 additions & 2 deletions storagemarket/impl/providerutils/providerutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestCommPGenerationWithMetadata(t *testing.T) {
payloadCid := shared_testutil.GenerateCids(1)[0]
ssb := builder.NewSelectorSpecBuilder(basicnode.Style.Any)
selector := ssb.ExploreAll(ssb.Matcher()).Node()
proofType := abi.RegisteredProof_StackedDRG2KiBPoSt
proofType := abi.RegisteredSealProof_StackedDrg2KiBV1
pieceCid := shared_testutil.GenerateCids(1)[0]
piecePath := filestore.Path("apiece.jpg")
pieceSize := abi.UnpaddedPieceSize(rand.Uint64())
Expand Down Expand Up @@ -183,7 +183,7 @@ type fakeCommPGenerator struct {
err error
}

func (fcp *fakeCommPGenerator) GenerateCommPToFile(abi.RegisteredProof, cid.Cid, ipld.Node, ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error) {
func (fcp *fakeCommPGenerator) GenerateCommPToFile(abi.RegisteredSealProof, cid.Cid, ipld.Node, ...car.OnNewCarBlockFunc) (cid.Cid, filestore.Path, abi.UnpaddedPieceSize, error) {
return fcp.pieceCid, fcp.path, fcp.size, fcp.err
}

Expand Down
6 changes: 3 additions & 3 deletions storagemarket/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func TestMakeDealOffline(t *testing.T) {
err := cario.NewCarIO().WriteCar(ctx, h.TestData.Bs1, h.PayloadCid, shared.AllSelector(), carBuf)
require.NoError(t, err)

commP, size, err := pieceio.GeneratePieceCommitment(abi.RegisteredProof_StackedDRG2KiBPoSt, carBuf, uint64(carBuf.Len()))
commP, size, err := pieceio.GeneratePieceCommitment(abi.RegisteredSealProof_StackedDrg2KiBV1, carBuf, uint64(carBuf.Len()))
assert.NoError(t, err)

dataRef := &storagemarket.DataRef{
Expand Down Expand Up @@ -372,7 +372,7 @@ func newHarnessWithTestData(t *testing.T, ctx context.Context, td *shared_testut
dt2,
providerNode,
providerAddr,
abi.RegisteredProof_StackedDRG2KiBPoSt,
abi.RegisteredSealProof_StackedDrg2KiBV1,
storedAsk,
)
assert.NoError(t, err)
Expand Down Expand Up @@ -418,7 +418,7 @@ func (h *harness) ProposeStorageDeal(t *testing.T, dataRef *storagemarket.DataRe
h.Epoch+20100,
big.NewInt(1),
big.NewInt(0),
abi.RegisteredProof_StackedDRG2KiBPoSt,
abi.RegisteredSealProof_StackedDrg2KiBV1,
)
assert.NoError(t, err)
return result
Expand Down
Loading