diff --git a/chain/blocksync/cbor_gen.go b/chain/blocksync/cbor_gen.go index 585421ff529..ad8e1de7f2d 100644 --- a/chain/blocksync/cbor_gen.go +++ b/chain/blocksync/cbor_gen.go @@ -7,7 +7,7 @@ import ( "io" "github.com/filecoin-project/lotus/chain/types" - cid "github.com/ipfs/go-cid" + "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) @@ -625,16 +625,14 @@ func (t *BSTipSet) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.Messages = new(CompactedMessages) if err := t.Messages.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.Messages pointer: %w", err) diff --git a/chain/events/state/predicates_test.go b/chain/events/state/predicates_test.go index bdb323e71d0..27354105ef9 100644 --- a/chain/events/state/predicates_test.go +++ b/chain/events/state/predicates_test.go @@ -537,26 +537,23 @@ func createEmptyMinerState(ctx context.Context, t *testing.T, store adt.Store, o emptyMap, err := adt.MakeEmptyMap(store).Root() require.NoError(t, err) - emptyDeadline, err := store.Put(context.TODO(), &miner.Deadline{ - Partitions: emptyArrayCid, - ExpirationsEpochs: emptyArrayCid, - PostSubmissions: bitfield.New(), - EarlyTerminations: bitfield.New(), - LiveSectors: 0, - }) + emptyDeadline, err := store.Put(store.Context(), miner.ConstructDeadline(emptyArrayCid)) require.NoError(t, err) + emptyVestingFunds := miner.ConstructVestingFunds() + emptyVestingFundsCid, err := store.Put(store.Context(), emptyVestingFunds) + emptyDeadlines := miner.ConstructDeadlines(emptyDeadline) - emptyDeadlinesCid, err := store.Put(context.Background(), emptyDeadlines) + emptyDeadlinesCid, err := store.Put(store.Context(), emptyDeadlines) require.NoError(t, err) minerInfo := emptyMap emptyBitfield := bitfield.NewFromSet(nil) - emptyBitfieldCid, err := store.Put(context.Background(), emptyBitfield) + emptyBitfieldCid, err := store.Put(store.Context(), emptyBitfield) require.NoError(t, err) - state, err := miner.ConstructState(minerInfo, 123, emptyBitfieldCid, emptyArrayCid, emptyMap, emptyDeadlinesCid) + state, err := miner.ConstructState(minerInfo, 123, emptyBitfieldCid, emptyArrayCid, emptyMap, emptyDeadlinesCid, emptyVestingFundsCid) require.NoError(t, err) return state diff --git a/chain/state/statetree.go b/chain/state/statetree.go index 3280590e287..5bac856b711 100644 --- a/chain/state/statetree.go +++ b/chain/state/statetree.go @@ -170,7 +170,10 @@ func (st *StateTree) LookupID(addr address.Address) (address.Address, error) { return address.Undef, xerrors.Errorf("loading init actor state: %w", err) } - a, err := ias.ResolveAddress(&AdtStore{st.Store}, addr) + a, found, err := ias.ResolveAddress(&AdtStore{st.Store}, addr) + if err == nil && !found { + err = types.ErrActorNotFound + } if err != nil { return address.Undef, xerrors.Errorf("resolve address %s: %w", addr, err) } @@ -189,7 +192,7 @@ func (st *StateTree) GetActor(addr address.Address) (*types.Actor, error) { // Transform `addr` to its ID format. iaddr, err := st.LookupID(addr) if err != nil { - if xerrors.Is(err, init_.ErrAddressNotFound) { + if xerrors.Is(err, types.ErrActorNotFound) { return nil, xerrors.Errorf("resolution lookup failed (%s): %w", addr, err) } return nil, xerrors.Errorf("address resolution: %w", err) @@ -224,7 +227,7 @@ func (st *StateTree) DeleteActor(addr address.Address) error { iaddr, err := st.LookupID(addr) if err != nil { - if xerrors.Is(err, init_.ErrAddressNotFound) { + if xerrors.Is(err, types.ErrActorNotFound) { return xerrors.Errorf("resolution lookup failed (%s): %w", addr, err) } return xerrors.Errorf("address resolution: %w", err) diff --git a/chain/types/actor.go b/chain/types/actor.go index 56aa557351f..bb56359951c 100644 --- a/chain/types/actor.go +++ b/chain/types/actor.go @@ -1,13 +1,14 @@ package types import ( + "errors" + "github.com/ipfs/go-cid" "github.com/filecoin-project/specs-actors/actors/builtin" - init_ "github.com/filecoin-project/specs-actors/actors/builtin/init" ) -var ErrActorNotFound = init_.ErrAddressNotFound +var ErrActorNotFound = errors.New("actor not found") type Actor struct { // Identifies the type of actor (string coded as a CID), see `chain/actors/actors.go`. diff --git a/chain/types/cbor_gen.go b/chain/types/cbor_gen.go index eee2b3c44f8..451971aca45 100644 --- a/chain/types/cbor_gen.go +++ b/chain/types/cbor_gen.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/filecoin-project/specs-actors/actors/runtime/exitcode" - cid "github.com/ipfs/go-cid" + "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) @@ -180,16 +180,14 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.Ticket = new(Ticket) if err := t.Ticket.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.Ticket pointer: %w", err) @@ -201,16 +199,14 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.ElectionProof = new(ElectionProof) if err := t.ElectionProof.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.ElectionProof pointer: %w", err) @@ -378,16 +374,14 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.BLSAggregate = new(crypto.Signature) if err := t.BLSAggregate.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.BLSAggregate pointer: %w", err) @@ -413,16 +407,14 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.BlockSig = new(crypto.Signature) if err := t.BlockSig.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.BlockSig pointer: %w", err) @@ -1337,16 +1329,14 @@ func (t *BlockMsg) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.Header = new(BlockHeader) if err := t.Header.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.Header pointer: %w", err) diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index 5ab0dd3b782..33a4de55c46 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -14,7 +14,6 @@ import ( "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/specs-actors/actors/builtin" - sainit "github.com/filecoin-project/specs-actors/actors/builtin/init" sapower "github.com/filecoin-project/specs-actors/actors/builtin/power" "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/filecoin-project/specs-actors/actors/runtime" @@ -123,7 +122,7 @@ func (rt *Runtime) TotalFilCircSupply() abi.TokenAmount { func (rt *Runtime) ResolveAddress(addr address.Address) (ret address.Address, ok bool) { r, err := rt.state.LookupID(addr) if err != nil { - if xerrors.Is(err, sainit.ErrAddressNotFound) { + if xerrors.Is(err, types.ErrActorNotFound) { return address.Undef, false } panic(aerrors.Fatalf("failed to resolve address %s: %s", addr, err)) @@ -232,7 +231,19 @@ func (rt *Runtime) GetActorCodeCID(addr address.Address) (ret cid.Cid, ok bool) return act.Code, true } -func (rt *Runtime) GetRandomness(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness { +// FIXME stub +func (rt *Runtime) GetRandomnessFromTickets(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness { + // TODO: Make this actually get rand from tickets + res, err := rt.vm.rand.GetRandomness(rt.ctx, personalization, randEpoch, entropy) + if err != nil { + panic(aerrors.Fatalf("could not get randomness: %s", err)) + } + return res +} + +// FIXME stub +func (rt *Runtime) GetRandomnessFromBeacon(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness { + // TODO: Make this actually get rand from beacon res, err := rt.vm.rand.GetRandomness(rt.ctx, personalization, randEpoch, entropy) if err != nil { panic(aerrors.Fatalf("could not get randomness: %s", err)) diff --git a/chain/vm/vm.go b/chain/vm/vm.go index 2d1623cd21c..807edae4129 100644 --- a/chain/vm/vm.go +++ b/chain/vm/vm.go @@ -24,7 +24,6 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/specs-actors/actors/abi" "github.com/filecoin-project/specs-actors/actors/builtin/account" - init_ "github.com/filecoin-project/specs-actors/actors/builtin/init" "github.com/filecoin-project/specs-actors/actors/crypto" "github.com/filecoin-project/specs-actors/actors/runtime/exitcode" @@ -240,7 +239,7 @@ func (vm *VM) send(ctx context.Context, msg *types.Message, parent *Runtime, _ = rt.chargeGasSafe(newGasCharge("OnGetActor", 0, 0)) toActor, err := st.GetActor(msg.To) if err != nil { - if xerrors.Is(err, init_.ErrAddressNotFound) { + if xerrors.Is(err, types.ErrActorNotFound) { a, err := TryCreateAccountActor(rt, msg.To) if err != nil { return nil, aerrors.Wrapf(err, "could not create account") diff --git a/extern/storage-fsm/cbor_gen.go b/extern/storage-fsm/cbor_gen.go index 9410e6f287e..99f3e10c420 100644 --- a/extern/storage-fsm/cbor_gen.go +++ b/extern/storage-fsm/cbor_gen.go @@ -28,10 +28,10 @@ func (t *Piece) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Piece\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Piece")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Piece"))); err != nil { return err } - if _, err := w.Write([]byte("Piece")); err != nil { + if _, err := io.WriteString(w, string("Piece")); err != nil { return err } @@ -44,10 +44,10 @@ func (t *Piece) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"DealInfo\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("DealInfo")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("DealInfo"))); err != nil { return err } - if _, err := w.Write([]byte("DealInfo")); err != nil { + if _, err := io.WriteString(w, string("DealInfo")); err != nil { return err } @@ -58,9 +58,12 @@ func (t *Piece) MarshalCBOR(w io.Writer) error { } func (t *Piece) UnmarshalCBOR(r io.Reader) error { + *t = Piece{} + br := cbg.GetPeeker(r) + scratch := make([]byte, 8) - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -78,7 +81,7 @@ func (t *Piece) UnmarshalCBOR(r io.Reader) error { for i := uint64(0); i < n; i++ { { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -102,16 +105,14 @@ func (t *Piece) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.DealInfo = new(DealInfo) if err := t.DealInfo.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.DealInfo pointer: %w", err) @@ -136,19 +137,21 @@ func (t *DealInfo) MarshalCBOR(w io.Writer) error { return err } + scratch := make([]byte, 9) + // t.DealID (abi.DealID) (uint64) if len("DealID") > cbg.MaxLength { return xerrors.Errorf("Value in field \"DealID\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("DealID")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("DealID"))); err != nil { return err } - if _, err := w.Write([]byte("DealID")); err != nil { + if _, err := io.WriteString(w, string("DealID")); err != nil { return err } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.DealID))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.DealID)); err != nil { return err } @@ -157,10 +160,10 @@ func (t *DealInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"DealSchedule\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("DealSchedule")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("DealSchedule"))); err != nil { return err } - if _, err := w.Write([]byte("DealSchedule")); err != nil { + if _, err := io.WriteString(w, string("DealSchedule")); err != nil { return err } @@ -173,10 +176,10 @@ func (t *DealInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"KeepUnsealed\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("KeepUnsealed")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("KeepUnsealed"))); err != nil { return err } - if _, err := w.Write([]byte("KeepUnsealed")); err != nil { + if _, err := io.WriteString(w, string("KeepUnsealed")); err != nil { return err } @@ -187,9 +190,12 @@ func (t *DealInfo) MarshalCBOR(w io.Writer) error { } func (t *DealInfo) UnmarshalCBOR(r io.Reader) error { + *t = DealInfo{} + br := cbg.GetPeeker(r) + scratch := make([]byte, 8) - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -207,7 +213,7 @@ func (t *DealInfo) UnmarshalCBOR(r io.Reader) error { for i := uint64(0); i < n; i++ { { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -221,7 +227,7 @@ func (t *DealInfo) UnmarshalCBOR(r io.Reader) error { { - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -244,7 +250,7 @@ func (t *DealInfo) UnmarshalCBOR(r io.Reader) error { // t.KeepUnsealed (bool) (bool) case "KeepUnsealed": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -276,24 +282,26 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error { return err } + scratch := make([]byte, 9) + // t.StartEpoch (abi.ChainEpoch) (int64) if len("StartEpoch") > cbg.MaxLength { return xerrors.Errorf("Value in field \"StartEpoch\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("StartEpoch")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("StartEpoch"))); err != nil { return err } - if _, err := w.Write([]byte("StartEpoch")); err != nil { + if _, err := io.WriteString(w, string("StartEpoch")); err != nil { return err } if t.StartEpoch >= 0 { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.StartEpoch))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.StartEpoch)); err != nil { return err } } else { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajNegativeInt, uint64(-t.StartEpoch)-1)); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajNegativeInt, uint64(-t.StartEpoch-1)); err != nil { return err } } @@ -303,19 +311,19 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"EndEpoch\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("EndEpoch")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("EndEpoch"))); err != nil { return err } - if _, err := w.Write([]byte("EndEpoch")); err != nil { + if _, err := io.WriteString(w, string("EndEpoch")); err != nil { return err } if t.EndEpoch >= 0 { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.EndEpoch))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.EndEpoch)); err != nil { return err } } else { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajNegativeInt, uint64(-t.EndEpoch)-1)); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajNegativeInt, uint64(-t.EndEpoch-1)); err != nil { return err } } @@ -323,9 +331,12 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error { } func (t *DealSchedule) UnmarshalCBOR(r io.Reader) error { + *t = DealSchedule{} + br := cbg.GetPeeker(r) + scratch := make([]byte, 8) - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -343,7 +354,7 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) error { for i := uint64(0); i < n; i++ { { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -355,7 +366,7 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) error { // t.StartEpoch (abi.ChainEpoch) (int64) case "StartEpoch": { - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) var extraI int64 if err != nil { return err @@ -381,7 +392,7 @@ func (t *DealSchedule) UnmarshalCBOR(r io.Reader) error { // t.EndEpoch (abi.ChainEpoch) (int64) case "EndEpoch": { - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) var extraI int64 if err != nil { return err @@ -421,15 +432,17 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } + scratch := make([]byte, 9) + // t.State (sealing.SectorState) (string) if len("State") > cbg.MaxLength { return xerrors.Errorf("Value in field \"State\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("State")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("State"))); err != nil { return err } - if _, err := w.Write([]byte("State")); err != nil { + if _, err := io.WriteString(w, string("State")); err != nil { return err } @@ -437,10 +450,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field t.State was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len(t.State)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len(t.State))); err != nil { return err } - if _, err := w.Write([]byte(t.State)); err != nil { + if _, err := io.WriteString(w, string(t.State)); err != nil { return err } @@ -449,14 +462,14 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"SectorNumber\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("SectorNumber")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("SectorNumber"))); err != nil { return err } - if _, err := w.Write([]byte("SectorNumber")); err != nil { + if _, err := io.WriteString(w, string("SectorNumber")); err != nil { return err } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.SectorNumber))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.SectorNumber)); err != nil { return err } @@ -465,19 +478,19 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"SectorType\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("SectorType")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("SectorType"))); err != nil { return err } - if _, err := w.Write([]byte("SectorType")); err != nil { + if _, err := io.WriteString(w, string("SectorType")); err != nil { return err } if t.SectorType >= 0 { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.SectorType))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.SectorType)); err != nil { return err } } else { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajNegativeInt, uint64(-t.SectorType)-1)); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajNegativeInt, uint64(-t.SectorType-1)); err != nil { return err } } @@ -487,10 +500,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Pieces\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Pieces")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Pieces"))); err != nil { return err } - if _, err := w.Write([]byte("Pieces")); err != nil { + if _, err := io.WriteString(w, string("Pieces")); err != nil { return err } @@ -498,7 +511,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Slice value in field t.Pieces was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajArray, uint64(len(t.Pieces)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajArray, uint64(len(t.Pieces))); err != nil { return err } for _, v := range t.Pieces { @@ -512,10 +525,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"TicketValue\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("TicketValue")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("TicketValue"))); err != nil { return err } - if _, err := w.Write([]byte("TicketValue")); err != nil { + if _, err := io.WriteString(w, string("TicketValue")); err != nil { return err } @@ -523,10 +536,11 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Byte array in field t.TicketValue was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.TicketValue)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajByteString, uint64(len(t.TicketValue))); err != nil { return err } - if _, err := w.Write(t.TicketValue); err != nil { + + if _, err := w.Write(t.TicketValue[:]); err != nil { return err } @@ -535,19 +549,19 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"TicketEpoch\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("TicketEpoch")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("TicketEpoch"))); err != nil { return err } - if _, err := w.Write([]byte("TicketEpoch")); err != nil { + if _, err := io.WriteString(w, string("TicketEpoch")); err != nil { return err } if t.TicketEpoch >= 0 { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.TicketEpoch))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.TicketEpoch)); err != nil { return err } } else { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajNegativeInt, uint64(-t.TicketEpoch)-1)); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajNegativeInt, uint64(-t.TicketEpoch-1)); err != nil { return err } } @@ -557,10 +571,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommit1Out\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommit1Out")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommit1Out"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommit1Out")); err != nil { + if _, err := io.WriteString(w, string("PreCommit1Out")); err != nil { return err } @@ -568,10 +582,11 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Byte array in field t.PreCommit1Out was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.PreCommit1Out)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajByteString, uint64(len(t.PreCommit1Out))); err != nil { return err } - if _, err := w.Write(t.PreCommit1Out); err != nil { + + if _, err := w.Write(t.PreCommit1Out[:]); err != nil { return err } @@ -580,10 +595,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"CommD\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("CommD")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("CommD"))); err != nil { return err } - if _, err := w.Write([]byte("CommD")); err != nil { + if _, err := io.WriteString(w, string("CommD")); err != nil { return err } @@ -592,7 +607,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } } else { - if err := cbg.WriteCid(w, *t.CommD); err != nil { + if err := cbg.WriteCidBuf(scratch, w, *t.CommD); err != nil { return xerrors.Errorf("failed to write cid field t.CommD: %w", err) } } @@ -602,10 +617,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"CommR\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("CommR")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("CommR"))); err != nil { return err } - if _, err := w.Write([]byte("CommR")); err != nil { + if _, err := io.WriteString(w, string("CommR")); err != nil { return err } @@ -614,7 +629,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } } else { - if err := cbg.WriteCid(w, *t.CommR); err != nil { + if err := cbg.WriteCidBuf(scratch, w, *t.CommR); err != nil { return xerrors.Errorf("failed to write cid field t.CommR: %w", err) } } @@ -624,10 +639,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Proof\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Proof")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Proof"))); err != nil { return err } - if _, err := w.Write([]byte("Proof")); err != nil { + if _, err := io.WriteString(w, string("Proof")); err != nil { return err } @@ -635,10 +650,11 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Byte array in field t.Proof was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.Proof)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajByteString, uint64(len(t.Proof))); err != nil { return err } - if _, err := w.Write(t.Proof); err != nil { + + if _, err := w.Write(t.Proof[:]); err != nil { return err } @@ -647,10 +663,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommitInfo\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommitInfo")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommitInfo"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommitInfo")); err != nil { + if _, err := io.WriteString(w, string("PreCommitInfo")); err != nil { return err } @@ -663,10 +679,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommitDeposit\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommitDeposit")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommitDeposit"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommitDeposit")); err != nil { + if _, err := io.WriteString(w, string("PreCommitDeposit")); err != nil { return err } @@ -679,10 +695,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommitMessage\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommitMessage")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommitMessage"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommitMessage")); err != nil { + if _, err := io.WriteString(w, string("PreCommitMessage")); err != nil { return err } @@ -691,7 +707,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } } else { - if err := cbg.WriteCid(w, *t.PreCommitMessage); err != nil { + if err := cbg.WriteCidBuf(scratch, w, *t.PreCommitMessage); err != nil { return xerrors.Errorf("failed to write cid field t.PreCommitMessage: %w", err) } } @@ -701,10 +717,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommitTipSet\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommitTipSet")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommitTipSet"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommitTipSet")); err != nil { + if _, err := io.WriteString(w, string("PreCommitTipSet")); err != nil { return err } @@ -712,10 +728,11 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Byte array in field t.PreCommitTipSet was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.PreCommitTipSet)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajByteString, uint64(len(t.PreCommitTipSet))); err != nil { return err } - if _, err := w.Write(t.PreCommitTipSet); err != nil { + + if _, err := w.Write(t.PreCommitTipSet[:]); err != nil { return err } @@ -724,14 +741,14 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"PreCommit2Fails\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("PreCommit2Fails")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("PreCommit2Fails"))); err != nil { return err } - if _, err := w.Write([]byte("PreCommit2Fails")); err != nil { + if _, err := io.WriteString(w, string("PreCommit2Fails")); err != nil { return err } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.PreCommit2Fails))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.PreCommit2Fails)); err != nil { return err } @@ -740,10 +757,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"SeedValue\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("SeedValue")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("SeedValue"))); err != nil { return err } - if _, err := w.Write([]byte("SeedValue")); err != nil { + if _, err := io.WriteString(w, string("SeedValue")); err != nil { return err } @@ -751,10 +768,11 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Byte array in field t.SeedValue was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajByteString, uint64(len(t.SeedValue)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajByteString, uint64(len(t.SeedValue))); err != nil { return err } - if _, err := w.Write(t.SeedValue); err != nil { + + if _, err := w.Write(t.SeedValue[:]); err != nil { return err } @@ -763,19 +781,19 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"SeedEpoch\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("SeedEpoch")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("SeedEpoch"))); err != nil { return err } - if _, err := w.Write([]byte("SeedEpoch")); err != nil { + if _, err := io.WriteString(w, string("SeedEpoch")); err != nil { return err } if t.SeedEpoch >= 0 { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.SeedEpoch))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.SeedEpoch)); err != nil { return err } } else { - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajNegativeInt, uint64(-t.SeedEpoch)-1)); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajNegativeInt, uint64(-t.SeedEpoch-1)); err != nil { return err } } @@ -785,10 +803,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"CommitMessage\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("CommitMessage")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("CommitMessage"))); err != nil { return err } - if _, err := w.Write([]byte("CommitMessage")); err != nil { + if _, err := io.WriteString(w, string("CommitMessage")); err != nil { return err } @@ -797,7 +815,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } } else { - if err := cbg.WriteCid(w, *t.CommitMessage); err != nil { + if err := cbg.WriteCidBuf(scratch, w, *t.CommitMessage); err != nil { return xerrors.Errorf("failed to write cid field t.CommitMessage: %w", err) } } @@ -807,14 +825,14 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"InvalidProofs\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("InvalidProofs")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("InvalidProofs"))); err != nil { return err } - if _, err := w.Write([]byte("InvalidProofs")); err != nil { + if _, err := io.WriteString(w, string("InvalidProofs")); err != nil { return err } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.InvalidProofs))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.InvalidProofs)); err != nil { return err } @@ -823,10 +841,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"FaultReportMsg\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("FaultReportMsg")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("FaultReportMsg"))); err != nil { return err } - if _, err := w.Write([]byte("FaultReportMsg")); err != nil { + if _, err := io.WriteString(w, string("FaultReportMsg")); err != nil { return err } @@ -835,7 +853,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return err } } else { - if err := cbg.WriteCid(w, *t.FaultReportMsg); err != nil { + if err := cbg.WriteCidBuf(scratch, w, *t.FaultReportMsg); err != nil { return xerrors.Errorf("failed to write cid field t.FaultReportMsg: %w", err) } } @@ -845,10 +863,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"LastErr\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("LastErr")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("LastErr"))); err != nil { return err } - if _, err := w.Write([]byte("LastErr")); err != nil { + if _, err := io.WriteString(w, string("LastErr")); err != nil { return err } @@ -856,10 +874,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field t.LastErr was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len(t.LastErr)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len(t.LastErr))); err != nil { return err } - if _, err := w.Write([]byte(t.LastErr)); err != nil { + if _, err := io.WriteString(w, string(t.LastErr)); err != nil { return err } @@ -868,10 +886,10 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Log\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Log")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Log"))); err != nil { return err } - if _, err := w.Write([]byte("Log")); err != nil { + if _, err := io.WriteString(w, string("Log")); err != nil { return err } @@ -879,7 +897,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Slice value in field t.Log was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajArray, uint64(len(t.Log)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajArray, uint64(len(t.Log))); err != nil { return err } for _, v := range t.Log { @@ -891,9 +909,12 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error { } func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { + *t = SectorInfo{} + br := cbg.GetPeeker(r) + scratch := make([]byte, 8) - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -911,7 +932,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { for i := uint64(0); i < n; i++ { { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -924,7 +945,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { case "State": { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -936,7 +957,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -949,7 +970,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.SectorType (abi.RegisteredSealProof) (int64) case "SectorType": { - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) var extraI int64 if err != nil { return err @@ -975,7 +996,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.Pieces ([]sealing.Piece) (slice) case "Pieces": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1005,7 +1026,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.TicketValue (abi.SealRandomness) (slice) case "TicketValue": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1016,14 +1037,18 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } - t.TicketValue = make([]byte, extra) - if _, err := io.ReadFull(br, t.TicketValue); err != nil { + + if extra > 0 { + t.TicketValue = make([]uint8, extra) + } + + if _, err := io.ReadFull(br, t.TicketValue[:]); err != nil { return err } // t.TicketEpoch (abi.ChainEpoch) (int64) case "TicketEpoch": { - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) var extraI int64 if err != nil { return err @@ -1049,7 +1074,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.PreCommit1Out (storage.PreCommit1Out) (slice) case "PreCommit1Out": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1060,8 +1085,12 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } - t.PreCommit1Out = make([]byte, extra) - if _, err := io.ReadFull(br, t.PreCommit1Out); err != nil { + + if extra > 0 { + t.PreCommit1Out = make([]uint8, extra) + } + + if _, err := io.ReadFull(br, t.PreCommit1Out[:]); err != nil { return err } // t.CommD (cid.Cid) (struct) @@ -1069,16 +1098,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -1094,16 +1121,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -1117,7 +1142,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.Proof ([]uint8) (slice) case "Proof": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1128,8 +1153,12 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } - t.Proof = make([]byte, extra) - if _, err := io.ReadFull(br, t.Proof); err != nil { + + if extra > 0 { + t.Proof = make([]uint8, extra) + } + + if _, err := io.ReadFull(br, t.Proof[:]); err != nil { return err } // t.PreCommitInfo (miner.SectorPreCommitInfo) (struct) @@ -1137,16 +1166,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.PreCommitInfo = new(miner.SectorPreCommitInfo) if err := t.PreCommitInfo.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.PreCommitInfo pointer: %w", err) @@ -1169,16 +1196,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -1192,7 +1217,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.PreCommitTipSet (sealing.TipSetToken) (slice) case "PreCommitTipSet": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1203,8 +1228,12 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } - t.PreCommitTipSet = make([]byte, extra) - if _, err := io.ReadFull(br, t.PreCommitTipSet); err != nil { + + if extra > 0 { + t.PreCommitTipSet = make([]uint8, extra) + } + + if _, err := io.ReadFull(br, t.PreCommitTipSet[:]); err != nil { return err } // t.PreCommit2Fails (uint64) (uint64) @@ -1212,7 +1241,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1225,7 +1254,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.SeedValue (abi.InteractiveSealRandomness) (slice) case "SeedValue": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1236,14 +1265,18 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { if maj != cbg.MajByteString { return fmt.Errorf("expected byte array") } - t.SeedValue = make([]byte, extra) - if _, err := io.ReadFull(br, t.SeedValue); err != nil { + + if extra > 0 { + t.SeedValue = make([]uint8, extra) + } + + if _, err := io.ReadFull(br, t.SeedValue[:]); err != nil { return err } // t.SeedEpoch (abi.ChainEpoch) (int64) case "SeedEpoch": { - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) var extraI int64 if err != nil { return err @@ -1271,16 +1304,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -1296,7 +1327,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1311,16 +1342,14 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -1335,7 +1364,7 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { case "LastErr": { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -1345,12 +1374,12 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) error { // t.Log ([]sealing.Log) (slice) case "Log": - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } - if extra > cbg.MaxLength+1 { // +1 placed here to recover broken state machines in calibration net; feel free to drop + if extra > cbg.MaxLength { return fmt.Errorf("t.Log: array too large (%d)", extra) } @@ -1388,19 +1417,21 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return err } + scratch := make([]byte, 9) + // t.Timestamp (uint64) (uint64) if len("Timestamp") > cbg.MaxLength { return xerrors.Errorf("Value in field \"Timestamp\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Timestamp")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Timestamp"))); err != nil { return err } - if _, err := w.Write([]byte("Timestamp")); err != nil { + if _, err := io.WriteString(w, string("Timestamp")); err != nil { return err } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajUnsignedInt, uint64(t.Timestamp))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajUnsignedInt, uint64(t.Timestamp)); err != nil { return err } @@ -1409,10 +1440,10 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Trace\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Trace")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Trace"))); err != nil { return err } - if _, err := w.Write([]byte("Trace")); err != nil { + if _, err := io.WriteString(w, string("Trace")); err != nil { return err } @@ -1420,10 +1451,10 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field t.Trace was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len(t.Trace)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len(t.Trace))); err != nil { return err } - if _, err := w.Write([]byte(t.Trace)); err != nil { + if _, err := io.WriteString(w, string(t.Trace)); err != nil { return err } @@ -1432,10 +1463,10 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Message\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Message")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Message"))); err != nil { return err } - if _, err := w.Write([]byte("Message")); err != nil { + if _, err := io.WriteString(w, string("Message")); err != nil { return err } @@ -1443,10 +1474,10 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field t.Message was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len(t.Message)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len(t.Message))); err != nil { return err } - if _, err := w.Write([]byte(t.Message)); err != nil { + if _, err := io.WriteString(w, string(t.Message)); err != nil { return err } @@ -1455,10 +1486,10 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field \"Kind\" was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len("Kind")))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len("Kind"))); err != nil { return err } - if _, err := w.Write([]byte("Kind")); err != nil { + if _, err := io.WriteString(w, string("Kind")); err != nil { return err } @@ -1466,19 +1497,22 @@ func (t *Log) MarshalCBOR(w io.Writer) error { return xerrors.Errorf("Value in field t.Kind was too long") } - if _, err := w.Write(cbg.CborEncodeMajorType(cbg.MajTextString, uint64(len(t.Kind)))); err != nil { + if err := cbg.WriteMajorTypeHeaderBuf(scratch, w, cbg.MajTextString, uint64(len(t.Kind))); err != nil { return err } - if _, err := w.Write([]byte(t.Kind)); err != nil { + if _, err := io.WriteString(w, string(t.Kind)); err != nil { return err } return nil } func (t *Log) UnmarshalCBOR(r io.Reader) error { + *t = Log{} + br := cbg.GetPeeker(r) + scratch := make([]byte, 8) - maj, extra, err := cbg.CborReadHeader(br) + maj, extra, err := cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1496,7 +1530,7 @@ func (t *Log) UnmarshalCBOR(r io.Reader) error { for i := uint64(0); i < n; i++ { { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -1510,7 +1544,7 @@ func (t *Log) UnmarshalCBOR(r io.Reader) error { { - maj, extra, err = cbg.CborReadHeader(br) + maj, extra, err = cbg.CborReadHeaderBuf(br, scratch) if err != nil { return err } @@ -1524,7 +1558,7 @@ func (t *Log) UnmarshalCBOR(r io.Reader) error { case "Trace": { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -1535,7 +1569,7 @@ func (t *Log) UnmarshalCBOR(r io.Reader) error { case "Message": { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } @@ -1546,7 +1580,7 @@ func (t *Log) UnmarshalCBOR(r io.Reader) error { case "Kind": { - sval, err := cbg.ReadString(br) + sval, err := cbg.ReadStringBuf(br, scratch) if err != nil { return err } diff --git a/extern/storage-fsm/go.mod b/extern/storage-fsm/go.mod index 94fa760b1fa..4ed1dcfb270 100644 --- a/extern/storage-fsm/go.mod +++ b/extern/storage-fsm/go.mod @@ -3,30 +3,22 @@ module github.com/filecoin-project/storage-fsm go 1.13 require ( - github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be + github.com/filecoin-project/go-address v0.0.3 github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 - github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5 + github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 - github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663 // indirect - github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9 - github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15 - github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6 - github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea - github.com/ipfs/go-cid v0.0.6 + github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 // indirect + github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 + github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 + github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923 + github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 + github.com/ipfs/go-cid v0.0.7 github.com/ipfs/go-datastore v0.4.4 - github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242 // indirect - github.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669 // indirect - github.com/ipfs/go-log/v2 v2.0.3 - github.com/stretchr/testify v1.4.0 - github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d - go.uber.org/zap v1.14.1 // indirect - golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 // indirect - golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect - golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d // indirect - golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566 // indirect - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 + github.com/ipfs/go-log/v2 v2.0.5 + github.com/stretchr/testify v1.6.1 + github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 gotest.tools v2.2.0+incompatible - honnef.co/go/tools v0.0.1-2020.1.3 // indirect ) replace github.com/golangci/golangci-lint => github.com/golangci/golangci-lint v1.18.0 diff --git a/extern/storage-fsm/go.sum b/extern/storage-fsm/go.sum index 9375b3c64f5..6a0c4af8db0 100644 --- a/extern/storage-fsm/go.sum +++ b/extern/storage-fsm/go.sum @@ -27,47 +27,55 @@ github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7 github.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU= github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= +github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d h1:YVh0Q+1iUvbv7SIfwA/alULOlWjQNOEnV72rgeYweLY= +github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d/go.mod h1:XE4rWG1P7zWPaC11Pkn1CVR20stqN52MnMkIrF4q6ZU= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= +github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= +github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e h1:IOoff6yAZSJ5zHCPY2jzGNwQYQU6ygsRVe/cSnJrY+o= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 h1:jamfsxfK0Q9yCMHt8MPWx7Aa/O9k2Lve8eSc6FILYGQ= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.0 h1:t6qDiuGYYngDqaLc2ZUvdtAg4UNxPeOYaXhBWSNsVaM= +github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060 h1:/3qjGMn6ukXgZJHsIbuwGL7ipla8DOV3uHZDBJkBYfU= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1 h1:Xg/JnrqqE77aJVKdbEyR04n9FZQWhwrN+buDgQCVpZU= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1 h1:xuHlrdznafh7ul5t4xEncnA4qgpQvJZEw+mr98eqHXw= -github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= +github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= +github.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5 h1:yvQJCW9mmi9zy+51xA01Ea2X7/dL7r8eKDPuGUjRmbo= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= +github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.mod h1:0HgYnrkeSU4lu1p+LEOeDpFsNBssa0OGGriWdA4hvaE= -github.com/filecoin-project/go-paramfetch v0.0.1/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663 h1:eYxi6vI5CyeXD15X1bB3bledDXbqKxqf0wQzTLgwYwA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9 h1:k9qVR9ItcziSB2rxtlkN/MDWNlbsI6yzec+zjUatLW0= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= +github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= +github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= +github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 h1:KAF3WM/xSnl6G6RHX8vDJthg4+e4PSgBh72//6c6Qvc= +github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIiWBRilQjQ+5IiwdQ= github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= -github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15 h1:miw6hiusb/MkV1ryoqUKKWnvHhPW00AYtyeCj0L8pqo= -github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 h1:E1fZ27fhKK05bhZItfTwqr1i05vXnEZJznQFEYwEEUU= +github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0/go.mod h1:oOawOl9Yk+qeytLzzIryjI8iRbqo+qzS6EEeElP4PWA= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0 h1:QxgAuTrZr5TPqjyprZk0nTYW5o0JWpzbb5v+4UHHvN0= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= -github.com/filecoin-project/specs-actors v0.6.0 h1:IepUsmDGY60QliENVTkBTAkwqGWw9kNbbHOcU/9oiC0= -github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6 h1:F+GcBdKPdW/wTv6bMJxG9Zj1dc0UGkO6uNOQmKP/g1o= -github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= +github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923 h1:+H4IG4OjTThljPkMH1ZpynxCulNdx4amEeHoP2GdQJI= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -106,14 +114,17 @@ github.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= github.com/ipfs/go-cid v0.0.5 h1:o0Ix8e/ql7Zb5UVUJEUfjsWCIY8t48++9lR8qi6oiJU= github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= +github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.6 h1:go0y+GcDOGeJIV01FeBsta4FHngoA4Wz7KMeLkXAhMs= github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= +github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= +github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242 h1:OYVGeYkGSRZdBJ35JHPXQ9deQxlLtJ3Ln0FuaJOu6x8= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= +github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= +github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= github.com/ipfs/go-ipfs-files v0.0.7 h1:s5BRD12ndahqYifeH1S8Z73zqZhR+3IdKYAG9PiETs0= github.com/ipfs/go-ipfs-files v0.0.7/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs= @@ -129,11 +140,11 @@ github.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= github.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA= github.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I= -github.com/ipfs/go-log v1.0.3 h1:Gg7SUYSZ7BrqaKMwM+hRgcAkKv4QLfzP4XPQt5Sx/OI= -github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= +github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.3 h1:Q2gXcBoCALyLN/pUQlz1qgu0x3uFV6FzP9oXhpfyJpc= -github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= +github.com/ipfs/go-log/v2 v2.0.5 h1:fL4YI+1g5V/b1Yxr1qAiXTMg1H8z9vx/VmJxBuQMHvU= +github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c= github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= @@ -204,6 +215,8 @@ github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13 h1:06x+mk/zj1FoMsgNejLpy6QTvJqlSt/BhLEy87zidlc= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= +github.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I= +github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5 h1:XVZwSo04Cs3j/jS0uAEPpT3JY6DzMcVLLoWOSnCxOjg= @@ -245,6 +258,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830 h1:8kxMKmKzXXL4Ru1nyhvdms/JjWt+3YLpvRb/bAjO/y0= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= @@ -253,10 +268,13 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:X github.com/whyrusleeping/cbor-gen v0.0.0-20200206220010-03c9665e2a66/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e h1:JY8o/ebUUrCYetWmjRCNghxC59cOEaili83rxPRQCLw= github.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI= -github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d h1:wSxKhvbN7kUoP0sfRS+w2tWr45qlU8409i94hHLOT8w= -github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= +github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= +github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= +github.com/xorcare/golden v0.6.0 h1:E8emU8bhyMIEpYmgekkTUaw4vtcrRE+Wa0c5wYIcgXc= github.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -264,18 +282,15 @@ go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.1 h1:nYDKopTbvAPq/NrUVZwT15y2lpROBiLLyoRTbXOYWOo= go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -285,7 +300,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -293,7 +307,6 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -330,7 +343,6 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d h1:62ap6LNOjDU6uGmKXHJbSfciMoV+FeI1sRXx/pLDL44= golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -347,9 +359,7 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200108195415-316d2f248479/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566 h1:OXjomkWHhzUx4+HldlJ2TsMxJdWgEo5CTtspD1wdhdk= golang.org/x/tools v0.0.0-20200318150045-ba25ddc85566/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= @@ -357,6 +367,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -378,6 +390,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go.mod b/go.mod index 06ad51e5d60..87bc6c756f0 100644 --- a/go.mod +++ b/go.mod @@ -18,25 +18,25 @@ require ( github.com/drand/drand v1.0.3-0.20200714175734-29705eaf09d4 github.com/drand/kyber v1.1.1 github.com/fatih/color v1.8.0 - github.com/filecoin-project/chain-validation v0.0.6-0.20200807023228-a084d8d9919e + github.com/filecoin-project/chain-validation v0.0.6-0.20200810233933-b7655e154d21 github.com/filecoin-project/filecoin-ffi v0.30.4-0.20200716204036-cddc56607e1d - github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef + github.com/filecoin-project/go-address v0.0.3 github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 // indirect github.com/filecoin-project/go-bitfield v0.2.0 github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 - github.com/filecoin-project/go-data-transfer v0.5.3 + github.com/filecoin-project/go-data-transfer v0.6.0 github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f - github.com/filecoin-project/go-fil-markets v0.5.4 + github.com/filecoin-project/go-fil-markets v0.5.4-0.20200811210447-4b1ab3c87fcb github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 github.com/filecoin-project/go-multistore v0.0.3 github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/sector-storage v0.0.0-20200805173933-deec7a2658d4 - github.com/filecoin-project/specs-actors v0.8.7-0.20200805174427-9d42fb163883 - github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea + github.com/filecoin-project/sector-storage v0.0.0-20200810171746-eac70842d8e0 + github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923 + github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 github.com/filecoin-project/storage-fsm v0.0.0-20200805013058-9d9ea4e6331f github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 github.com/go-kit/kit v0.10.0 @@ -60,7 +60,7 @@ require ( github.com/ipfs/go-filestore v1.0.0 github.com/ipfs/go-fs-lock v0.0.1 github.com/ipfs/go-graphsync v0.1.0 - github.com/ipfs/go-ipfs-blockstore v1.0.0 + github.com/ipfs/go-ipfs-blockstore v1.0.1 github.com/ipfs/go-ipfs-chunker v0.0.5 github.com/ipfs/go-ipfs-ds-help v1.0.0 github.com/ipfs/go-ipfs-exchange-interface v0.0.1 @@ -72,7 +72,7 @@ require ( github.com/ipfs/go-ipld-format v0.2.0 github.com/ipfs/go-log v1.0.4 github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4 - github.com/ipfs/go-merkledag v0.3.1 + github.com/ipfs/go-merkledag v0.3.2 github.com/ipfs/go-path v0.0.7 github.com/ipfs/go-unixfs v0.2.4 github.com/ipfs/interface-go-ipfs-core v0.2.3 @@ -128,7 +128,7 @@ require ( golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.25.0 // indirect launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect ) diff --git a/go.sum b/go.sum index 7b6b9a266e2..80eaf857056 100644 --- a/go.sum +++ b/go.sum @@ -215,12 +215,14 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200807023228-a084d8d9919e h1:qHdxD1Of7i6yyFezaKNWk36CBNWGRHszp44oTq4oDQ0= -github.com/filecoin-project/chain-validation v0.0.6-0.20200807023228-a084d8d9919e/go.mod h1:jtOqSVob11urlSIM8Gw3XIrqmiqb+fBr7ZBIbOhzGPI= +github.com/filecoin-project/chain-validation v0.0.6-0.20200810233933-b7655e154d21 h1:d90LSnInzsTdPzqHvg5i/Rg/CSebZ8ml4t9Mx5ltT5U= +github.com/filecoin-project/chain-validation v0.0.6-0.20200810233933-b7655e154d21/go.mod h1:865X1wJ3ZCu2dFT5/GtDTZVJtWkAoJIzKp9Sp/ov4FA= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef h1:Wi5E+P1QfHP8IF27eUiTx5vYfqQZwfPxzq3oFEq8w8U= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef/go.mod h1:SrA+pWVoUivqKOfC+ckVYbx41hWz++HxJcrlmHNnebU= +github.com/filecoin-project/go-address v0.0.3 h1:eVfbdjEbpbzIrbiSa+PiGUY+oDK9HnUn+M1R/ggoHf8= +github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs= @@ -228,7 +230,6 @@ github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161 github.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20200731171407-e559a0579161/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g= github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mod h1:iodsLxOFZnqKtjj2zkgqzoGNrv6vUqj69AT/J8DKXEw= github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= -github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.1.2 h1:TjLregCoyP1/5lm7WCM0axyV1myIHwbjGa21skuu5tk= github.com/filecoin-project/go-bitfield v0.1.2/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM= github.com/filecoin-project/go-bitfield v0.2.0 h1:gCtLcjskIPtdg4NfN7gQZSQF9yrBQ7mkT0qCJxzGI2Q= @@ -237,13 +238,12 @@ github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:a github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus= github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= -github.com/filecoin-project/go-data-transfer v0.5.3 h1:pErOk+xeX0eiZ9UJJMJKGBI+WgdN/4/AMXQDlFDfFNg= -github.com/filecoin-project/go-data-transfer v0.5.3/go.mod h1:30ROzlBS8tbTkszmW9a6/N4oD5bIh6QRBCXC6lORuI8= -github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= +github.com/filecoin-project/go-data-transfer v0.6.0 h1:XCBonOQRCKByeV4lrz79TMY074X2fFGlg44SuB8ql/Y= +github.com/filecoin-project/go-data-transfer v0.6.0/go.mod h1:7d6/ow0uHHXBZ09cePPcJt0nM/z1NQIyHLYakf53Jxw= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f h1:GxJzR3oRIMTPtpZ0b7QF8FKPK6/iPAc7trhlL5k/g+s= github.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= -github.com/filecoin-project/go-fil-markets v0.5.4 h1:FuK7vSpWFN/sD3rMpP33rk8LbCcx/GUdqn4hUI5M+Ys= -github.com/filecoin-project/go-fil-markets v0.5.4/go.mod h1:RNaiPhWF8xPrb9oUWJK7FGfD1jkdsk4XjCwczKpwnX0= +github.com/filecoin-project/go-fil-markets v0.5.4-0.20200811210447-4b1ab3c87fcb h1:Qo7i58QmiTL8ZEpv6sOisd0mFFAzOCa+wXRgEB+Jjuk= +github.com/filecoin-project/go-fil-markets v0.5.4-0.20200811210447-4b1ab3c87fcb/go.mod h1:m8R7PKe8yBJ5OaRUNOMCdqXUjzkP1fBJemyqQrp0gr8= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24 h1:Jc7vkplmZYVuaEcSXGHDwefvZIdoyyaoGDLqSr8Svms= github.com/filecoin-project/go-jsonrpc v0.1.1-0.20200602181149-522144ab4e24/go.mod h1:j6zV//WXIIY5kky873Q3iIKt/ViOE8rcijovmpxrXzM= github.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI= @@ -253,7 +253,6 @@ github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6/go.m github.com/filecoin-project/go-paramfetch v0.0.2-0.20200218225740-47c639bab663/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 h1:A256QonvzRaknIIAuWhe/M2dpV2otzs3NBhi5TWa/UA= github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261/go.mod h1:fZzmf4tftbwf9S37XRifoJlz7nCjRdIrMGLR07dKLCc= -github.com/filecoin-project/go-statemachine v0.0.0-20200226041606-2074af6d51d9/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200714194326-a77c3ae20989/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7 h1:KAF3WM/xSnl6G6RHX8vDJthg4+e4PSgBh72//6c6Qvc= github.com/filecoin-project/go-statemachine v0.0.0-20200730031800-c3336614d2a7/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= @@ -264,12 +263,15 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/ github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= -github.com/filecoin-project/specs-actors v0.7.3-0.20200716231407-60a2ae96d2e6/go.mod h1:JOMUa7EijvpOO4ofD1yeHNmqohkmmnhTvz/IpB6so4c= github.com/filecoin-project/specs-actors v0.8.2/go.mod h1:Q3ACV5kBLvqPaYbthc/J1lGMJ5OwogmD9pzdtPRMdCw= -github.com/filecoin-project/specs-actors v0.8.7-0.20200805174427-9d42fb163883 h1:/LOix6EwCWshEuufhM8gAuCqP5jPWVMqPZn8HUQCw3Y= -github.com/filecoin-project/specs-actors v0.8.7-0.20200805174427-9d42fb163883/go.mod h1:QRihI/fadrhWzt7HH6mT32upOdDFpSYCFnr3JEI1L50= +github.com/filecoin-project/specs-actors v0.8.7-0.20200810233841-00c989d0bd48 h1:O2BP/T/UelSxLI8unmlVsbJPgY431pmBsVDlAvqm08w= +github.com/filecoin-project/specs-actors v0.8.7-0.20200810233841-00c989d0bd48/go.mod h1:PY4uZEJp0AVf3RSDczkePq3O32bwnaygLggwD1H7GSc= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923 h1:+H4IG4OjTThljPkMH1ZpynxCulNdx4amEeHoP2GdQJI= +github.com/filecoin-project/specs-actors v0.8.7-0.20200811203034-272d022c1923/go.mod h1:hukRu6vKQrrS7Nt+fC/ql4PqWLSfmAWNshD/VDtARZU= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401 h1:jLzN1hwO5WpKPu8ASbW8fs1FUCsOWNvoBXzQhv+8/E8= +github.com/filecoin-project/specs-storage v0.1.1-0.20200730063404-f7db367e9401/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6 h1:u/UEqS66A5ckRmS4yNpjmVH56sVtS/RfclBAYocb4as= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= @@ -490,6 +492,7 @@ github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRV github.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= +github.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.4 h1:rjvQ9+muFaJ+QZ7dN5B1MSDNQ0JVZKkkES/rMZmA8X8= github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= @@ -517,7 +520,6 @@ github.com/ipfs/go-fs-lock v0.0.1/go.mod h1:DNBekbboPKcxs1aukPSaOtFA3QfSdi5C855v github.com/ipfs/go-graphsync v0.1.0 h1:RjLk7ha1tJtDXktqoxOjhvx4lDuzzIU+xQ+PEi74r3s= github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE= github.com/ipfs/go-hamt-ipld v0.0.15-0.20200131012125-dd88a59d3f2e/go.mod h1:9aQJu/i/TaRDW6jqB5U217dLIDopn50wxLdHXM2CTfE= -github.com/ipfs/go-hamt-ipld v0.0.15-0.20200204200533-99b8553ef242/go.mod h1:kq3Pi+UP3oHhAdKexE+kHHYRKMoFNuGero0R7q3hWGg= github.com/ipfs/go-hamt-ipld v0.1.1 h1:0IQdvwnAAUKmDE+PMJa5y1QiwOPHpI9+eAbQEEEYthk= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= @@ -525,6 +527,8 @@ github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2Is github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= github.com/ipfs/go-ipfs-blockstore v1.0.0 h1:pmFp5sFYsYVvMOp9X01AK3s85usVcLvkBTRsN6SnfUA= github.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU= +github.com/ipfs/go-ipfs-blockstore v1.0.1 h1:fnuVj4XdZp4yExhd0CnUwAiMNJHiPnfInhiuwz4lW1w= +github.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE= github.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ= github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= github.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw= @@ -598,6 +602,8 @@ github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKy github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= github.com/ipfs/go-merkledag v0.3.1 h1:3UqWINBEr3/N+r6OwgFXAddDP/8zpQX/8J7IGVOCqRQ= github.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= +github.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY= +github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= github.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo= @@ -1371,7 +1377,6 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200501232601-351665a6e756/go.mod h1:W github.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg= github.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b h1:Tju61pLCTYt5KZ9Y4wJKNR+IXB1k29M+0w3eW48Xqy0= github.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c h1:BMg3YUwLEUIYBJoYZVhA4ZDTciXRj6r7ffOCshWrsoE= github.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= @@ -1703,6 +1708,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= diff --git a/lotuspond/front/src/chain/methods.json b/lotuspond/front/src/chain/methods.json index 9239058b9c6..ad1076c8498 100644 --- a/lotuspond/front/src/chain/methods.json +++ b/lotuspond/front/src/chain/methods.json @@ -71,7 +71,8 @@ "WithdrawBalance", "ConfirmSectorProofsValid", "ChangeMultiaddrs", - "CompactPartitions" + "CompactPartitions", + "CompactSectorNumbers" ], "fil/1/storagepower": [ "Send", diff --git a/node/hello/cbor_gen.go b/node/hello/cbor_gen.go index 3d6b3f3dba8..e28d5c1b4db 100644 --- a/node/hello/cbor_gen.go +++ b/node/hello/cbor_gen.go @@ -7,7 +7,7 @@ import ( "io" "github.com/filecoin-project/specs-actors/actors/abi" - cid "github.com/ipfs/go-cid" + "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" ) diff --git a/node/impl/full/wallet.go b/node/impl/full/wallet.go index 68550a4f36f..b1d963f1fd1 100644 --- a/node/impl/full/wallet.go +++ b/node/impl/full/wallet.go @@ -3,7 +3,6 @@ package full import ( "context" "github.com/filecoin-project/specs-actors/actors/abi/big" - init_ "github.com/filecoin-project/specs-actors/actors/builtin/init" "github.com/filecoin-project/lotus/lib/sigs" @@ -44,7 +43,7 @@ func (a *WalletAPI) WalletBalance(ctx context.Context, addr address.Address) (ty return nil })) - if xerrors.Is(err, init_.ErrAddressNotFound) { + if xerrors.Is(err, types.ErrActorNotFound) { return big.Zero(), nil } else { return bal, err diff --git a/paychmgr/cbor_gen.go b/paychmgr/cbor_gen.go index 57666fe2d17..aa86bc10674 100644 --- a/paychmgr/cbor_gen.go +++ b/paychmgr/cbor_gen.go @@ -105,16 +105,14 @@ func (t *VoucherInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.Voucher = new(paych.SignedVoucher) if err := t.Voucher.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.Voucher pointer: %w", err) @@ -434,16 +432,14 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { t.Channel = new(address.Address) if err := t.Channel.UnmarshalCBOR(br); err != nil { return xerrors.Errorf("unmarshaling t.Channel pointer: %w", err) @@ -556,16 +552,14 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil { @@ -581,16 +575,14 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) error { { - pb, err := br.PeekByte() + b, err := br.ReadByte() if err != nil { return err } - if pb == cbg.CborNull[0] { - var nbuf [1]byte - if _, err := br.Read(nbuf[:]); err != nil { + if b != cbg.CborNull[0] { + if err := br.UnreadByte(); err != nil { return err } - } else { c, err := cbg.ReadCid(br) if err != nil {