Skip to content

Commit

Permalink
Merge pull request #9833 from filecoin-project/release/v1.18.2
Browse files Browse the repository at this point in the history
build: release: v1.18.2
  • Loading branch information
jennijuju authored Dec 11, 2022
2 parents e68b8e9 + 2cbc29e commit 9416ceb
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/gateway.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
Binary file modified build/openrpc/worker.json.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/cli-lotus-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/cli-lotus-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/cli-lotus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions storage/pipeline/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}

Expand Down
26 changes: 25 additions & 1 deletion storage/pipeline/sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

if sectorExpiration < piece.deal.DealProposal.EndEpoch {
log.Debugw("deal not assignable to sector", "reason", "sector expiration less than deal expiration")
return false, nil
}

return sectorExpiration >= piece.deal.DealProposal.EndEpoch, nil
return true, nil
}

type pieceAcceptResp struct {
Expand Down

0 comments on commit 9416ceb

Please sign in to comment.