From d114d8fe7e5a8208bf540a66454ddd6f9e5b1589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 8 Mar 2023 16:49:18 +0100 Subject: [PATCH] deprecate MarketListRetrievalDeals, make gen --- .circleci/template.yml | 4 +- api/api_storage.go | 8 +- api/cbor_gen.go | 392 +++--- api/proxy_gen.go | 10 +- build/openrpc/miner.json.gz | Bin 16043 -> 15861 bytes chain/sub/incoming.go | 2 +- chain/sub/incoming_test.go | 2 +- chain/types/cbor_gen.go | 18 +- cmd/lotus-miner/info_all.go | 5 - cmd/lotus-miner/retrieval-deals.go | 44 - conformance/chaos/cbor_gen.go | 10 +- documentation/en/api-v0-methods-miner.md | 44 +- documentation/en/cli-lotus-miner.md | 14 - node/hello/cbor_gen.go | 6 +- node/impl/storminer.go | 16 +- paychmgr/cbor_gen.go | 458 +++---- storage/pipeline/cbor_gen.go | 1424 +++++++++++----------- storage/sealer/cbor_gen.go | 190 +-- storage/sealer/storiface/cbor_gen.go | 110 +- 19 files changed, 1324 insertions(+), 1433 deletions(-) diff --git a/.circleci/template.yml b/.circleci/template.yml index 133984c3916..32f50c161de 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -7,12 +7,12 @@ executors: golang: docker: # Must match GO_VERSION_MIN in project root - - image: cimg/go:1.18.8 + - image: cimg/go:1.19.7 resource_class: medium+ golang-2xl: docker: # Must match GO_VERSION_MIN in project root - - image: cimg/go:1.18.8 + - image: cimg/go:1.19.7 resource_class: 2xlarge ubuntu: docker: diff --git a/api/api_storage.go b/api/api_storage.go index fab047a143c..9e65c1ced7d 100644 --- a/api/api_storage.go +++ b/api/api_storage.go @@ -212,9 +212,11 @@ type StorageMiner interface { StorageDetachLocal(ctx context.Context, path string) error //perm:admin StorageRedeclareLocal(ctx context.Context, id *storiface.ID, dropMissing bool) error //perm:admin - MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:write - MarketListDeals(ctx context.Context) ([]*MarketDeal, error) //perm:read - MarketListRetrievalDeals(ctx context.Context) ([]retrievalmarket.ProviderDealState, error) //perm:read + MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:write + MarketListDeals(ctx context.Context) ([]*MarketDeal, error) //perm:read + + // MarketListRetrievalDeals is deprecated, returns empty list + MarketListRetrievalDeals(ctx context.Context) ([]struct{}, error) //perm:read MarketGetDealUpdates(ctx context.Context) (<-chan storagemarket.MinerDeal, error) //perm:read MarketListIncompleteDeals(ctx context.Context) ([]storagemarket.MinerDeal, error) //perm:read MarketSetAsk(ctx context.Context, price types.BigInt, verifiedPrice types.BigInt, duration abi.ChainEpoch, minPieceSize abi.PaddedPieceSize, maxPieceSize abi.PaddedPieceSize) error //perm:admin diff --git a/api/cbor_gen.go b/api/cbor_gen.go index efa1cd1a15a..80392b2127b 100644 --- a/api/cbor_gen.go +++ b/api/cbor_gen.go @@ -50,22 +50,6 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error { return err } - // t.WaitSentinel (cid.Cid) (struct) - if len("WaitSentinel") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"WaitSentinel\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WaitSentinel"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("WaitSentinel")); err != nil { - return err - } - - if err := cbg.WriteCid(cw, t.WaitSentinel); err != nil { - return xerrors.Errorf("failed to write cid field t.WaitSentinel: %w", err) - } - // t.Vouchers ([]*paych.SignedVoucher) (slice) if len("Vouchers") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Vouchers\" was too long") @@ -90,6 +74,23 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error { return err } } + + // t.WaitSentinel (cid.Cid) (struct) + if len("WaitSentinel") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"WaitSentinel\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WaitSentinel"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("WaitSentinel")); err != nil { + return err + } + + if err := cbg.WriteCid(cw, t.WaitSentinel); err != nil { + return xerrors.Errorf("failed to write cid field t.WaitSentinel: %w", err) + } + return nil } @@ -140,19 +141,6 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) (err error) { return xerrors.Errorf("unmarshaling t.Channel: %w", err) } - } - // t.WaitSentinel (cid.Cid) (struct) - case "WaitSentinel": - - { - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.WaitSentinel: %w", err) - } - - t.WaitSentinel = c - } // t.Vouchers ([]*paych.SignedVoucher) (slice) case "Vouchers": @@ -184,6 +172,20 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) (err error) { t.Vouchers[i] = &v } + // t.WaitSentinel (cid.Cid) (struct) + case "WaitSentinel": + + { + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.WaitSentinel: %w", err) + } + + t.WaitSentinel = c + + } + default: // Field doesn't exist on this type, so ignore it cbg.ScanForLinks(r, func(cid.Cid) {}) @@ -204,19 +206,19 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error { return err } - // t.SectorID (abi.SectorNumber) (uint64) - if len("SectorID") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"SectorID\" was too long") + // t.Size (abi.UnpaddedPieceSize) (uint64) + if len("Size") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Size\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorID"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Size"))); err != nil { return err } - if _, err := io.WriteString(w, string("SectorID")); err != nil { + if _, err := io.WriteString(w, string("Size")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorID)); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Size)); err != nil { return err } @@ -236,19 +238,19 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error { return err } - // t.Size (abi.UnpaddedPieceSize) (uint64) - if len("Size") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Size\" was too long") + // t.SectorID (abi.SectorNumber) (uint64) + if len("SectorID") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"SectorID\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Size"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorID"))); err != nil { return err } - if _, err := io.WriteString(w, string("Size")); err != nil { + if _, err := io.WriteString(w, string("SectorID")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Size)); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorID)); err != nil { return err } @@ -293,8 +295,8 @@ func (t *SealedRef) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.SectorID (abi.SectorNumber) (uint64) - case "SectorID": + // t.Size (abi.UnpaddedPieceSize) (uint64) + case "Size": { @@ -305,7 +307,7 @@ func (t *SealedRef) UnmarshalCBOR(r io.Reader) (err error) { if maj != cbg.MajUnsignedInt { return fmt.Errorf("wrong type for uint64 field") } - t.SectorID = abi.SectorNumber(extra) + t.Size = abi.UnpaddedPieceSize(extra) } // t.Offset (abi.PaddedPieceSize) (uint64) @@ -323,8 +325,8 @@ func (t *SealedRef) UnmarshalCBOR(r io.Reader) (err error) { t.Offset = abi.PaddedPieceSize(extra) } - // t.Size (abi.UnpaddedPieceSize) (uint64) - case "Size": + // t.SectorID (abi.SectorNumber) (uint64) + case "SectorID": { @@ -335,7 +337,7 @@ func (t *SealedRef) UnmarshalCBOR(r io.Reader) (err error) { if maj != cbg.MajUnsignedInt { return fmt.Errorf("wrong type for uint64 field") } - t.Size = abi.UnpaddedPieceSize(extra) + t.SectorID = abi.SectorNumber(extra) } @@ -474,6 +476,28 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error { return err } + // t.Epoch (abi.ChainEpoch) (int64) + if len("Epoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Epoch\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("Epoch")); err != nil { + return err + } + + if t.Epoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Epoch)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Epoch-1)); err != nil { + return err + } + } + // t.Value (abi.SealRandomness) (slice) if len("Value") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Value\" was too long") @@ -497,28 +521,6 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error { if _, err := cw.Write(t.Value[:]); err != nil { return err } - - // t.Epoch (abi.ChainEpoch) (int64) - if len("Epoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Epoch\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("Epoch")); err != nil { - return err - } - - if t.Epoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Epoch)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Epoch-1)); err != nil { - return err - } - } return nil } @@ -560,29 +562,7 @@ func (t *SealTicket) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Value (abi.SealRandomness) (slice) - case "Value": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - - if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.Value: byte array too large (%d)", extra) - } - if maj != cbg.MajByteString { - return fmt.Errorf("expected byte array") - } - - if extra > 0 { - t.Value = make([]uint8, extra) - } - - if _, err := io.ReadFull(cr, t.Value[:]); err != nil { - return err - } - // t.Epoch (abi.ChainEpoch) (int64) + // t.Epoch (abi.ChainEpoch) (int64) case "Epoch": { maj, extra, err := cr.ReadHeader() @@ -599,7 +579,7 @@ func (t *SealTicket) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: @@ -608,6 +588,28 @@ func (t *SealTicket) UnmarshalCBOR(r io.Reader) (err error) { t.Epoch = abi.ChainEpoch(extraI) } + // t.Value (abi.SealRandomness) (slice) + case "Value": + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + + if extra > cbg.ByteArrayMaxLen { + return fmt.Errorf("t.Value: byte array too large (%d)", extra) + } + if maj != cbg.MajByteString { + return fmt.Errorf("expected byte array") + } + + if extra > 0 { + t.Value = make([]uint8, extra) + } + + if _, err := io.ReadFull(cr, t.Value[:]); err != nil { + return err + } default: // Field doesn't exist on this type, so ignore it @@ -629,6 +631,28 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error { return err } + // t.Epoch (abi.ChainEpoch) (int64) + if len("Epoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Epoch\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("Epoch")); err != nil { + return err + } + + if t.Epoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Epoch)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Epoch-1)); err != nil { + return err + } + } + // t.Value (abi.InteractiveSealRandomness) (slice) if len("Value") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Value\" was too long") @@ -652,28 +676,6 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error { if _, err := cw.Write(t.Value[:]); err != nil { return err } - - // t.Epoch (abi.ChainEpoch) (int64) - if len("Epoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Epoch\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("Epoch")); err != nil { - return err - } - - if t.Epoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Epoch)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Epoch-1)); err != nil { - return err - } - } return nil } @@ -715,29 +717,7 @@ func (t *SealSeed) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Value (abi.InteractiveSealRandomness) (slice) - case "Value": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - - if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.Value: byte array too large (%d)", extra) - } - if maj != cbg.MajByteString { - return fmt.Errorf("expected byte array") - } - - if extra > 0 { - t.Value = make([]uint8, extra) - } - - if _, err := io.ReadFull(cr, t.Value[:]); err != nil { - return err - } - // t.Epoch (abi.ChainEpoch) (int64) + // t.Epoch (abi.ChainEpoch) (int64) case "Epoch": { maj, extra, err := cr.ReadHeader() @@ -754,7 +734,7 @@ func (t *SealSeed) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: @@ -763,6 +743,28 @@ func (t *SealSeed) UnmarshalCBOR(r io.Reader) (err error) { t.Epoch = abi.ChainEpoch(extraI) } + // t.Value (abi.InteractiveSealRandomness) (slice) + case "Value": + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + + if extra > cbg.ByteArrayMaxLen { + return fmt.Errorf("t.Value: byte array too large (%d)", extra) + } + if maj != cbg.MajByteString { + return fmt.Errorf("expected byte array") + } + + if extra > 0 { + t.Value = make([]uint8, extra) + } + + if _, err := io.ReadFull(cr, t.Value[:]); err != nil { + return err + } default: // Field doesn't exist on this type, so ignore it @@ -784,6 +786,22 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error { return err } + // t.DealID (abi.DealID) (uint64) + if len("DealID") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"DealID\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealID"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("DealID")); err != nil { + return err + } + + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.DealID)); err != nil { + return err + } + // t.PublishCid (cid.Cid) (struct) if len("PublishCid") > cbg.MaxLength { return xerrors.Errorf("Value in field \"PublishCid\" was too long") @@ -806,22 +824,6 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error { } } - // t.DealID (abi.DealID) (uint64) - if len("DealID") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"DealID\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealID"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("DealID")); err != nil { - return err - } - - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.DealID)); err != nil { - return err - } - // t.DealProposal (market.DealProposal) (struct) if len("DealProposal") > cbg.MaxLength { return xerrors.Errorf("Value in field \"DealProposal\" was too long") @@ -910,7 +912,22 @@ func (t *PieceDealInfo) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.PublishCid (cid.Cid) (struct) + // t.DealID (abi.DealID) (uint64) + case "DealID": + + { + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.DealID = abi.DealID(extra) + + } + // t.PublishCid (cid.Cid) (struct) case "PublishCid": { @@ -932,21 +949,6 @@ func (t *PieceDealInfo) UnmarshalCBOR(r io.Reader) (err error) { t.PublishCid = &c } - } - // t.DealID (abi.DealID) (uint64) - case "DealID": - - { - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.DealID = abi.DealID(extra) - } // t.DealProposal (market.DealProposal) (struct) case "DealProposal": @@ -1140,46 +1142,46 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error { return err } - // t.StartEpoch (abi.ChainEpoch) (int64) - if len("StartEpoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"StartEpoch\" was too long") + // t.EndEpoch (abi.ChainEpoch) (int64) + if len("EndEpoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"EndEpoch\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartEpoch"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EndEpoch"))); err != nil { return err } - if _, err := io.WriteString(w, string("StartEpoch")); err != nil { + if _, err := io.WriteString(w, string("EndEpoch")); err != nil { return err } - if t.StartEpoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.StartEpoch)); err != nil { + if t.EndEpoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.EndEpoch)); err != nil { return err } } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.StartEpoch-1)); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.EndEpoch-1)); err != nil { return err } } - // t.EndEpoch (abi.ChainEpoch) (int64) - if len("EndEpoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"EndEpoch\" was too long") + // t.StartEpoch (abi.ChainEpoch) (int64) + if len("StartEpoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"StartEpoch\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EndEpoch"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartEpoch"))); err != nil { return err } - if _, err := io.WriteString(w, string("EndEpoch")); err != nil { + if _, err := io.WriteString(w, string("StartEpoch")); err != nil { return err } - if t.EndEpoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.EndEpoch)); err != nil { + if t.StartEpoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.StartEpoch)); err != nil { return err } } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.EndEpoch-1)); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.StartEpoch-1)); err != nil { return err } } @@ -1224,8 +1226,8 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.StartEpoch (abi.ChainEpoch) (int64) - case "StartEpoch": + // t.EndEpoch (abi.ChainEpoch) (int64) + case "EndEpoch": { maj, extra, err := cr.ReadHeader() var extraI int64 @@ -1241,17 +1243,17 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: return fmt.Errorf("wrong type for int64 field: %d", maj) } - t.StartEpoch = abi.ChainEpoch(extraI) + t.EndEpoch = abi.ChainEpoch(extraI) } - // t.EndEpoch (abi.ChainEpoch) (int64) - case "EndEpoch": + // t.StartEpoch (abi.ChainEpoch) (int64) + case "StartEpoch": { maj, extra, err := cr.ReadHeader() var extraI int64 @@ -1267,14 +1269,14 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: return fmt.Errorf("wrong type for int64 field: %d", maj) } - t.EndEpoch = abi.ChainEpoch(extraI) + t.StartEpoch = abi.ChainEpoch(extraI) } default: diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 9b0c8c80ca4..aa423c5740f 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -947,7 +947,7 @@ type StorageMinerMethods struct { MarketListIncompleteDeals func(p0 context.Context) ([]storagemarket.MinerDeal, error) `perm:"read"` - MarketListRetrievalDeals func(p0 context.Context) ([]retrievalmarket.ProviderDealState, error) `perm:"read"` + MarketListRetrievalDeals func(p0 context.Context) ([]struct{}, error) `perm:"read"` MarketPendingDeals func(p0 context.Context) (PendingDealInfo, error) `perm:"write"` @@ -5645,15 +5645,15 @@ func (s *StorageMinerStub) MarketListIncompleteDeals(p0 context.Context) ([]stor return *new([]storagemarket.MinerDeal), ErrNotSupported } -func (s *StorageMinerStruct) MarketListRetrievalDeals(p0 context.Context) ([]retrievalmarket.ProviderDealState, error) { +func (s *StorageMinerStruct) MarketListRetrievalDeals(p0 context.Context) ([]struct{}, error) { if s.Internal.MarketListRetrievalDeals == nil { - return *new([]retrievalmarket.ProviderDealState), ErrNotSupported + return *new([]struct{}), ErrNotSupported } return s.Internal.MarketListRetrievalDeals(p0) } -func (s *StorageMinerStub) MarketListRetrievalDeals(p0 context.Context) ([]retrievalmarket.ProviderDealState, error) { - return *new([]retrievalmarket.ProviderDealState), ErrNotSupported +func (s *StorageMinerStub) MarketListRetrievalDeals(p0 context.Context) ([]struct{}, error) { + return *new([]struct{}), ErrNotSupported } func (s *StorageMinerStruct) MarketPendingDeals(p0 context.Context) (PendingDealInfo, error) { diff --git a/build/openrpc/miner.json.gz b/build/openrpc/miner.json.gz index b23389baf8463fb0ea80a77447532bf57c5aa4d4..9d872fbdea03954eb3a1cb20cfca7520712aee14 100644 GIT binary patch delta 15645 zcmV+&J>tTvef4{PABzY8000000RQa0d2<^#(m4E8Q1jMX>!c`|w~ng)!(_Vh&2QjNMcs&R`l1pf5DK8{Z7-AmTcvacm6s zhx=2bXJ9g?#_>0UVP+%a*f^(b?SadS6Y%EZ%;*_+$n`LPCGv~Get*wGcgADSSRuBg zmS-G){$>!k;-9|9HZmzD`)^D}-8YuyBF{5=hJ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Aa_?@7 zA`M*G766CEhT7|_aTA-ZKBK%K7Vc^o>veYT$RAvGQYp_oJhVg0L}sb zoYV}&r-l+ZkI;*0VMd%@#Nqx1_IM^z?45$N|ap cbg.MaxLength { - return xerrors.Errorf("Value in field \"Voucher\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Voucher"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("Voucher")); err != nil { - return err - } - - if err := t.Voucher.MarshalCBOR(cw); err != nil { - return err - } - // t.Proof ([]uint8) (slice) if len("Proof") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Proof\" was too long") @@ -73,6 +57,22 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error { return err } + // t.Voucher (paych.SignedVoucher) (struct) + if len("Voucher") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Voucher\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Voucher"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("Voucher")); err != nil { + return err + } + + if err := t.Voucher.MarshalCBOR(cw); err != nil { + return err + } + // t.Submitted (bool) (bool) if len("Submitted") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Submitted\" was too long") @@ -129,27 +129,7 @@ func (t *VoucherInfo) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Voucher (paych.SignedVoucher) (struct) - case "Voucher": - - { - - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.Voucher = new(paych.SignedVoucher) - if err := t.Voucher.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Voucher pointer: %w", err) - } - } - - } - // t.Proof ([]uint8) (slice) + // t.Proof ([]uint8) (slice) case "Proof": maj, extra, err = cr.ReadHeader() @@ -171,6 +151,26 @@ func (t *VoucherInfo) UnmarshalCBOR(r io.Reader) (err error) { if _, err := io.ReadFull(cr, t.Proof[:]); err != nil { return err } + // t.Voucher (paych.SignedVoucher) (struct) + case "Voucher": + + { + + b, err := cr.ReadByte() + if err != nil { + return err + } + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err + } + t.Voucher = new(paych.SignedVoucher) + if err := t.Voucher.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Voucher pointer: %w", err) + } + } + + } // t.Submitted (bool) (bool) case "Submitted": @@ -210,26 +210,35 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error { return err } - // t.ChannelID (string) (string) - if len("ChannelID") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"ChannelID\" was too long") + // t.Amount (big.Int) (struct) + if len("Amount") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Amount\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Amount"))); err != nil { return err } - if _, err := io.WriteString(w, string("ChannelID")); err != nil { + if _, err := io.WriteString(w, string("Amount")); err != nil { return err } - if len(t.ChannelID) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.ChannelID was too long") + if err := t.Amount.MarshalCBOR(cw); err != nil { + return err } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil { + // t.Target (address.Address) (struct) + if len("Target") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Target\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Target"))); err != nil { return err } - if _, err := io.WriteString(w, string(t.ChannelID)); err != nil { + if _, err := io.WriteString(w, string("Target")); err != nil { + return err + } + + if err := t.Target.MarshalCBOR(cw); err != nil { return err } @@ -265,35 +274,35 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error { return err } - // t.Target (address.Address) (struct) - if len("Target") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Target\" was too long") + // t.NextLane (uint64) (uint64) + if len("NextLane") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"NextLane\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Target"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("NextLane"))); err != nil { return err } - if _, err := io.WriteString(w, string("Target")); err != nil { + if _, err := io.WriteString(w, string("NextLane")); err != nil { return err } - if err := t.Target.MarshalCBOR(cw); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.NextLane)); err != nil { return err } - // t.Direction (uint64) (uint64) - if len("Direction") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Direction\" was too long") + // t.Settling (bool) (bool) + if len("Settling") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Settling\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Direction"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Settling"))); err != nil { return err } - if _, err := io.WriteString(w, string("Direction")); err != nil { + if _, err := io.WriteString(w, string("Settling")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Direction)); err != nil { + if err := cbg.WriteBool(w, t.Settling); err != nil { return err } @@ -322,68 +331,87 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error { } } - // t.NextLane (uint64) (uint64) - if len("NextLane") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"NextLane\" was too long") + // t.ChannelID (string) (string) + if len("ChannelID") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"ChannelID\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("NextLane"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil { return err } - if _, err := io.WriteString(w, string("NextLane")); err != nil { + if _, err := io.WriteString(w, string("ChannelID")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.NextLane)); err != nil { + if len(t.ChannelID) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.ChannelID was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil { + return err + } + if _, err := io.WriteString(w, string(t.ChannelID)); err != nil { return err } - // t.Amount (big.Int) (struct) - if len("Amount") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Amount\" was too long") + // t.CreateMsg (cid.Cid) (struct) + if len("CreateMsg") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CreateMsg\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Amount"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreateMsg"))); err != nil { return err } - if _, err := io.WriteString(w, string("Amount")); err != nil { + if _, err := io.WriteString(w, string("CreateMsg")); err != nil { return err } - if err := t.Amount.MarshalCBOR(cw); err != nil { - return err + if t.CreateMsg == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { + return err + } + } else { + if err := cbg.WriteCid(cw, *t.CreateMsg); err != nil { + return xerrors.Errorf("failed to write cid field t.CreateMsg: %w", err) + } } - // t.AvailableAmount (big.Int) (struct) - if len("AvailableAmount") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"AvailableAmount\" was too long") + // t.Direction (uint64) (uint64) + if len("Direction") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Direction\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AvailableAmount"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Direction"))); err != nil { return err } - if _, err := io.WriteString(w, string("AvailableAmount")); err != nil { + if _, err := io.WriteString(w, string("Direction")); err != nil { return err } - if err := t.AvailableAmount.MarshalCBOR(cw); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Direction)); err != nil { return err } - // t.PendingAvailableAmount (big.Int) (struct) - if len("PendingAvailableAmount") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PendingAvailableAmount\" was too long") + // t.AddFundsMsg (cid.Cid) (struct) + if len("AddFundsMsg") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"AddFundsMsg\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAvailableAmount"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AddFundsMsg"))); err != nil { return err } - if _, err := io.WriteString(w, string("PendingAvailableAmount")); err != nil { + if _, err := io.WriteString(w, string("AddFundsMsg")); err != nil { return err } - if err := t.PendingAvailableAmount.MarshalCBOR(cw); err != nil { - return err + if t.AddFundsMsg == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { + return err + } + } else { + if err := cbg.WriteCid(cw, *t.AddFundsMsg); err != nil { + return xerrors.Errorf("failed to write cid field t.AddFundsMsg: %w", err) + } } // t.PendingAmount (big.Int) (struct) @@ -402,63 +430,35 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error { return err } - // t.CreateMsg (cid.Cid) (struct) - if len("CreateMsg") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CreateMsg\" was too long") + // t.AvailableAmount (big.Int) (struct) + if len("AvailableAmount") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"AvailableAmount\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreateMsg"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AvailableAmount"))); err != nil { return err } - if _, err := io.WriteString(w, string("CreateMsg")); err != nil { + if _, err := io.WriteString(w, string("AvailableAmount")); err != nil { return err } - if t.CreateMsg == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.CreateMsg); err != nil { - return xerrors.Errorf("failed to write cid field t.CreateMsg: %w", err) - } - } - - // t.AddFundsMsg (cid.Cid) (struct) - if len("AddFundsMsg") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"AddFundsMsg\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AddFundsMsg"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("AddFundsMsg")); err != nil { + if err := t.AvailableAmount.MarshalCBOR(cw); err != nil { return err } - if t.AddFundsMsg == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.AddFundsMsg); err != nil { - return xerrors.Errorf("failed to write cid field t.AddFundsMsg: %w", err) - } - } - - // t.Settling (bool) (bool) - if len("Settling") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Settling\" was too long") + // t.PendingAvailableAmount (big.Int) (struct) + if len("PendingAvailableAmount") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PendingAvailableAmount\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Settling"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAvailableAmount"))); err != nil { return err } - if _, err := io.WriteString(w, string("Settling")); err != nil { + if _, err := io.WriteString(w, string("PendingAvailableAmount")); err != nil { return err } - if err := cbg.WriteBool(w, t.Settling); err != nil { + if err := t.PendingAvailableAmount.MarshalCBOR(cw); err != nil { return err } return nil @@ -502,16 +502,25 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.ChannelID (string) (string) - case "ChannelID": + // t.Amount (big.Int) (struct) + case "Amount": { - sval, err := cbg.ReadString(cr) - if err != nil { - return err + + if err := t.Amount.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Amount: %w", err) + } + + } + // t.Target (address.Address) (struct) + case "Target": + + { + + if err := t.Target.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Target: %w", err) } - t.ChannelID = string(sval) } // t.Channel (address.Address) (struct) case "Channel": @@ -543,18 +552,8 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.Target (address.Address) (struct) - case "Target": - - { - - if err := t.Target.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Target: %w", err) - } - - } - // t.Direction (uint64) (uint64) - case "Direction": + // t.NextLane (uint64) (uint64) + case "NextLane": { @@ -565,9 +564,27 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { if maj != cbg.MajUnsignedInt { return fmt.Errorf("wrong type for uint64 field") } - t.Direction = uint64(extra) + t.NextLane = uint64(extra) } + // t.Settling (bool) (bool) + case "Settling": + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajOther { + return fmt.Errorf("booleans must be major type 7") + } + switch extra { + case 20: + t.Settling = false + case 21: + t.Settling = true + default: + return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) + } // t.Vouchers ([]*paychmgr.VoucherInfo) (slice) case "Vouchers": @@ -598,60 +615,16 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { t.Vouchers[i] = &v } - // t.NextLane (uint64) (uint64) - case "NextLane": + // t.ChannelID (string) (string) + case "ChannelID": { - - maj, extra, err = cr.ReadHeader() + sval, err := cbg.ReadString(cr) if err != nil { return err } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.NextLane = uint64(extra) - - } - // t.Amount (big.Int) (struct) - case "Amount": - - { - - if err := t.Amount.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Amount: %w", err) - } - - } - // t.AvailableAmount (big.Int) (struct) - case "AvailableAmount": - - { - - if err := t.AvailableAmount.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.AvailableAmount: %w", err) - } - - } - // t.PendingAvailableAmount (big.Int) (struct) - case "PendingAvailableAmount": - - { - - if err := t.PendingAvailableAmount.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PendingAvailableAmount: %w", err) - } - - } - // t.PendingAmount (big.Int) (struct) - case "PendingAmount": - - { - - if err := t.PendingAmount.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PendingAmount: %w", err) - } + t.ChannelID = string(sval) } // t.CreateMsg (cid.Cid) (struct) case "CreateMsg": @@ -675,6 +648,21 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { t.CreateMsg = &c } + } + // t.Direction (uint64) (uint64) + case "Direction": + + { + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.Direction = uint64(extra) + } // t.AddFundsMsg (cid.Cid) (struct) case "AddFundsMsg": @@ -699,23 +687,35 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.Settling (bool) (bool) - case "Settling": + // t.PendingAmount (big.Int) (struct) + case "PendingAmount": + + { + + if err := t.PendingAmount.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.PendingAmount: %w", err) + } - maj, extra, err = cr.ReadHeader() - if err != nil { - return err } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") + // t.AvailableAmount (big.Int) (struct) + case "AvailableAmount": + + { + + if err := t.AvailableAmount.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.AvailableAmount: %w", err) + } + } - switch extra { - case 20: - t.Settling = false - case 21: - t.Settling = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) + // t.PendingAvailableAmount (big.Int) (struct) + case "PendingAvailableAmount": + + { + + if err := t.PendingAvailableAmount.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.PendingAvailableAmount: %w", err) + } + } default: @@ -738,26 +738,26 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error { return err } - // t.ChannelID (string) (string) - if len("ChannelID") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"ChannelID\" was too long") + // t.Err (string) (string) + if len("Err") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Err\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Err"))); err != nil { return err } - if _, err := io.WriteString(w, string("ChannelID")); err != nil { + if _, err := io.WriteString(w, string("Err")); err != nil { return err } - if len(t.ChannelID) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.ChannelID was too long") + if len(t.Err) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.Err was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Err))); err != nil { return err } - if _, err := io.WriteString(w, string(t.ChannelID)); err != nil { + if _, err := io.WriteString(w, string(t.Err)); err != nil { return err } @@ -793,26 +793,26 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error { return err } - // t.Err (string) (string) - if len("Err") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Err\" was too long") + // t.ChannelID (string) (string) + if len("ChannelID") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"ChannelID\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Err"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil { return err } - if _, err := io.WriteString(w, string("Err")); err != nil { + if _, err := io.WriteString(w, string("ChannelID")); err != nil { return err } - if len(t.Err) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Err was too long") + if len(t.ChannelID) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.ChannelID was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Err))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil { return err } - if _, err := io.WriteString(w, string(t.Err)); err != nil { + if _, err := io.WriteString(w, string(t.ChannelID)); err != nil { return err } return nil @@ -856,8 +856,8 @@ func (t *MsgInfo) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.ChannelID (string) (string) - case "ChannelID": + // t.Err (string) (string) + case "Err": { sval, err := cbg.ReadString(cr) @@ -865,7 +865,7 @@ func (t *MsgInfo) UnmarshalCBOR(r io.Reader) (err error) { return err } - t.ChannelID = string(sval) + t.Err = string(sval) } // t.MsgCid (cid.Cid) (struct) case "MsgCid": @@ -898,8 +898,8 @@ func (t *MsgInfo) UnmarshalCBOR(r io.Reader) (err error) { default: return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) } - // t.Err (string) (string) - case "Err": + // t.ChannelID (string) (string) + case "ChannelID": { sval, err := cbg.ReadString(cr) @@ -907,7 +907,7 @@ func (t *MsgInfo) UnmarshalCBOR(r io.Reader) (err error) { return err } - t.Err = string(sval) + t.ChannelID = string(sval) } default: diff --git a/storage/pipeline/cbor_gen.go b/storage/pipeline/cbor_gen.go index 88dac5d6424..d14611c6a34 100644 --- a/storage/pipeline/cbor_gen.go +++ b/storage/pipeline/cbor_gen.go @@ -35,87 +35,120 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } - // t.State (sealing.SectorState) (string) - if len("State") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"State\" was too long") + // t.Log ([]sealing.Log) (slice) + if len("Log") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Log\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("State"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Log"))); err != nil { return err } - if _, err := io.WriteString(w, string("State")); err != nil { + if _, err := io.WriteString(w, string("Log")); err != nil { return err } - if len(t.State) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.State was too long") + if len(t.Log) > cbg.MaxLength { + return xerrors.Errorf("Slice value in field t.Log was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Log))); err != nil { return err } - if _, err := io.WriteString(w, string(t.State)); err != nil { - return err + for _, v := range t.Log { + if err := v.MarshalCBOR(cw); err != nil { + return err + } } - // t.SectorNumber (abi.SectorNumber) (uint64) - if len("SectorNumber") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"SectorNumber\" was too long") + // t.CommD (cid.Cid) (struct) + if len("CommD") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CommD\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorNumber"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommD"))); err != nil { return err } - if _, err := io.WriteString(w, string("SectorNumber")); err != nil { + if _, err := io.WriteString(w, string("CommD")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorNumber)); err != nil { - return err + if t.CommD == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { + return err + } + } else { + if err := cbg.WriteCid(cw, *t.CommD); err != nil { + return xerrors.Errorf("failed to write cid field t.CommD: %w", err) + } } - // t.SectorType (abi.RegisteredSealProof) (int64) - if len("SectorType") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"SectorType\" was too long") + // t.CommR (cid.Cid) (struct) + if len("CommR") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CommR\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorType"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommR"))); err != nil { return err } - if _, err := io.WriteString(w, string("SectorType")); err != nil { + if _, err := io.WriteString(w, string("CommR")); err != nil { return err } - if t.SectorType >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorType)); err != nil { + if t.CommR == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { return err } } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.SectorType-1)); err != nil { - return err + if err := cbg.WriteCid(cw, *t.CommR); err != nil { + return xerrors.Errorf("failed to write cid field t.CommR: %w", err) } } - // t.CreationTime (int64) (int64) - if len("CreationTime") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CreationTime\" was too long") + // t.Proof ([]uint8) (slice) + if len("Proof") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Proof\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreationTime"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil { return err } - if _, err := io.WriteString(w, string("CreationTime")); err != nil { + if _, err := io.WriteString(w, string("Proof")); err != nil { return err } - if t.CreationTime >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.CreationTime)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.CreationTime-1)); err != nil { - return err - } + if len(t.Proof) > cbg.ByteArrayMaxLen { + return xerrors.Errorf("Byte array in field t.Proof was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Proof))); err != nil { + return err + } + + if _, err := cw.Write(t.Proof[:]); err != nil { + return err + } + + // t.State (sealing.SectorState) (string) + if len("State") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"State\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("State"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("State")); err != nil { + return err + } + + if len(t.State) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.State was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil { + return err + } + if _, err := io.WriteString(w, string(t.State)); err != nil { + return err } // t.Pieces ([]api.SectorPiece) (slice) @@ -143,257 +176,286 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { } } - // t.TicketValue (abi.SealRandomness) (slice) - if len("TicketValue") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"TicketValue\" was too long") + // t.Return (sealing.ReturnState) (string) + if len("Return") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Return\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketValue"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Return"))); err != nil { return err } - if _, err := io.WriteString(w, string("TicketValue")); err != nil { + if _, err := io.WriteString(w, string("Return")); err != nil { return err } - if len(t.TicketValue) > cbg.ByteArrayMaxLen { - return xerrors.Errorf("Byte array in field t.TicketValue was too long") + if len(t.Return) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.Return was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.TicketValue))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Return))); err != nil { return err } - - if _, err := cw.Write(t.TicketValue[:]); err != nil { + if _, err := io.WriteString(w, string(t.Return)); err != nil { return err } - // t.TicketEpoch (abi.ChainEpoch) (int64) - if len("TicketEpoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"TicketEpoch\" was too long") + // t.LastErr (string) (string) + if len("LastErr") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"LastErr\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketEpoch"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LastErr"))); err != nil { return err } - if _, err := io.WriteString(w, string("TicketEpoch")); err != nil { + if _, err := io.WriteString(w, string("LastErr")); err != nil { return err } - if t.TicketEpoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TicketEpoch)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.TicketEpoch-1)); err != nil { - return err - } - } - - // t.PreCommit1Out (storiface.PreCommit1Out) (slice) - if len("PreCommit1Out") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommit1Out\" was too long") + if len(t.LastErr) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.LastErr was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit1Out"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.LastErr))); err != nil { return err } - if _, err := io.WriteString(w, string("PreCommit1Out")); err != nil { + if _, err := io.WriteString(w, string(t.LastErr)); err != nil { return err } - if len(t.PreCommit1Out) > cbg.ByteArrayMaxLen { - return xerrors.Errorf("Byte array in field t.PreCommit1Out was too long") + // t.CCPieces ([]api.SectorPiece) (slice) + if len("CCPieces") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CCPieces\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.PreCommit1Out))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCPieces"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("CCPieces")); err != nil { return err } - if _, err := cw.Write(t.PreCommit1Out[:]); err != nil { + if len(t.CCPieces) > cbg.MaxLength { + return xerrors.Errorf("Slice value in field t.CCPieces was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.CCPieces))); err != nil { return err } + for _, v := range t.CCPieces { + if err := v.MarshalCBOR(cw); err != nil { + return err + } + } - // t.CommD (cid.Cid) (struct) - if len("CommD") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CommD\" was too long") + // t.CCUpdate (bool) (bool) + if len("CCUpdate") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CCUpdate\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommD"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCUpdate"))); err != nil { return err } - if _, err := io.WriteString(w, string("CommD")); err != nil { + if _, err := io.WriteString(w, string("CCUpdate")); err != nil { return err } - if t.CommD == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.CommD); err != nil { - return xerrors.Errorf("failed to write cid field t.CommD: %w", err) - } + if err := cbg.WriteBool(w, t.CCUpdate); err != nil { + return err } - // t.CommR (cid.Cid) (struct) - if len("CommR") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CommR\" was too long") + // t.SeedEpoch (abi.ChainEpoch) (int64) + if len("SeedEpoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"SeedEpoch\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommR"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedEpoch"))); err != nil { return err } - if _, err := io.WriteString(w, string("CommR")); err != nil { + if _, err := io.WriteString(w, string("SeedEpoch")); err != nil { return err } - if t.CommR == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { + if t.SeedEpoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SeedEpoch)); err != nil { return err } } else { - if err := cbg.WriteCid(cw, *t.CommR); err != nil { - return xerrors.Errorf("failed to write cid field t.CommR: %w", err) + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.SeedEpoch-1)); err != nil { + return err } } - // t.Proof ([]uint8) (slice) - if len("Proof") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Proof\" was too long") + // t.SeedValue (abi.InteractiveSealRandomness) (slice) + if len("SeedValue") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"SeedValue\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedValue"))); err != nil { return err } - if _, err := io.WriteString(w, string("Proof")); err != nil { + if _, err := io.WriteString(w, string("SeedValue")); err != nil { return err } - if len(t.Proof) > cbg.ByteArrayMaxLen { - return xerrors.Errorf("Byte array in field t.Proof was too long") + if len(t.SeedValue) > cbg.ByteArrayMaxLen { + return xerrors.Errorf("Byte array in field t.SeedValue was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.Proof))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.SeedValue))); err != nil { return err } - if _, err := cw.Write(t.Proof[:]); err != nil { + if _, err := cw.Write(t.SeedValue[:]); err != nil { return err } - // t.PreCommitDeposit (big.Int) (struct) - if len("PreCommitDeposit") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommitDeposit\" was too long") + // t.SectorType (abi.RegisteredSealProof) (int64) + if len("SectorType") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"SectorType\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitDeposit"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorType"))); err != nil { return err } - if _, err := io.WriteString(w, string("PreCommitDeposit")); err != nil { + if _, err := io.WriteString(w, string("SectorType")); err != nil { return err } - if err := t.PreCommitDeposit.MarshalCBOR(cw); err != nil { - return err + if t.SectorType >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorType)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.SectorType-1)); err != nil { + return err + } } - // t.PreCommitMessage (cid.Cid) (struct) - if len("PreCommitMessage") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommitMessage\" was too long") + // t.TicketEpoch (abi.ChainEpoch) (int64) + if len("TicketEpoch") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"TicketEpoch\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitMessage"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketEpoch"))); err != nil { return err } - if _, err := io.WriteString(w, string("PreCommitMessage")); err != nil { + if _, err := io.WriteString(w, string("TicketEpoch")); err != nil { return err } - if t.PreCommitMessage == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { + if t.TicketEpoch >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TicketEpoch)); err != nil { return err } } else { - if err := cbg.WriteCid(cw, *t.PreCommitMessage); err != nil { - return xerrors.Errorf("failed to write cid field t.PreCommitMessage: %w", err) + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.TicketEpoch-1)); err != nil { + return err } } - // t.PreCommitTipSet (types.TipSetKey) (struct) - if len("PreCommitTipSet") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommitTipSet\" was too long") + // t.TicketValue (abi.SealRandomness) (slice) + if len("TicketValue") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"TicketValue\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitTipSet"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketValue"))); err != nil { return err } - if _, err := io.WriteString(w, string("PreCommitTipSet")); err != nil { + if _, err := io.WriteString(w, string("TicketValue")); err != nil { return err } - if err := t.PreCommitTipSet.MarshalCBOR(cw); err != nil { + if len(t.TicketValue) > cbg.ByteArrayMaxLen { + return xerrors.Errorf("Byte array in field t.TicketValue was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.TicketValue))); err != nil { return err } - // t.PreCommit2Fails (uint64) (uint64) - if len("PreCommit2Fails") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"PreCommit2Fails\" was too long") + if _, err := cw.Write(t.TicketValue[:]); err != nil { + return err } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit2Fails"))); err != nil { + // t.CreationTime (int64) (int64) + if len("CreationTime") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"CreationTime\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreationTime"))); err != nil { return err } - if _, err := io.WriteString(w, string("PreCommit2Fails")); err != nil { + if _, err := io.WriteString(w, string("CreationTime")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PreCommit2Fails)); err != nil { - return err + if t.CreationTime >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.CreationTime)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.CreationTime-1)); err != nil { + return err + } } - // t.SeedValue (abi.InteractiveSealRandomness) (slice) - if len("SeedValue") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"SeedValue\" was too long") + // t.SectorNumber (abi.SectorNumber) (uint64) + if len("SectorNumber") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"SectorNumber\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedValue"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorNumber"))); err != nil { return err } - if _, err := io.WriteString(w, string("SeedValue")); err != nil { + if _, err := io.WriteString(w, string("SectorNumber")); err != nil { return err } - if len(t.SeedValue) > cbg.ByteArrayMaxLen { - return xerrors.Errorf("Byte array in field t.SeedValue was too long") + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SectorNumber)); err != nil { + return err } - if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.SeedValue))); err != nil { - return err + // t.TerminatedAt (abi.ChainEpoch) (int64) + if len("TerminatedAt") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"TerminatedAt\" was too long") } - if _, err := cw.Write(t.SeedValue[:]); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminatedAt"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("TerminatedAt")); err != nil { return err } - // t.SeedEpoch (abi.ChainEpoch) (int64) - if len("SeedEpoch") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"SeedEpoch\" was too long") + if t.TerminatedAt >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TerminatedAt)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.TerminatedAt-1)); err != nil { + return err + } } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedEpoch"))); err != nil { + // t.UpdateSealed (cid.Cid) (struct) + if len("UpdateSealed") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"UpdateSealed\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateSealed"))); err != nil { return err } - if _, err := io.WriteString(w, string("SeedEpoch")); err != nil { + if _, err := io.WriteString(w, string("UpdateSealed")); err != nil { return err } - if t.SeedEpoch >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.SeedEpoch)); err != nil { + if t.UpdateSealed == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { return err } } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.SeedEpoch-1)); err != nil { - return err + if err := cbg.WriteCid(cw, *t.UpdateSealed); err != nil { + return xerrors.Errorf("failed to write cid field t.UpdateSealed: %w", err) } } @@ -435,66 +497,49 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } - // t.CCUpdate (bool) (bool) - if len("CCUpdate") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CCUpdate\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCUpdate"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("CCUpdate")); err != nil { - return err - } - - if err := cbg.WriteBool(w, t.CCUpdate); err != nil { - return err - } - - // t.CCPieces ([]api.SectorPiece) (slice) - if len("CCPieces") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"CCPieces\" was too long") + // t.PreCommit1Out (storiface.PreCommit1Out) (slice) + if len("PreCommit1Out") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PreCommit1Out\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCPieces"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit1Out"))); err != nil { return err } - if _, err := io.WriteString(w, string("CCPieces")); err != nil { + if _, err := io.WriteString(w, string("PreCommit1Out")); err != nil { return err } - if len(t.CCPieces) > cbg.MaxLength { - return xerrors.Errorf("Slice value in field t.CCPieces was too long") + if len(t.PreCommit1Out) > cbg.ByteArrayMaxLen { + return xerrors.Errorf("Byte array in field t.PreCommit1Out was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.CCPieces))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.PreCommit1Out))); err != nil { return err } - for _, v := range t.CCPieces { - if err := v.MarshalCBOR(cw); err != nil { - return err - } + + if _, err := cw.Write(t.PreCommit1Out[:]); err != nil { + return err } - // t.UpdateSealed (cid.Cid) (struct) - if len("UpdateSealed") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"UpdateSealed\" was too long") + // t.FaultReportMsg (cid.Cid) (struct) + if len("FaultReportMsg") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"FaultReportMsg\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateSealed"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("FaultReportMsg"))); err != nil { return err } - if _, err := io.WriteString(w, string("UpdateSealed")); err != nil { + if _, err := io.WriteString(w, string("FaultReportMsg")); err != nil { return err } - if t.UpdateSealed == nil { + if t.FaultReportMsg == nil { if _, err := cw.Write(cbg.CborNull); err != nil { return err } } else { - if err := cbg.WriteCid(cw, *t.UpdateSealed); err != nil { - return xerrors.Errorf("failed to write cid field t.UpdateSealed: %w", err) + if err := cbg.WriteCid(cw, *t.FaultReportMsg); err != nil { + return xerrors.Errorf("failed to write cid field t.FaultReportMsg: %w", err) } } @@ -520,94 +565,105 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { } } - // t.ReplicaUpdateProof (storiface.ReplicaUpdateProof) (slice) - if len("ReplicaUpdateProof") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"ReplicaUpdateProof\" was too long") + // t.PreCommit2Fails (uint64) (uint64) + if len("PreCommit2Fails") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PreCommit2Fails\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateProof"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit2Fails"))); err != nil { return err } - if _, err := io.WriteString(w, string("ReplicaUpdateProof")); err != nil { + if _, err := io.WriteString(w, string("PreCommit2Fails")); err != nil { return err } - if len(t.ReplicaUpdateProof) > cbg.ByteArrayMaxLen { - return xerrors.Errorf("Byte array in field t.ReplicaUpdateProof was too long") + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.PreCommit2Fails)); err != nil { + return err } - if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.ReplicaUpdateProof))); err != nil { + // t.PreCommitTipSet (types.TipSetKey) (struct) + if len("PreCommitTipSet") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PreCommitTipSet\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitTipSet"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("PreCommitTipSet")); err != nil { return err } - if _, err := cw.Write(t.ReplicaUpdateProof[:]); err != nil { + if err := t.PreCommitTipSet.MarshalCBOR(cw); err != nil { return err } - // t.ReplicaUpdateMessage (cid.Cid) (struct) - if len("ReplicaUpdateMessage") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"ReplicaUpdateMessage\" was too long") + // t.RemoteDataCache (storiface.SectorLocation) (struct) + if len("RemoteDataCache") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteDataCache\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateMessage"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataCache"))); err != nil { return err } - if _, err := io.WriteString(w, string("ReplicaUpdateMessage")); err != nil { + if _, err := io.WriteString(w, string("RemoteDataCache")); err != nil { return err } - if t.ReplicaUpdateMessage == nil { - if _, err := cw.Write(cbg.CborNull); err != nil { - return err - } - } else { - if err := cbg.WriteCid(cw, *t.ReplicaUpdateMessage); err != nil { - return xerrors.Errorf("failed to write cid field t.ReplicaUpdateMessage: %w", err) - } + if err := t.RemoteDataCache.MarshalCBOR(cw); err != nil { + return err } - // t.FaultReportMsg (cid.Cid) (struct) - if len("FaultReportMsg") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"FaultReportMsg\" was too long") + // t.PreCommitDeposit (big.Int) (struct) + if len("PreCommitDeposit") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PreCommitDeposit\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("FaultReportMsg"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitDeposit"))); err != nil { return err } - if _, err := io.WriteString(w, string("FaultReportMsg")); err != nil { + if _, err := io.WriteString(w, string("PreCommitDeposit")); err != nil { return err } - if t.FaultReportMsg == nil { + if err := t.PreCommitDeposit.MarshalCBOR(cw); err != nil { + return err + } + + // t.PreCommitMessage (cid.Cid) (struct) + if len("PreCommitMessage") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"PreCommitMessage\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitMessage"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("PreCommitMessage")); err != nil { + return err + } + + if t.PreCommitMessage == nil { if _, err := cw.Write(cbg.CborNull); err != nil { return err } } else { - if err := cbg.WriteCid(cw, *t.FaultReportMsg); err != nil { - return xerrors.Errorf("failed to write cid field t.FaultReportMsg: %w", err) + if err := cbg.WriteCid(cw, *t.PreCommitMessage); err != nil { + return xerrors.Errorf("failed to write cid field t.PreCommitMessage: %w", err) } } - // t.Return (sealing.ReturnState) (string) - if len("Return") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Return\" was too long") + // t.RemoteDataSealed (storiface.SectorLocation) (struct) + if len("RemoteDataSealed") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteDataSealed\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Return"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataSealed"))); err != nil { return err } - if _, err := io.WriteString(w, string("Return")); err != nil { + if _, err := io.WriteString(w, string("RemoteDataSealed")); err != nil { return err } - if len(t.Return) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Return was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Return))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Return)); err != nil { + if err := t.RemoteDataSealed.MarshalCBOR(cw); err != nil { return err } @@ -633,28 +689,6 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { } } - // t.TerminatedAt (abi.ChainEpoch) (int64) - if len("TerminatedAt") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"TerminatedAt\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminatedAt"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("TerminatedAt")); err != nil { - return err - } - - if t.TerminatedAt >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.TerminatedAt)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.TerminatedAt-1)); err != nil { - return err - } - } - // t.RemoteDataUnsealed (storiface.SectorLocation) (struct) if len("RemoteDataUnsealed") > cbg.MaxLength { return xerrors.Errorf("Value in field \"RemoteDataUnsealed\" was too long") @@ -671,169 +705,135 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } - // t.RemoteDataSealed (storiface.SectorLocation) (struct) - if len("RemoteDataSealed") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteDataSealed\" was too long") + // t.ReplicaUpdateProof (storiface.ReplicaUpdateProof) (slice) + if len("ReplicaUpdateProof") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"ReplicaUpdateProof\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataSealed"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteDataSealed")); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateProof"))); err != nil { return err } - - if err := t.RemoteDataSealed.MarshalCBOR(cw); err != nil { + if _, err := io.WriteString(w, string("ReplicaUpdateProof")); err != nil { return err } - // t.RemoteDataCache (storiface.SectorLocation) (struct) - if len("RemoteDataCache") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteDataCache\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataCache"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteDataCache")); err != nil { - return err + if len(t.ReplicaUpdateProof) > cbg.ByteArrayMaxLen { + return xerrors.Errorf("Byte array in field t.ReplicaUpdateProof was too long") } - if err := t.RemoteDataCache.MarshalCBOR(cw); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajByteString, uint64(len(t.ReplicaUpdateProof))); err != nil { return err } - // t.RemoteCommit1Endpoint (string) (string) - if len("RemoteCommit1Endpoint") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteCommit1Endpoint\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit1Endpoint"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteCommit1Endpoint")); err != nil { + if _, err := cw.Write(t.ReplicaUpdateProof[:]); err != nil { return err } - if len(t.RemoteCommit1Endpoint) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.RemoteCommit1Endpoint was too long") + // t.RemoteDataFinalized (bool) (bool) + if len("RemoteDataFinalized") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteDataFinalized\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit1Endpoint))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataFinalized"))); err != nil { return err } - if _, err := io.WriteString(w, string(t.RemoteCommit1Endpoint)); err != nil { + if _, err := io.WriteString(w, string("RemoteDataFinalized")); err != nil { return err } - // t.RemoteCommit2Endpoint (string) (string) - if len("RemoteCommit2Endpoint") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteCommit2Endpoint\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit2Endpoint"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteCommit2Endpoint")); err != nil { + if err := cbg.WriteBool(w, t.RemoteDataFinalized); err != nil { return err } - if len(t.RemoteCommit2Endpoint) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.RemoteCommit2Endpoint was too long") + // t.ReplicaUpdateMessage (cid.Cid) (struct) + if len("ReplicaUpdateMessage") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"ReplicaUpdateMessage\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit2Endpoint))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateMessage"))); err != nil { return err } - if _, err := io.WriteString(w, string(t.RemoteCommit2Endpoint)); err != nil { + if _, err := io.WriteString(w, string("ReplicaUpdateMessage")); err != nil { return err } - // t.RemoteSealingDoneEndpoint (string) (string) - if len("RemoteSealingDoneEndpoint") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteSealingDoneEndpoint\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteSealingDoneEndpoint"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteSealingDoneEndpoint")); err != nil { - return err + if t.ReplicaUpdateMessage == nil { + if _, err := cw.Write(cbg.CborNull); err != nil { + return err + } + } else { + if err := cbg.WriteCid(cw, *t.ReplicaUpdateMessage); err != nil { + return xerrors.Errorf("failed to write cid field t.ReplicaUpdateMessage: %w", err) + } } - if len(t.RemoteSealingDoneEndpoint) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.RemoteSealingDoneEndpoint was too long") + // t.RemoteCommit1Endpoint (string) (string) + if len("RemoteCommit1Endpoint") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteCommit1Endpoint\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteSealingDoneEndpoint))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit1Endpoint"))); err != nil { return err } - if _, err := io.WriteString(w, string(t.RemoteSealingDoneEndpoint)); err != nil { + if _, err := io.WriteString(w, string("RemoteCommit1Endpoint")); err != nil { return err } - // t.RemoteDataFinalized (bool) (bool) - if len("RemoteDataFinalized") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RemoteDataFinalized\" was too long") + if len(t.RemoteCommit1Endpoint) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.RemoteCommit1Endpoint was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataFinalized"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RemoteDataFinalized")); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit1Endpoint))); err != nil { return err } - - if err := cbg.WriteBool(w, t.RemoteDataFinalized); err != nil { + if _, err := io.WriteString(w, string(t.RemoteCommit1Endpoint)); err != nil { return err } - // t.LastErr (string) (string) - if len("LastErr") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"LastErr\" was too long") + // t.RemoteCommit2Endpoint (string) (string) + if len("RemoteCommit2Endpoint") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteCommit2Endpoint\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LastErr"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit2Endpoint"))); err != nil { return err } - if _, err := io.WriteString(w, string("LastErr")); err != nil { + if _, err := io.WriteString(w, string("RemoteCommit2Endpoint")); err != nil { return err } - if len(t.LastErr) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.LastErr was too long") + if len(t.RemoteCommit2Endpoint) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.RemoteCommit2Endpoint was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.LastErr))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit2Endpoint))); err != nil { return err } - if _, err := io.WriteString(w, string(t.LastErr)); err != nil { + if _, err := io.WriteString(w, string(t.RemoteCommit2Endpoint)); err != nil { return err } - // t.Log ([]sealing.Log) (slice) - if len("Log") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Log\" was too long") + // t.RemoteSealingDoneEndpoint (string) (string) + if len("RemoteSealingDoneEndpoint") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RemoteSealingDoneEndpoint\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Log"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteSealingDoneEndpoint"))); err != nil { return err } - if _, err := io.WriteString(w, string("Log")); err != nil { + if _, err := io.WriteString(w, string("RemoteSealingDoneEndpoint")); err != nil { return err } - if len(t.Log) > cbg.MaxLength { - return xerrors.Errorf("Slice value in field t.Log was too long") + if len(t.RemoteSealingDoneEndpoint) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.RemoteSealingDoneEndpoint was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajArray, uint64(len(t.Log))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteSealingDoneEndpoint))); err != nil { return err } - for _, v := range t.Log { - if err := v.MarshalCBOR(cw); err != nil { - return err - } + if _, err := io.WriteString(w, string(t.RemoteSealingDoneEndpoint)); err != nil { + return err } return nil } @@ -876,83 +876,114 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.State (sealing.SectorState) (string) - case "State": + // t.Log ([]sealing.Log) (slice) + case "Log": - { - sval, err := cbg.ReadString(cr) - if err != nil { + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + + if extra > cbg.MaxLength { + return fmt.Errorf("t.Log: array too large (%d)", extra) + } + + if maj != cbg.MajArray { + return fmt.Errorf("expected cbor array") + } + + if extra > 0 { + t.Log = make([]Log, extra) + } + + for i := 0; i < int(extra); i++ { + + var v Log + if err := v.UnmarshalCBOR(cr); err != nil { return err } - t.State = SectorState(sval) + t.Log[i] = v } - // t.SectorNumber (abi.SectorNumber) (uint64) - case "SectorNumber": + + // t.CommD (cid.Cid) (struct) + case "CommD": { - maj, extra, err = cr.ReadHeader() + b, err := cr.ReadByte() if err != nil { return err } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err + } + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.CommD: %w", err) + } + + t.CommD = &c } - t.SectorNumber = abi.SectorNumber(extra) } - // t.SectorType (abi.RegisteredSealProof) (int64) - case "SectorType": + // t.CommR (cid.Cid) (struct) + case "CommR": + { - maj, extra, err := cr.ReadHeader() - var extraI int64 + + b, err := cr.ReadByte() if err != nil { return err } - switch maj { - case cbg.MajUnsignedInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 positive overflow") + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err } - case cbg.MajNegativeInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.CommR: %w", err) } - extraI = -1 - extraI - default: - return fmt.Errorf("wrong type for int64 field: %d", maj) + + t.CommR = &c } - t.SectorType = abi.RegisteredSealProof(extraI) } - // t.CreationTime (int64) (int64) - case "CreationTime": + // t.Proof ([]uint8) (slice) + case "Proof": + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + + if extra > cbg.ByteArrayMaxLen { + return fmt.Errorf("t.Proof: byte array too large (%d)", extra) + } + if maj != cbg.MajByteString { + return fmt.Errorf("expected byte array") + } + + if extra > 0 { + t.Proof = make([]uint8, extra) + } + + if _, err := io.ReadFull(cr, t.Proof[:]); err != nil { + return err + } + // t.State (sealing.SectorState) (string) + case "State": + { - maj, extra, err := cr.ReadHeader() - var extraI int64 + sval, err := cbg.ReadString(cr) if err != nil { return err } - switch maj { - case cbg.MajUnsignedInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 positive overflow") - } - case cbg.MajNegativeInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") - } - extraI = -1 - extraI - default: - return fmt.Errorf("wrong type for int64 field: %d", maj) - } - t.CreationTime = int64(extraI) + t.State = SectorState(sval) } // t.Pieces ([]api.SectorPiece) (slice) case "Pieces": @@ -984,30 +1015,78 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { t.Pieces[i] = v } - // t.TicketValue (abi.SealRandomness) (slice) - case "TicketValue": + // t.Return (sealing.ReturnState) (string) + case "Return": + + { + sval, err := cbg.ReadString(cr) + if err != nil { + return err + } + + t.Return = ReturnState(sval) + } + // t.LastErr (string) (string) + case "LastErr": + + { + sval, err := cbg.ReadString(cr) + if err != nil { + return err + } + + t.LastErr = string(sval) + } + // t.CCPieces ([]api.SectorPiece) (slice) + case "CCPieces": maj, extra, err = cr.ReadHeader() if err != nil { return err } - if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.TicketValue: byte array too large (%d)", extra) + if extra > cbg.MaxLength { + return fmt.Errorf("t.CCPieces: array too large (%d)", extra) } - if maj != cbg.MajByteString { - return fmt.Errorf("expected byte array") + + if maj != cbg.MajArray { + return fmt.Errorf("expected cbor array") } if extra > 0 { - t.TicketValue = make([]uint8, extra) + t.CCPieces = make([]api.SectorPiece, extra) } - if _, err := io.ReadFull(cr, t.TicketValue[:]); err != nil { + for i := 0; i < int(extra); i++ { + + var v api.SectorPiece + if err := v.UnmarshalCBOR(cr); err != nil { + return err + } + + t.CCPieces[i] = v + } + + // t.CCUpdate (bool) (bool) + case "CCUpdate": + + maj, extra, err = cr.ReadHeader() + if err != nil { return err } - // t.TicketEpoch (abi.ChainEpoch) (int64) - case "TicketEpoch": + if maj != cbg.MajOther { + return fmt.Errorf("booleans must be major type 7") + } + switch extra { + case 20: + t.CCUpdate = false + case 21: + t.CCUpdate = true + default: + return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) + } + // t.SeedEpoch (abi.ChainEpoch) (int64) + case "SeedEpoch": { maj, extra, err := cr.ReadHeader() var extraI int64 @@ -1023,17 +1102,17 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: return fmt.Errorf("wrong type for int64 field: %d", maj) } - t.TicketEpoch = abi.ChainEpoch(extraI) + t.SeedEpoch = abi.ChainEpoch(extraI) } - // t.PreCommit1Out (storiface.PreCommit1Out) (slice) - case "PreCommit1Out": + // t.SeedValue (abi.InteractiveSealRandomness) (slice) + case "SeedValue": maj, extra, err = cr.ReadHeader() if err != nil { @@ -1041,67 +1120,73 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.PreCommit1Out: byte array too large (%d)", extra) + return fmt.Errorf("t.SeedValue: byte array too large (%d)", extra) } if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } if extra > 0 { - t.PreCommit1Out = make([]uint8, extra) + t.SeedValue = make([]uint8, extra) } - if _, err := io.ReadFull(cr, t.PreCommit1Out[:]); err != nil { + if _, err := io.ReadFull(cr, t.SeedValue[:]); err != nil { return err } - // t.CommD (cid.Cid) (struct) - case "CommD": - + // t.SectorType (abi.RegisteredSealProof) (int64) + case "SectorType": { - - b, err := cr.ReadByte() + maj, extra, err := cr.ReadHeader() + var extraI int64 if err != nil { return err } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err + switch maj { + case cbg.MajUnsignedInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 positive overflow") } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.CommD: %w", err) + case cbg.MajNegativeInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 negative overflow") } - - t.CommD = &c + extraI = -1 - extraI + default: + return fmt.Errorf("wrong type for int64 field: %d", maj) } + t.SectorType = abi.RegisteredSealProof(extraI) } - // t.CommR (cid.Cid) (struct) - case "CommR": - + // t.TicketEpoch (abi.ChainEpoch) (int64) + case "TicketEpoch": { - - b, err := cr.ReadByte() + maj, extra, err := cr.ReadHeader() + var extraI int64 if err != nil { return err } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err + switch maj { + case cbg.MajUnsignedInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 positive overflow") } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.CommR: %w", err) + case cbg.MajNegativeInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 negative overflow") } - - t.CommR = &c + extraI = -1 - extraI + default: + return fmt.Errorf("wrong type for int64 field: %d", maj) } + t.TicketEpoch = abi.ChainEpoch(extraI) } - // t.Proof ([]uint8) (slice) - case "Proof": + // t.TicketValue (abi.SealRandomness) (slice) + case "TicketValue": maj, extra, err = cr.ReadHeader() if err != nil { @@ -1109,64 +1194,47 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.Proof: byte array too large (%d)", extra) + return fmt.Errorf("t.TicketValue: byte array too large (%d)", extra) } if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } if extra > 0 { - t.Proof = make([]uint8, extra) + t.TicketValue = make([]uint8, extra) } - if _, err := io.ReadFull(cr, t.Proof[:]); err != nil { + if _, err := io.ReadFull(cr, t.TicketValue[:]); err != nil { return err } - // t.PreCommitDeposit (big.Int) (struct) - case "PreCommitDeposit": - - { - - if err := t.PreCommitDeposit.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PreCommitDeposit: %w", err) - } - - } - // t.PreCommitMessage (cid.Cid) (struct) - case "PreCommitMessage": - + // t.CreationTime (int64) (int64) + case "CreationTime": { - - b, err := cr.ReadByte() + maj, extra, err := cr.ReadHeader() + var extraI int64 if err != nil { return err } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err + switch maj { + case cbg.MajUnsignedInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 positive overflow") } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.PreCommitMessage: %w", err) + case cbg.MajNegativeInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 negative overflow") } - - t.PreCommitMessage = &c - } - - } - // t.PreCommitTipSet (types.TipSetKey) (struct) - case "PreCommitTipSet": - - { - - if err := t.PreCommitTipSet.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.PreCommitTipSet: %w", err) + extraI = -1 - extraI + default: + return fmt.Errorf("wrong type for int64 field: %d", maj) } + t.CreationTime = int64(extraI) } - // t.PreCommit2Fails (uint64) (uint64) - case "PreCommit2Fails": + // t.SectorNumber (abi.SectorNumber) (uint64) + case "SectorNumber": { @@ -1177,33 +1245,11 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { if maj != cbg.MajUnsignedInt { return fmt.Errorf("wrong type for uint64 field") } - t.PreCommit2Fails = uint64(extra) - - } - // t.SeedValue (abi.InteractiveSealRandomness) (slice) - case "SeedValue": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - - if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.SeedValue: byte array too large (%d)", extra) - } - if maj != cbg.MajByteString { - return fmt.Errorf("expected byte array") - } - - if extra > 0 { - t.SeedValue = make([]uint8, extra) - } + t.SectorNumber = abi.SectorNumber(extra) - if _, err := io.ReadFull(cr, t.SeedValue[:]); err != nil { - return err } - // t.SeedEpoch (abi.ChainEpoch) (int64) - case "SeedEpoch": + // t.TerminatedAt (abi.ChainEpoch) (int64) + case "TerminatedAt": { maj, extra, err := cr.ReadHeader() var extraI int64 @@ -1219,14 +1265,37 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { case cbg.MajNegativeInt: extraI = int64(extra) if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") + return fmt.Errorf("int64 negative overflow") } extraI = -1 - extraI default: return fmt.Errorf("wrong type for int64 field: %d", maj) } - t.SeedEpoch = abi.ChainEpoch(extraI) + t.TerminatedAt = abi.ChainEpoch(extraI) + } + // t.UpdateSealed (cid.Cid) (struct) + case "UpdateSealed": + + { + + b, err := cr.ReadByte() + if err != nil { + return err + } + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err + } + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.UpdateSealed: %w", err) + } + + t.UpdateSealed = &c + } + } // t.CommitMessage (cid.Cid) (struct) case "CommitMessage": @@ -1266,56 +1335,30 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { t.InvalidProofs = uint64(extra) } - // t.CCUpdate (bool) (bool) - case "CCUpdate": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") - } - switch extra { - case 20: - t.CCUpdate = false - case 21: - t.CCUpdate = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) - } - // t.CCPieces ([]api.SectorPiece) (slice) - case "CCPieces": + // t.PreCommit1Out (storiface.PreCommit1Out) (slice) + case "PreCommit1Out": maj, extra, err = cr.ReadHeader() if err != nil { return err } - if extra > cbg.MaxLength { - return fmt.Errorf("t.CCPieces: array too large (%d)", extra) + if extra > cbg.ByteArrayMaxLen { + return fmt.Errorf("t.PreCommit1Out: byte array too large (%d)", extra) } - - if maj != cbg.MajArray { - return fmt.Errorf("expected cbor array") + if maj != cbg.MajByteString { + return fmt.Errorf("expected byte array") } if extra > 0 { - t.CCPieces = make([]api.SectorPiece, extra) + t.PreCommit1Out = make([]uint8, extra) } - for i := 0; i < int(extra); i++ { - - var v api.SectorPiece - if err := v.UnmarshalCBOR(cr); err != nil { - return err - } - - t.CCPieces[i] = v + if _, err := io.ReadFull(cr, t.PreCommit1Out[:]); err != nil { + return err } - - // t.UpdateSealed (cid.Cid) (struct) - case "UpdateSealed": + // t.FaultReportMsg (cid.Cid) (struct) + case "FaultReportMsg": { @@ -1330,10 +1373,10 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { c, err := cbg.ReadCid(cr) if err != nil { - return xerrors.Errorf("failed to read cid field t.UpdateSealed: %w", err) + return xerrors.Errorf("failed to read cid field t.FaultReportMsg: %w", err) } - t.UpdateSealed = &c + t.FaultReportMsg = &c } } @@ -1360,30 +1403,33 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.ReplicaUpdateProof (storiface.ReplicaUpdateProof) (slice) - case "ReplicaUpdateProof": + // t.PreCommit2Fails (uint64) (uint64) + case "PreCommit2Fails": - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } + { - if extra > cbg.ByteArrayMaxLen { - return fmt.Errorf("t.ReplicaUpdateProof: byte array too large (%d)", extra) - } - if maj != cbg.MajByteString { - return fmt.Errorf("expected byte array") - } + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.PreCommit2Fails = uint64(extra) - if extra > 0 { - t.ReplicaUpdateProof = make([]uint8, extra) } + // t.PreCommitTipSet (types.TipSetKey) (struct) + case "PreCommitTipSet": + + { + + if err := t.PreCommitTipSet.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.PreCommitTipSet: %w", err) + } - if _, err := io.ReadFull(cr, t.ReplicaUpdateProof[:]); err != nil { - return err } - // t.ReplicaUpdateMessage (cid.Cid) (struct) - case "ReplicaUpdateMessage": + // t.RemoteDataCache (storiface.SectorLocation) (struct) + case "RemoteDataCache": { @@ -1395,18 +1441,25 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { if err := cr.UnreadByte(); err != nil { return err } - - c, err := cbg.ReadCid(cr) - if err != nil { - return xerrors.Errorf("failed to read cid field t.ReplicaUpdateMessage: %w", err) + t.RemoteDataCache = new(storiface.SectorLocation) + if err := t.RemoteDataCache.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.RemoteDataCache pointer: %w", err) } + } - t.ReplicaUpdateMessage = &c + } + // t.PreCommitDeposit (big.Int) (struct) + case "PreCommitDeposit": + + { + + if err := t.PreCommitDeposit.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.PreCommitDeposit: %w", err) } } - // t.FaultReportMsg (cid.Cid) (struct) - case "FaultReportMsg": + // t.PreCommitMessage (cid.Cid) (struct) + case "PreCommitMessage": { @@ -1421,23 +1474,32 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { c, err := cbg.ReadCid(cr) if err != nil { - return xerrors.Errorf("failed to read cid field t.FaultReportMsg: %w", err) + return xerrors.Errorf("failed to read cid field t.PreCommitMessage: %w", err) } - t.FaultReportMsg = &c + t.PreCommitMessage = &c } } - // t.Return (sealing.ReturnState) (string) - case "Return": + // t.RemoteDataSealed (storiface.SectorLocation) (struct) + case "RemoteDataSealed": { - sval, err := cbg.ReadString(cr) + + b, err := cr.ReadByte() if err != nil { return err } + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err + } + t.RemoteDataSealed = new(storiface.SectorLocation) + if err := t.RemoteDataSealed.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.RemoteDataSealed pointer: %w", err) + } + } - t.Return = ReturnState(sval) } // t.TerminateMessage (cid.Cid) (struct) case "TerminateMessage": @@ -1462,32 +1524,6 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.TerminatedAt (abi.ChainEpoch) (int64) - case "TerminatedAt": - { - maj, extra, err := cr.ReadHeader() - var extraI int64 - if err != nil { - return err - } - switch maj { - case cbg.MajUnsignedInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 positive overflow") - } - case cbg.MajNegativeInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") - } - extraI = -1 - extraI - default: - return fmt.Errorf("wrong type for int64 field: %d", maj) - } - - t.TerminatedAt = abi.ChainEpoch(extraI) - } // t.RemoteDataUnsealed (storiface.SectorLocation) (struct) case "RemoteDataUnsealed": @@ -1508,28 +1544,48 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.RemoteDataSealed (storiface.SectorLocation) (struct) - case "RemoteDataSealed": + // t.ReplicaUpdateProof (storiface.ReplicaUpdateProof) (slice) + case "ReplicaUpdateProof": - { + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } - b, err := cr.ReadByte() - if err != nil { - return err - } - if b != cbg.CborNull[0] { - if err := cr.UnreadByte(); err != nil { - return err - } - t.RemoteDataSealed = new(storiface.SectorLocation) - if err := t.RemoteDataSealed.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.RemoteDataSealed pointer: %w", err) - } - } + if extra > cbg.ByteArrayMaxLen { + return fmt.Errorf("t.ReplicaUpdateProof: byte array too large (%d)", extra) + } + if maj != cbg.MajByteString { + return fmt.Errorf("expected byte array") + } + + if extra > 0 { + t.ReplicaUpdateProof = make([]uint8, extra) + } + if _, err := io.ReadFull(cr, t.ReplicaUpdateProof[:]); err != nil { + return err } - // t.RemoteDataCache (storiface.SectorLocation) (struct) - case "RemoteDataCache": + // t.RemoteDataFinalized (bool) (bool) + case "RemoteDataFinalized": + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajOther { + return fmt.Errorf("booleans must be major type 7") + } + switch extra { + case 20: + t.RemoteDataFinalized = false + case 21: + t.RemoteDataFinalized = true + default: + return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) + } + // t.ReplicaUpdateMessage (cid.Cid) (struct) + case "ReplicaUpdateMessage": { @@ -1541,10 +1597,13 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { if err := cr.UnreadByte(); err != nil { return err } - t.RemoteDataCache = new(storiface.SectorLocation) - if err := t.RemoteDataCache.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.RemoteDataCache pointer: %w", err) + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.ReplicaUpdateMessage: %w", err) } + + t.ReplicaUpdateMessage = &c } } @@ -1581,64 +1640,6 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) { t.RemoteSealingDoneEndpoint = string(sval) } - // t.RemoteDataFinalized (bool) (bool) - case "RemoteDataFinalized": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - if maj != cbg.MajOther { - return fmt.Errorf("booleans must be major type 7") - } - switch extra { - case 20: - t.RemoteDataFinalized = false - case 21: - t.RemoteDataFinalized = true - default: - return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) - } - // t.LastErr (string) (string) - case "LastErr": - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.LastErr = string(sval) - } - // t.Log ([]sealing.Log) (slice) - case "Log": - - maj, extra, err = cr.ReadHeader() - if err != nil { - return err - } - - if extra > cbg.MaxLength { - return fmt.Errorf("t.Log: array too large (%d)", extra) - } - - if maj != cbg.MajArray { - return fmt.Errorf("expected cbor array") - } - - if extra > 0 { - t.Log = make([]Log, extra) - } - - for i := 0; i < int(extra); i++ { - - var v Log - if err := v.UnmarshalCBOR(cr); err != nil { - return err - } - - t.Log[i] = v - } default: // Field doesn't exist on this type, so ignore it @@ -1660,19 +1661,26 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return err } - // t.Timestamp (uint64) (uint64) - if len("Timestamp") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Timestamp\" was too long") + // t.Kind (string) (string) + if len("Kind") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Kind\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Timestamp"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Kind"))); err != nil { return err } - if _, err := io.WriteString(w, string("Timestamp")); err != nil { + if _, err := io.WriteString(w, string("Kind")); err != nil { return err } - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Timestamp)); err != nil { + if len(t.Kind) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.Kind was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil { + return err + } + if _, err := io.WriteString(w, string(t.Kind)); err != nil { return err } @@ -1722,28 +1730,22 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return err } - // t.Kind (string) (string) - if len("Kind") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Kind\" was too long") + // t.Timestamp (uint64) (uint64) + if len("Timestamp") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Timestamp\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Kind"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Timestamp"))); err != nil { return err } - if _, err := io.WriteString(w, string("Kind")); err != nil { + if _, err := io.WriteString(w, string("Timestamp")); err != nil { return err } - if len(t.Kind) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.Kind was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.Kind)); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Timestamp)); err != nil { return err } + return nil } @@ -1785,20 +1787,16 @@ func (t *Log) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Timestamp (uint64) (uint64) - case "Timestamp": + // t.Kind (string) (string) + case "Kind": { - - maj, extra, err = cr.ReadHeader() + sval, err := cbg.ReadString(cr) if err != nil { return err } - if maj != cbg.MajUnsignedInt { - return fmt.Errorf("wrong type for uint64 field") - } - t.Timestamp = uint64(extra) + t.Kind = string(sval) } // t.Trace (string) (string) case "Trace": @@ -1822,16 +1820,20 @@ func (t *Log) UnmarshalCBOR(r io.Reader) (err error) { t.Message = string(sval) } - // t.Kind (string) (string) - case "Kind": + // t.Timestamp (uint64) (uint64) + case "Timestamp": { - sval, err := cbg.ReadString(cr) + + maj, extra, err = cr.ReadHeader() if err != nil { return err } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.Timestamp = uint64(extra) - t.Kind = string(sval) } default: diff --git a/storage/sealer/cbor_gen.go b/storage/sealer/cbor_gen.go index 48bf0146a45..4fa7fd98042 100644 --- a/storage/sealer/cbor_gen.go +++ b/storage/sealer/cbor_gen.go @@ -48,29 +48,6 @@ func (t *Call) MarshalCBOR(w io.Writer) error { return err } - // t.RetType (sealer.ReturnType) (string) - if len("RetType") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"RetType\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RetType"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("RetType")); err != nil { - return err - } - - if len(t.RetType) > cbg.MaxLength { - return xerrors.Errorf("Value in field t.RetType was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RetType))); err != nil { - return err - } - if _, err := io.WriteString(w, string(t.RetType)); err != nil { - return err - } - // t.State (sealer.CallState) (uint64) if len("State") > cbg.MaxLength { return xerrors.Errorf("Value in field \"State\" was too long") @@ -102,6 +79,29 @@ func (t *Call) MarshalCBOR(w io.Writer) error { if err := t.Result.MarshalCBOR(cw); err != nil { return err } + + // t.RetType (sealer.ReturnType) (string) + if len("RetType") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"RetType\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RetType"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("RetType")); err != nil { + return err + } + + if len(t.RetType) > cbg.MaxLength { + return xerrors.Errorf("Value in field t.RetType was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RetType))); err != nil { + return err + } + if _, err := io.WriteString(w, string(t.RetType)); err != nil { + return err + } return nil } @@ -153,17 +153,6 @@ func (t *Call) UnmarshalCBOR(r io.Reader) (err error) { } } - // t.RetType (sealer.ReturnType) (string) - case "RetType": - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.RetType = ReturnType(sval) - } // t.State (sealer.CallState) (uint64) case "State": @@ -199,6 +188,17 @@ func (t *Call) UnmarshalCBOR(r io.Reader) (err error) { } } + // t.RetType (sealer.ReturnType) (string) + case "RetType": + + { + sval, err := cbg.ReadString(cr) + if err != nil { + return err + } + + t.RetType = ReturnType(sval) + } default: // Field doesn't exist on this type, so ignore it @@ -259,20 +259,26 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error { return err } - // t.WorkerCall (storiface.CallID) (struct) - if len("WorkerCall") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"WorkerCall\" was too long") + // t.StartTime (int64) (int64) + if len("StartTime") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"StartTime\" was too long") } - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WorkerCall"))); err != nil { + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartTime"))); err != nil { return err } - if _, err := io.WriteString(w, string("WorkerCall")); err != nil { + if _, err := io.WriteString(w, string("StartTime")); err != nil { return err } - if err := t.WorkerCall.MarshalCBOR(cw); err != nil { - return err + if t.StartTime >= 0 { + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.StartTime)); err != nil { + return err + } + } else { + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.StartTime-1)); err != nil { + return err + } } // t.WorkError (string) (string) @@ -298,6 +304,22 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error { return err } + // t.WorkerCall (storiface.CallID) (struct) + if len("WorkerCall") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"WorkerCall\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WorkerCall"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("WorkerCall")); err != nil { + return err + } + + if err := t.WorkerCall.MarshalCBOR(cw); err != nil { + return err + } + // t.WorkerHostname (string) (string) if len("WorkerHostname") > cbg.MaxLength { return xerrors.Errorf("Value in field \"WorkerHostname\" was too long") @@ -320,28 +342,6 @@ func (t *WorkState) MarshalCBOR(w io.Writer) error { if _, err := io.WriteString(w, string(t.WorkerHostname)); err != nil { return err } - - // t.StartTime (int64) (int64) - if len("StartTime") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"StartTime\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartTime"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("StartTime")); err != nil { - return err - } - - if t.StartTime >= 0 { - if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.StartTime)); err != nil { - return err - } - } else { - if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.StartTime-1)); err != nil { - return err - } - } return nil } @@ -404,15 +404,31 @@ func (t *WorkState) UnmarshalCBOR(r io.Reader) (err error) { t.Status = WorkStatus(sval) } - // t.WorkerCall (storiface.CallID) (struct) - case "WorkerCall": - + // t.StartTime (int64) (int64) + case "StartTime": { - - if err := t.WorkerCall.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.WorkerCall: %w", err) + maj, extra, err := cr.ReadHeader() + var extraI int64 + if err != nil { + return err + } + switch maj { + case cbg.MajUnsignedInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 positive overflow") + } + case cbg.MajNegativeInt: + extraI = int64(extra) + if extraI < 0 { + return fmt.Errorf("int64 negative overflow") + } + extraI = -1 - extraI + default: + return fmt.Errorf("wrong type for int64 field: %d", maj) } + t.StartTime = int64(extraI) } // t.WorkError (string) (string) case "WorkError": @@ -425,42 +441,26 @@ func (t *WorkState) UnmarshalCBOR(r io.Reader) (err error) { t.WorkError = string(sval) } - // t.WorkerHostname (string) (string) - case "WorkerHostname": + // t.WorkerCall (storiface.CallID) (struct) + case "WorkerCall": { - sval, err := cbg.ReadString(cr) - if err != nil { - return err + + if err := t.WorkerCall.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.WorkerCall: %w", err) } - t.WorkerHostname = string(sval) } - // t.StartTime (int64) (int64) - case "StartTime": + // t.WorkerHostname (string) (string) + case "WorkerHostname": + { - maj, extra, err := cr.ReadHeader() - var extraI int64 + sval, err := cbg.ReadString(cr) if err != nil { return err } - switch maj { - case cbg.MajUnsignedInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 positive overflow") - } - case cbg.MajNegativeInt: - extraI = int64(extra) - if extraI < 0 { - return fmt.Errorf("int64 negative oveflow") - } - extraI = -1 - extraI - default: - return fmt.Errorf("wrong type for int64 field: %d", maj) - } - t.StartTime = int64(extraI) + t.WorkerHostname = string(sval) } default: diff --git a/storage/sealer/storiface/cbor_gen.go b/storage/sealer/storiface/cbor_gen.go index 73a299dec74..2f82da3e6ef 100644 --- a/storage/sealer/storiface/cbor_gen.go +++ b/storage/sealer/storiface/cbor_gen.go @@ -30,22 +30,6 @@ func (t *CallID) MarshalCBOR(w io.Writer) error { return err } - // t.Sector (abi.SectorID) (struct) - if len("Sector") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Sector\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Sector"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("Sector")); err != nil { - return err - } - - if err := t.Sector.MarshalCBOR(cw); err != nil { - return err - } - // t.ID (uuid.UUID) (array) if len("ID") > cbg.MaxLength { return xerrors.Errorf("Value in field \"ID\" was too long") @@ -69,6 +53,22 @@ func (t *CallID) MarshalCBOR(w io.Writer) error { if _, err := cw.Write(t.ID[:]); err != nil { return err } + + // t.Sector (abi.SectorID) (struct) + if len("Sector") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Sector\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Sector"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("Sector")); err != nil { + return err + } + + if err := t.Sector.MarshalCBOR(cw); err != nil { + return err + } return nil } @@ -110,17 +110,7 @@ func (t *CallID) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Sector (abi.SectorID) (struct) - case "Sector": - - { - - if err := t.Sector.UnmarshalCBOR(cr); err != nil { - return xerrors.Errorf("unmarshaling t.Sector: %w", err) - } - - } - // t.ID (uuid.UUID) (array) + // t.ID (uuid.UUID) (array) case "ID": maj, extra, err = cr.ReadHeader() @@ -144,6 +134,16 @@ func (t *CallID) UnmarshalCBOR(r io.Reader) (err error) { if _, err := io.ReadFull(cr, t.ID[:]); err != nil { return err } + // t.Sector (abi.SectorID) (struct) + case "Sector": + + { + + if err := t.Sector.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Sector: %w", err) + } + + } default: // Field doesn't exist on this type, so ignore it @@ -294,22 +294,6 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error { return err } - // t.Local (bool) (bool) - if len("Local") > cbg.MaxLength { - return xerrors.Errorf("Value in field \"Local\" was too long") - } - - if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Local"))); err != nil { - return err - } - if _, err := io.WriteString(w, string("Local")); err != nil { - return err - } - - if err := cbg.WriteBool(w, t.Local); err != nil { - return err - } - // t.URL (string) (string) if len("URL") > cbg.MaxLength { return xerrors.Errorf("Value in field \"URL\" was too long") @@ -333,6 +317,22 @@ func (t *SectorLocation) MarshalCBOR(w io.Writer) error { return err } + // t.Local (bool) (bool) + if len("Local") > cbg.MaxLength { + return xerrors.Errorf("Value in field \"Local\" was too long") + } + + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Local"))); err != nil { + return err + } + if _, err := io.WriteString(w, string("Local")); err != nil { + return err + } + + if err := cbg.WriteBool(w, t.Local); err != nil { + return err + } + // t.Headers ([]storiface.SecDataHttpHeader) (slice) if len("Headers") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Headers\" was too long") @@ -398,7 +398,18 @@ func (t *SectorLocation) UnmarshalCBOR(r io.Reader) (err error) { } switch name { - // t.Local (bool) (bool) + // t.URL (string) (string) + case "URL": + + { + sval, err := cbg.ReadString(cr) + if err != nil { + return err + } + + t.URL = string(sval) + } + // t.Local (bool) (bool) case "Local": maj, extra, err = cr.ReadHeader() @@ -416,17 +427,6 @@ func (t *SectorLocation) UnmarshalCBOR(r io.Reader) (err error) { default: return fmt.Errorf("booleans are either major type 7, value 20 or 21 (got %d)", extra) } - // t.URL (string) (string) - case "URL": - - { - sval, err := cbg.ReadString(cr) - if err != nil { - return err - } - - t.URL = string(sval) - } // t.Headers ([]storiface.SecDataHttpHeader) (slice) case "Headers":