Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update to go-fil-markets v1.23.0 #634

Merged
merged 1 commit into from
Jul 6, 2022
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
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ require (
github.com/filecoin-project/go-data-transfer v1.15.2
github.com/filecoin-project/go-fil-commcid v0.1.0
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0
github.com/filecoin-project/go-fil-markets v1.22.2
github.com/filecoin-project/go-fil-markets v1.23.0
github.com/filecoin-project/go-jsonrpc v0.1.5
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.4
github.com/filecoin-project/go-state-types v0.1.10
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/index-provider v0.8.1
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220630222754-f5225d7b25c4
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220706101903-9bcefce07b7c
github.com/filecoin-project/specs-actors v0.9.15
github.com/filecoin-project/specs-actors/v8 v8.0.1
github.com/filecoin-project/specs-storage v0.4.1
Expand Down Expand Up @@ -62,8 +62,8 @@ require (
github.com/ipfs/go-merkledag v0.6.0
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-unixfs v0.3.1
github.com/ipld/go-car v0.3.4-0.20220630140142-8171360c2218
github.com/ipld/go-car/v2 v2.2.0
github.com/ipld/go-car v0.4.1-0.20220706093353-3d969443294c
github.com/ipld/go-car/v2 v2.4.1-0.20220706093353-3d969443294c
github.com/ipld/go-ipld-prime v0.17.0
github.com/ipld/go-ipld-selector-text-lite v0.0.1
github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c
Expand All @@ -76,7 +76,7 @@ require (
github.com/libp2p/go-libp2p-http v0.2.1
github.com/libp2p/go-libp2p-kad-dht v0.15.0
github.com/libp2p/go-libp2p-peerstore v0.7.0
github.com/libp2p/go-libp2p-pubsub v0.7.0
github.com/libp2p/go-libp2p-pubsub v0.7.1
github.com/libp2p/go-libp2p-record v0.1.3
github.com/libp2p/go-libp2p-resource-manager v0.3.0
github.com/mattn/go-sqlite3 v1.14.10
Expand Down
23 changes: 12 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88Oq
github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8=
github.com/filecoin-project/go-fil-markets v1.22.2 h1:8E2rQ9yo0ycZXJ/noIqPqkwjkyidUvr6O0MUYtUy5cc=
github.com/filecoin-project/go-fil-markets v1.22.2/go.mod h1:nuNgE+5tXuV3FVOKOVgcClBjH3UNE0gpgRYWCQEnvRM=
github.com/filecoin-project/go-fil-markets v1.23.0 h1:gF138KL5QDAoDOJJqrUbFK9jwS+Sjq2P3qMSdHFtkA8=
github.com/filecoin-project/go-fil-markets v1.23.0/go.mod h1:bBa1d5mnlgwXPnH+MdqpCUsI+gxyrPUPSRePQDY36Hw=
github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM=
github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24=
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM=
Expand Down Expand Up @@ -426,8 +426,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5
github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8=
github.com/filecoin-project/index-provider v0.8.1 h1:ggoBWvMSWR91HZQCWfv8SZjoTGNyJBwNMLuN9bJZrbU=
github.com/filecoin-project/index-provider v0.8.1/go.mod h1:c/Ym5HtWPp9NQgNc9dgSBMpSNsZ/DE9FEi9qVubl5RM=
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220630222754-f5225d7b25c4 h1:eTN81nkDbpiZMThtwoLq/MZge7dwkD6m+/6/zzJVT5k=
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220630222754-f5225d7b25c4/go.mod h1:q8OUXwhdN2tHShDP6p1yWvUQ3kYrKLtRs6cM+ujmTLc=
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220706101903-9bcefce07b7c h1:IwZSkh7WUaklkmm6XD60Sl9S9xdUVRCpuHBxCDwT4hs=
github.com/filecoin-project/lotus v1.17.0-rc1.0.20220706101903-9bcefce07b7c/go.mod h1:jkDORkbxuvGjiztnefJf9tMHfKOwAC/Tn3FtWstPAMA=
github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM=
github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg=
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
Expand Down Expand Up @@ -997,12 +997,13 @@ github.com/ipfs/tar-utils v0.0.2/go.mod h1:4qlnRWgTVljIMhSG2SqRYn66NT+3wrv/kZt9V
github.com/ipld/edelweiss v0.1.2/go.mod h1:14NnBVHgrPO8cqDnKg7vc69LGI0aCAcax6mj21+99ec=
github.com/ipld/go-car v0.1.0/go.mod h1:RCWzaUh2i4mOEkB3W45Vc+9jnS/M6Qay5ooytiBHl3g=
github.com/ipld/go-car v0.3.2/go.mod h1:WEjynkVt04dr0GwJhry0KlaTeSDEiEYyMPOxDBQ17KE=
github.com/ipld/go-car v0.3.3/go.mod h1:/wkKF4908ULT4dFIFIUZYcfjAnj+KFnJvlh8Hsz1FbQ=
github.com/ipld/go-car v0.3.4-0.20220630140142-8171360c2218 h1:N2BGgZdt6s0E/KjFgejG+57OeNS8Da+RLQd482F39MA=
github.com/ipld/go-car v0.3.4-0.20220630140142-8171360c2218/go.mod h1:Uslcn4O9cBKK9wqHm/cLTFacg6RAPv6LZx2mxd2Ypl4=
github.com/ipld/go-car v0.4.0/go.mod h1:Uslcn4O9cBKK9wqHm/cLTFacg6RAPv6LZx2mxd2Ypl4=
github.com/ipld/go-car v0.4.1-0.20220706093353-3d969443294c h1:VP/ZM6OkD7uFBsJDB8W2/eOiLWPPGlzjzJC3uHdNvj4=
github.com/ipld/go-car v0.4.1-0.20220706093353-3d969443294c/go.mod h1:Uslcn4O9cBKK9wqHm/cLTFacg6RAPv6LZx2mxd2Ypl4=
github.com/ipld/go-car/v2 v2.1.1/go.mod h1:+2Yvf0Z3wzkv7NeI69i8tuZ+ft7jyjPYIWZzeVNeFcI=
github.com/ipld/go-car/v2 v2.2.0 h1:CxNhm5zBijR/68VLP+m40Rdq3s6l61+j4SVCOD3Wgl0=
github.com/ipld/go-car/v2 v2.2.0/go.mod h1:zjpRf0Jew9gHqSvjsKVyoq9OY9SWoEKdYCQUKVaaPT0=
github.com/ipld/go-car/v2 v2.4.0/go.mod h1:zjpRf0Jew9gHqSvjsKVyoq9OY9SWoEKdYCQUKVaaPT0=
github.com/ipld/go-car/v2 v2.4.1-0.20220706093353-3d969443294c h1:taGcTKh0NNSX7MPI4pjEfxUUXsT/r7RRoqDrSGQVTO8=
github.com/ipld/go-car/v2 v2.4.1-0.20220706093353-3d969443294c/go.mod h1:sDHqspWMwG6cC0lrid3Lq2xtIR4R6iy6ymCNT0drhaI=
github.com/ipld/go-codec-dagpb v1.2.0/go.mod h1:6nBN7X7h8EOsEejZGqC7tej5drsdBAXbMHyBT+Fne5s=
github.com/ipld/go-codec-dagpb v1.3.0/go.mod h1:ga4JTU3abYApDC3pZ00BC2RSvC3qfBb9MSJkMLSwnhA=
github.com/ipld/go-codec-dagpb v1.3.1/go.mod h1:ErNNglIi5KMur/MfFE/svtgQthzVvf+43MrzLbpcIZY=
Expand All @@ -1017,7 +1018,6 @@ github.com/ipld/go-ipld-prime v0.12.3/go.mod h1:PaeLYq8k6dJLmDUSLrzkEpoGV4PEfe/1
github.com/ipld/go-ipld-prime v0.14.0/go.mod h1:9ASQLwUFLptCov6lIYc70GRB4V7UTyLD0IJtrDJe6ZM=
github.com/ipld/go-ipld-prime v0.14.1/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0=
github.com/ipld/go-ipld-prime v0.14.2/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0=
github.com/ipld/go-ipld-prime v0.14.3-0.20211207234443-319145880958/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0=
github.com/ipld/go-ipld-prime v0.14.4-0.20211217152141-008fd70fc96f/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0=
github.com/ipld/go-ipld-prime v0.16.0/go.mod h1:axSCuOCBPqrH+gvXr2w9uAOulJqBPhHPT2PjoiiU1qA=
github.com/ipld/go-ipld-prime v0.17.0 h1:+U2peiA3aQsE7mrXjD2nYZaZrCcakoz2Wge8K42Ld8g=
Expand Down Expand Up @@ -1329,8 +1329,9 @@ github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1
github.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk=
github.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q=
github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg=
github.com/libp2p/go-libp2p-pubsub v0.7.0 h1:Fd9198JVc3pCsKuzd37TclzM0QcHA+uDyoiG2pvT7s4=
github.com/libp2p/go-libp2p-pubsub v0.7.0/go.mod h1:EuyBJFtF8qF67IEA98biwK8Xnw5MNJpJ/Z+8iWCMFwc=
github.com/libp2p/go-libp2p-pubsub v0.7.1 h1:e2CPBP5uxvDkE0FiS0obZGZPzt+xuBOc6PpG+50pIAo=
github.com/libp2p/go-libp2p-pubsub v0.7.1/go.mod h1:EuyBJFtF8qF67IEA98biwK8Xnw5MNJpJ/Z+8iWCMFwc=
github.com/libp2p/go-libp2p-pubsub-router v0.5.0/go.mod h1:TRJKskSem3C0aSb3CmRgPwq6IleVFzds6hS09fmZbGM=
github.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU=
github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA=
Expand Down
15 changes: 13 additions & 2 deletions storagemarket/deal_execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ func GenerateCommP(filepath string) (cidAndSize *writer.DataCIDSize, finalErr er

// dump the CARv1 payload of the CARv2 file to the Commp Writer and get back the CommP.
w := &writer.Writer{}
written, err := io.Copy(w, rd.DataReader())
r, err := rd.DataReader()
if err != nil {
return nil, fmt.Errorf("failed to get reader over CAR file data: %w", err)
}
written, err := io.Copy(w, r)
if err != nil {
return nil, fmt.Errorf("failed to write to CommP writer: %w", err)
}
Expand Down Expand Up @@ -587,7 +591,14 @@ func (p *Provider) addPiece(ctx context.Context, pub event.Emitter, deal *types.

// Inflate the deal size so that it exactly fills a piece
proposal := deal.ClientDealProposal.Proposal
paddedReader, err := padreader.NewInflator(v2r.DataReader(), size, proposal.PieceSize.Unpadded())
r, err := v2r.DataReader()
if err != nil {
return &dealMakingError{
retry: types.DealRetryFatal,
error: fmt.Errorf("failed to get data reader over CAR file: %w", err),
}
}
paddedReader, err := padreader.NewInflator(r, size, proposal.PieceSize.Unpadded())
if err != nil {
return &dealMakingError{
retry: types.DealRetryFatal,
Expand Down
4 changes: 3 additions & 1 deletion storagemarket/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,9 @@ func (h *ProviderHarness) AssertSealedContents(t *testing.T, carV2FilePath strin
require.NoError(t, err)
defer cr.Close()

actual, err := ioutil.ReadAll(cr.DataReader())
r, err := cr.DataReader()
require.NoError(t, err)
actual, err := ioutil.ReadAll(r)
require.NoError(t, err)

// the read-bytes also contains extra zeros for the padding magic, so just match without the padding bytes.
Expand Down