diff --git a/CHANGELOG.md b/CHANGELOG.md index b687cfb7c..a8b875560 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ This is the third release candidates of v1.15.0, detailed changelog will be updated later. This RC drops the libp2p upgrade that was included in the earlier 2 RCs. -- github.com/filecoin-project/lotus: +- github.com/filecoin-project/lotus: - bump the version to v1.15.0-rc1 - chore: build: v1.14.0 -> master ([filecoin-project/lotus#8053](https://github.com/filecoin-project/lotus/pull/8053)) - FinalizeReplicaUpdate ([filecoin-project/lotus#8018](https://github.com/filecoin-project/lotus/pull/8018)) @@ -173,6 +173,16 @@ Contributors | Rob Quist | 1 | +2/-2 | 1 | | shotcollin | 1 | +1/-1 | 1 | +# 1.14.4 / 2022-03-03 + +This is a *highly recommended* optional release for storage providers that are doing snap deals. This fix the bug +that causes some snap deal sectors are stuck in `FinalizeReplicaUpdate`. In addition, SPs should be able to force +update sectors status without getting blocked by `normal shutdown of state machine`. + +# v1.14.3 / 2022-02-28 + +This is an **optional** release, that includes a fix to properly register the `--really-do-it` flag for abort-upgrade. + # 1.14.2 / 2022-02-24 This is an **optional** release of lotus, that's had a couple more improvements w.r.t Snap experience for storage providers in preparation of the[upcoming OhSnap upgrade](https://github.com/filecoin-project/community/discussions/74?sort=new#discussioncomment-1922550). diff --git a/extern/storage-sealing/fsm.go b/extern/storage-sealing/fsm.go index 8678a0fe9..2c50d1885 100644 --- a/extern/storage-sealing/fsm.go +++ b/extern/storage-sealing/fsm.go @@ -19,7 +19,13 @@ import ( func (m *Sealing) Plan(events []statemachine.Event, user interface{}) (interface{}, uint64, error) { next, processed, err := m.plan(events, user.(*SectorInfo)) if err != nil || next == nil { - return nil, processed, err + l := Log{ + Timestamp: uint64(time.Now().Unix()), + Message: fmt.Sprintf("state machine error: %s", err), + Kind: fmt.Sprintf("error;%T", err), + } + user.(*SectorInfo).logAppend(l) + return nil, processed, nil } return func(ctx statemachine.Context, si SectorInfo) error { @@ -313,6 +319,21 @@ var fsmPlanners = map[SectorState]func(events []statemachine.Event, state *Secto FailedUnrecoverable: final, } +func (state *SectorInfo) logAppend(l Log) { + if len(state.Log) > 8000 { + log.Warnw("truncating sector log", "sector", state.SectorNumber) + state.Log[2000] = Log{ + Timestamp: uint64(time.Now().Unix()), + Message: "truncating log (above 8000 entries)", + Kind: fmt.Sprintf("truncate"), + } + + state.Log = append(state.Log[:2000], state.Log[6000:]...) + } + + state.Log = append(state.Log, l) +} + func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) { for _, event := range events { log.Debugw("sector event", "sector", state.SectorNumber, "type", fmt.Sprintf("%T", event.User), "event", event.User) @@ -341,18 +362,7 @@ func (m *Sealing) logEvents(events []statemachine.Event, state *SectorInfo) { l.Trace = fmt.Sprintf("%+v", err) } - if len(state.Log) > 8000 { - log.Warnw("truncating sector log", "sector", state.SectorNumber) - state.Log[2000] = Log{ - Timestamp: uint64(time.Now().Unix()), - Message: "truncating log (above 8000 entries)", - Kind: fmt.Sprintf("truncate"), - } - - state.Log = append(state.Log[:2000], state.Log[6000:]...) - } - - state.Log = append(state.Log, l) + state.logAppend(l) } }