diff --git a/CHANGELOG.md b/CHANGELOG.md index 65576d224..a03fca1c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Lotus changelog +# 1.18.2 / 2022-12-10 + +This is an OPTIONAL patch release that fixes a recently reported bug, where the miner process crashes due to a panic during an AddPiece process. More details can be found [here](https://github.com/filecoin-project/lotus/pull/9822). + + # 1.18.1 / 2022-11-28 This is a small OPTIONAL patch release for the mandatory v1.18.0 release that supports the Filecoin nv17 Shark Upgrade. diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index 1322bebc3..491068bf6 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 1b244cf48..288609431 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 bdc685324..16cde18aa 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 bdf5410ca..464f445a4 100644 Binary files a/build/openrpc/worker.json.gz and b/build/openrpc/worker.json.gz differ diff --git a/build/version.go b/build/version.go index e1a967422..a7508e1b3 100644 --- a/build/version.go +++ b/build/version.go @@ -37,7 +37,7 @@ func BuildTypeString() string { } // BuildVersion is the local build version -const BuildVersion = "1.18.1" +const BuildVersion = "1.18.2" func UserVersion() string { if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" { diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index 25a9ae29d..7e5d01508 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -7,7 +7,7 @@ USAGE: lotus-miner [global options] command [command options] [arguments...] VERSION: - 1.18.1 + 1.18.2 COMMANDS: init Initialize a lotus miner repo diff --git a/documentation/en/cli-lotus-worker.md b/documentation/en/cli-lotus-worker.md index 98bbf713d..277eb8597 100644 --- a/documentation/en/cli-lotus-worker.md +++ b/documentation/en/cli-lotus-worker.md @@ -7,7 +7,7 @@ USAGE: lotus-worker [global options] command [command options] [arguments...] VERSION: - 1.18.1 + 1.18.2 COMMANDS: run Start lotus worker diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index 8d2a01bc6..4c1709bb3 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -7,7 +7,7 @@ USAGE: lotus [global options] command [command options] [arguments...] VERSION: - 1.18.1 + 1.18.2 COMMANDS: daemon Start a lotus daemon process diff --git a/storage/pipeline/input.go b/storage/pipeline/input.go index 631e84455..7b5b8c600 100644 --- a/storage/pipeline/input.go +++ b/storage/pipeline/input.go @@ -443,6 +443,9 @@ func (m *Sealing) updateInput(ctx context.Context, sp abi.RegisteredSealProof) e if err != nil { return 0, big.Zero(), err } + if onChainInfo == nil { + return 0, big.Zero(), xerrors.Errorf("sector info for sector %d not found", sn) + } memo[sn] = struct { e abi.ChainEpoch p abi.TokenAmount @@ -488,10 +491,6 @@ func (m *Sealing) updateInput(ctx context.Context, sp abi.RegisteredSealProof) e continue } if !ok { - exp, _, _ := getExpirationCached(sector.number) - - // todo move this log into checkDealAssignable, make more detailed about the reason - log.Debugf("CC update sector %d cannot fit deal, expiration %d before deal end epoch %d", id, exp, piece.deal.DealProposal.EndEpoch) continue } diff --git a/storage/pipeline/sealing.go b/storage/pipeline/sealing.go index 6caa9ddc6..0fadb6131 100644 --- a/storage/pipeline/sealing.go +++ b/storage/pipeline/sealing.go @@ -142,8 +142,21 @@ type openSector struct { } func (o *openSector) checkDealAssignable(piece *pendingPiece, expF expFn) (bool, error) { + log := log.With( + "sector", o.number, + + "deal", piece.deal.DealID, + "dealEnd", piece.deal.DealProposal.EndEpoch, + "dealStart", piece.deal.DealProposal.StartEpoch, + "dealClaimEnd", piece.claimTerms.claimTermEnd, + + "lastAssignedDealEnd", o.lastDealEnd, + "update", o.ccUpdate, + ) + // if there are deals assigned, check that no assigned deal expires after termMax if o.lastDealEnd > piece.claimTerms.claimTermEnd { + log.Debugw("deal not assignable to sector", "reason", "term end beyond last assigned deal end") return false, nil } @@ -153,15 +166,26 @@ func (o *openSector) checkDealAssignable(piece *pendingPiece, expF expFn) (bool, } sectorExpiration, _, err := expF(o.number) if err != nil { + log.Debugw("deal not assignable to sector", "reason", "error getting sector expiranion", "error", err) return false, err } + log = log.With( + "sectorExpiration", sectorExpiration, + ) + // check that in case of upgrade sector, it's expiration isn't above deals claim TermMax if sectorExpiration > piece.claimTerms.claimTermEnd { + log.Debugw("deal not assignable to sector", "reason", "term end beyond sector expiration") return false, nil } - return sectorExpiration >= piece.deal.DealProposal.EndEpoch, nil + if sectorExpiration < piece.deal.DealProposal.EndEpoch { + log.Debugw("deal not assignable to sector", "reason", "sector expiration less than deal expiration") + return false, nil + } + + return true, nil } type pieceAcceptResp struct {