diff --git a/storage/pipeline/cbor_gen.go b/storage/pipeline/cbor_gen.go index fe7fa2d53..308508ce7 100644 --- a/storage/pipeline/cbor_gen.go +++ b/storage/pipeline/cbor_gen.go @@ -13,7 +13,6 @@ import ( xerrors "golang.org/x/xerrors" abi "github.com/filecoin-project/go-state-types/abi" - miner "github.com/filecoin-project/go-state-types/builtin/v9/miner" api "github.com/filecoin-project/lotus/api" ) @@ -154,7 +153,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { cw := cbg.NewCborWriter(w) - if _, err := cw.Write([]byte{184, 32}); err != nil { + if _, err := cw.Write([]byte{184, 31}); err != nil { return err } @@ -404,22 +403,6 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } - // t.PreCommitInfo (miner.SectorPreCommitInfo) (struct) - if len("PreCommitInfo") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommitInfo\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitInfo"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("PreCommitInfo")); err != nil { - return err - } - - if err := t.PreCommitInfo.MarshalCBOR(cw); err != nil { - return err - } - // t.PreCommitDeposit (big.Int) (struct) if len("PreCommitDeposit") > cbg.MaxLength { return xerrors.Errorf("Value in field \"PreCommitDeposit\" was too long") @@ -1128,26 +1111,6 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { if _, err := io.ReadFull(cr, t.Proof[:]); err != nil { return err } - // t.PreCommitInfo (miner.SectorPreCommitInfo) (struct) - case "PreCommitInfo": - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.PreCommitInfo = new(miner.SectorPreCommitInfo) - if err := t.PreCommitInfo.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PreCommitInfo pointer: %w", err) - } - } - - } // t.PreCommitDeposit (big.Int) (struct) case "PreCommitDeposit": diff --git a/storage/pipeline/fsm_events.go b/storage/pipeline/fsm_events.go index 8ddd529a6..4d41f9070 100644 --- a/storage/pipeline/fsm_events.go +++ b/storage/pipeline/fsm_events.go @@ -205,7 +205,6 @@ type SectorPreCommitted struct { func (evt SectorPreCommitted) apply(state *SectorInfo) { state.PreCommitMessage = &evt.Message state.PreCommitDeposit = evt.PreCommitDeposit - state.PreCommitInfo = &evt.PreCommitInfo } type SectorSeedReady struct { diff --git a/storage/pipeline/states_failed.go b/storage/pipeline/states_failed.go index 38f030333..09e090bc8 100644 --- a/storage/pipeline/states_failed.go +++ b/storage/pipeline/states_failed.go @@ -391,11 +391,6 @@ func (m *Sealing) handleDealsExpired(ctx statemachine.Context, sector SectorInfo return xerrors.Errorf("sector is committed on-chain, but we're in DealsExpired") } - if sector.PreCommitInfo == nil { - // TODO: Create a separate state which will remove those pieces, and go back to PC1 - log.Errorf("non-precommitted sector with expired deals, can't recover from this yet") - } - // Not much to do here, we can't go back in time to commit this sector return ctx.Send(SectorRemove{}) } diff --git a/storage/pipeline/types.go b/storage/pipeline/types.go index 0419aabc2..69e2b4ee0 100644 --- a/storage/pipeline/types.go +++ b/storage/pipeline/types.go @@ -7,7 +7,6 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" @@ -74,7 +73,6 @@ type SectorInfo struct { CommR *cid.Cid // SectorKey Proof []byte - PreCommitInfo *miner.SectorPreCommitInfo PreCommitDeposit big.Int PreCommitMessage *cid.Cid PreCommitTipSet types.TipSetKey