diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index 942fb190a..d71446f65 100644 Binary files a/build/openrpc/full.json.gz and b/build/openrpc/full.json.gz differ diff --git a/build/openrpc/gateway.json.gz b/build/openrpc/gateway.json.gz index b3db3736c..a12107967 100644 Binary files a/build/openrpc/gateway.json.gz and b/build/openrpc/gateway.json.gz differ diff --git a/build/openrpc/miner.json.gz b/build/openrpc/miner.json.gz index f2bd95d2f..0138f28c1 100644 Binary files a/build/openrpc/miner.json.gz and b/build/openrpc/miner.json.gz differ diff --git a/build/openrpc/worker.json.gz b/build/openrpc/worker.json.gz index f60f1fc3a..90167b6e0 100644 Binary files a/build/openrpc/worker.json.gz and b/build/openrpc/worker.json.gz differ diff --git a/documentation/en/api-v0-methods-miner.md b/documentation/en/api-v0-methods-miner.md index c473f1904..848600bc6 100644 --- a/documentation/en/api-v0-methods-miner.md +++ b/documentation/en/api-v0-methods-miner.md @@ -3242,10 +3242,7 @@ Inputs: 5432 ], "Expiration": 10101, - "ReplaceCapacity": true, - "ReplaceSectorDeadline": 42, - "ReplaceSectorPartition": 42, - "ReplaceSectorNumber": 9 + "UnsealedCid": null }, "PreCommitDeposit": "0", "PreCommitMessage": null, diff --git a/itests/sector_import_full_test.go b/itests/sector_import_full_test.go index 761bee3a5..00a29b82b 100644 --- a/itests/sector_import_full_test.go +++ b/itests/sector_import_full_test.go @@ -259,7 +259,7 @@ func TestSectorImport(t *testing.T) { return } - remoteCommit1(s)(w, r) + testRemoteCommit1(s, m)(w, r) } } }))) diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 3d90afd0b..7bd739f99 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -797,7 +797,7 @@ This parameter is ONLY applicable if the retrieval pricing policy strategy has b Comment: ``, }, { - Num: "AllowSectorDownload", + Num: "AllowSectorDownload", Type: "bool", Comment: ``, diff --git a/storage/pipeline/fsm.go b/storage/pipeline/fsm.go index 264a6ca49..46c0fd9b5 100644 --- a/storage/pipeline/fsm.go +++ b/storage/pipeline/fsm.go @@ -855,7 +855,7 @@ func maybeNotifyRemoteDone(success bool, state string) func(*SectorInfo) { return } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck if resp.StatusCode != http.StatusOK { log.Errorf("remote done notification received non-200 http response %s", resp.Status) diff --git a/storage/pipeline/states_sealing.go b/storage/pipeline/states_sealing.go index 9b815053a..b40a9bf45 100644 --- a/storage/pipeline/states_sealing.go +++ b/storage/pipeline/states_sealing.go @@ -609,7 +609,7 @@ func (m *Sealing) handleCommitting(ctx statemachine.Context, sector SectorInfo) return ctx.Send(SectorRemoteCommit1Failed{xerrors.Errorf("requesting remote commit1: %w", err)}) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck if resp.StatusCode != http.StatusOK { return ctx.Send(SectorRemoteCommit1Failed{xerrors.Errorf("remote commit1 received non-200 http response %s", resp.Status)}) @@ -655,7 +655,7 @@ func (m *Sealing) handleCommitting(ctx statemachine.Context, sector SectorInfo) return ctx.Send(SectorRemoteCommit2Failed{xerrors.Errorf("requesting remote commit2: %w", err)}) } - defer resp.Body.Close() + defer resp.Body.Close() //nolint:errcheck if resp.StatusCode != http.StatusOK { return ctx.Send(SectorRemoteCommit2Failed{xerrors.Errorf("remote commit2 received non-200 http response %s", resp.Status)}) diff --git a/storage/sealer/tarutil/systar.go b/storage/sealer/tarutil/systar.go index f7437d1f2..309cc882a 100644 --- a/storage/sealer/tarutil/systar.go +++ b/storage/sealer/tarutil/systar.go @@ -102,7 +102,9 @@ func ExtractTar(body io.Reader, dir string, buf []byte) (int64, error) { return read, xerrors.Errorf("tar file %#v is bigger than expected: %d > %d", header.Name, header.Size, sz) } - r, err := io.CopyBuffer(f, tr, buf) + ltr := io.LimitReader(tr, header.Size) + + r, err := io.CopyBuffer(f, ltr, buf) read += r if err != nil { return read, err