From 74ae5d5542d47d47d81e7da748346a58b6049357 Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 16 Jan 2023 16:03:18 -0800 Subject: [PATCH 01/20] deps: lotus heyperspacenet branch - update ffi and lotus hyperspace deps --- Makefile | 3 + chain/actors/actors.go | 23 +- chain/actors/adt/diff/generic.go | 2 + .../actors/builtin/datacap/actor.go.template | 15 +- chain/actors/builtin/datacap/datacap.go | 17 +- chain/actors/builtin/datacap/v10.go | 92 +++ chain/actors/builtin/init/init.go | 32 +- chain/actors/builtin/init/v10.go | 151 +++++ chain/actors/builtin/market/market.go | 23 +- chain/actors/builtin/market/v10.go | 247 +++++++ chain/actors/builtin/miner/diff.go | 6 +- chain/actors/builtin/miner/miner.go | 44 +- chain/actors/builtin/miner/v0.go | 2 +- chain/actors/builtin/miner/v10.go | 608 ++++++++++++++++++ chain/actors/builtin/miner/v2.go | 2 +- chain/actors/builtin/miner/v3.go | 2 +- chain/actors/builtin/miner/v4.go | 2 +- chain/actors/builtin/miner/v5.go | 2 +- chain/actors/builtin/miner/v6.go | 2 +- chain/actors/builtin/miner/v7.go | 2 +- chain/actors/builtin/miner/v8.go | 2 +- chain/actors/builtin/miner/v9.go | 20 +- chain/actors/builtin/multisig/multisig.go | 39 +- chain/actors/builtin/multisig/v10.go | 130 ++++ chain/actors/builtin/power/power.go | 29 +- chain/actors/builtin/power/v10.go | 186 ++++++ chain/actors/builtin/reward/reward.go | 29 +- chain/actors/builtin/reward/v10.go | 109 ++++ .../actors/builtin/verifreg/actor.go.template | 5 + .../actors/builtin/verifreg/state.go.template | 39 +- chain/actors/builtin/verifreg/v0.go | 8 +- chain/actors/builtin/verifreg/v10.go | 172 +++++ chain/actors/builtin/verifreg/v2.go | 8 +- chain/actors/builtin/verifreg/v3.go | 8 +- chain/actors/builtin/verifreg/v4.go | 8 +- chain/actors/builtin/verifreg/v5.go | 8 +- chain/actors/builtin/verifreg/v6.go | 8 +- chain/actors/builtin/verifreg/v7.go | 8 +- chain/actors/builtin/verifreg/v8.go | 8 +- chain/actors/builtin/verifreg/v9.go | 33 +- chain/actors/builtin/verifreg/verifreg.go | 34 +- chain/datasource/datasource.go | 13 +- .../distributed/queue/tracing/carrier.go | 2 +- extern/filecoin-ffi | 2 +- go.mod | 132 ++-- go.sum | 359 +++++++---- lens/util/repo.go | 2 +- storage/sql.go | 19 +- 48 files changed, 2324 insertions(+), 373 deletions(-) create mode 100644 chain/actors/builtin/datacap/v10.go create mode 100644 chain/actors/builtin/init/v10.go create mode 100644 chain/actors/builtin/market/v10.go create mode 100644 chain/actors/builtin/miner/v10.go create mode 100644 chain/actors/builtin/multisig/v10.go create mode 100644 chain/actors/builtin/power/v10.go create mode 100644 chain/actors/builtin/reward/v10.go create mode 100644 chain/actors/builtin/verifreg/v10.go diff --git a/Makefile b/Makefile index 2c6a8d465..8b1454af0 100644 --- a/Makefile +++ b/Makefile @@ -151,6 +151,9 @@ butterflynet: build interopnet: GOFLAGS+=-tags=interopnet interopnet: build +hyperspacenet: GOFLAGS+=-tags=hyperspacenet +hyperspacenet: build + # alias to match other network-specific targets mainnet: build diff --git a/chain/actors/actors.go b/chain/actors/actors.go index b60cdfc72..c3c59191a 100644 --- a/chain/actors/actors.go +++ b/chain/actors/actors.go @@ -15,20 +15,17 @@ import ( type Version int -var LatestVersion = 8 - -var Versions = []int{0, 2, 3, 4, 5, 6, 7, 8} - const ( - Version0 Version = 0 - Version2 Version = 2 - Version3 Version = 3 - Version4 Version = 4 - Version5 Version = 5 - Version6 Version = 6 - Version7 Version = 7 - Version8 Version = 8 - Version9 Version = 9 + Version0 Version = 0 + Version2 Version = 2 + Version3 Version = 3 + Version4 Version = 4 + Version5 Version = 5 + Version6 Version = 6 + Version7 Version = 7 + Version8 Version = 8 + Version9 Version = 9 + Version10 Version = 10 ) const ( AccountKey = "account" diff --git a/chain/actors/adt/diff/generic.go b/chain/actors/adt/diff/generic.go index b3fa72926..4ae4aa054 100644 --- a/chain/actors/adt/diff/generic.go +++ b/chain/actors/adt/diff/generic.go @@ -28,6 +28,7 @@ type ArrayDiffer interface { // - All values that exist in curArr nnd not in prevArr are passed to ArrayDiffer.Add() // - All values that exist in preArr and in curArr are passed to ArrayDiffer.Modify() // - It is the responsibility of ArrayDiffer.Modify() to determine if the values it was passed have been modified. +// // If `preArr` and `curArr` are both backed by /v3/AMTs with the same bitwidth use the more efficient Amt method. func CompareArray(preArr, curArr adt.Array, out ArrayDiffer) error { notNew := make(map[int64]struct{}, curArr.Length()) @@ -84,6 +85,7 @@ type MapDiffer interface { // - All values that exist in curMap nnd not in prevArr are passed to MapDiffer.Add() // - All values that exist in preMap and in curMap are passed to MapDiffer.Modify() // - It is the responsibility of ArrayDiffer.Modify() to determine if the values it was passed have been modified. +// // If `preMap` and `curMap` are both backed by /v3/HAMTs with the same bitwidth and hash function use the more efficient Hamt method. func CompareMap(preMap, curMap adt.Map, out MapDiffer) error { notNew := make(map[string]struct{}) diff --git a/chain/actors/builtin/datacap/actor.go.template b/chain/actors/builtin/datacap/actor.go.template index 82b00e27b..b34082f02 100644 --- a/chain/actors/builtin/datacap/actor.go.template +++ b/chain/actors/builtin/datacap/actor.go.template @@ -17,8 +17,8 @@ import ( ) var ( - Address = builtin9.DatacapActorAddr - Methods = builtin9.MethodsDatacap + Address = builtin{{.latestVersion}}.DatacapActorAddr + Methods = builtin{{.latestVersion}}.MethodsDatacap ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -39,14 +39,13 @@ func Load(store adt.Store, act *types.Actor) (State, error) { } func MakeState(store adt.Store, av actorstypes.Version, governor address.Address, bitwidth uint64) (State, error) { - switch av { +switch av { {{range .versions}} - case actorstypes.Version{{.}}: - return make{{.}}(store, governor, bitwidth) - - default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) + case actorstypes.Version{{.}}: + return make{{.}}(store, governor, bitwidth) {{end}} - } +default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) +} } type State interface { diff --git a/chain/actors/builtin/datacap/datacap.go b/chain/actors/builtin/datacap/datacap.go index b71cd602d..4f635f0fc 100644 --- a/chain/actors/builtin/datacap/datacap.go +++ b/chain/actors/builtin/datacap/datacap.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" @@ -17,8 +17,8 @@ import ( ) var ( - Address = builtin9.DatacapActorAddr - Methods = builtin9.MethodsDatacap + Address = builtin10.DatacapActorAddr + Methods = builtin10.MethodsDatacap ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -32,6 +32,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -44,9 +47,11 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address case actorstypes.Version9: return make9(store, governor, bitwidth) + case actorstypes.Version10: + return make10(store, governor, bitwidth) + default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) - } } @@ -70,11 +75,13 @@ type State interface { func AllCodes() []cid.Cid { return []cid.Cid{ (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version9: (&state9{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/datacap/v10.go b/chain/actors/builtin/datacap/v10.go new file mode 100644 index 000000000..971a5ac3b --- /dev/null +++ b/chain/actors/builtin/datacap/v10.go @@ -0,0 +1,92 @@ +package datacap + +import ( + "crypto/sha256" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + + datacap10 "github.com/filecoin-project/go-state-types/builtin/v10/datacap" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, governor address.Address, bitwidth uint64) (State, error) { + out := state10{store: store} + s, err := datacap10.ConstructState(store, governor, bitwidth) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + datacap10.State + store adt.Store +} + +func (s *state10) Governor() (address.Address, error) { + return s.State.Governor, nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachClient(s.store, actors.Version10, s.VerifiedClients, cb) +} + +func (s *state10) VerifiedClients() (adt.Map, error) { + return adt10.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth)) +} + +func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version10, s.VerifiedClients, addr) +} + +func (s *state10) VerifiedClientsMapBitWidth() int { + return int(s.Token.HamtBitWidth) +} + +func (s *state10) VerifiedClientsMapHashFunction() func(input []byte) []byte { + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } +} + +func (s *state10) ActorKey() string { + return actors.DatacapKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/init/init.go b/chain/actors/builtin/init/init.go index d87af5c90..3205aa96d 100644 --- a/chain/actors/builtin/init/init.go +++ b/chain/actors/builtin/init/init.go @@ -28,14 +28,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin9.InitActorAddr - Methods = builtin9.MethodsInit + Address = builtin10.InitActorAddr + Methods = builtin10.MethodsInit ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -52,6 +52,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -113,6 +116,9 @@ func MakeState(store adt.Store, av actors.Version, networkName string) (State, e case actors.Version9: return make9(store, networkName) + case actors.Version10: + return make10(store, networkName) + } return nil, fmt.Errorf("unknown actor version %d", av) } @@ -162,19 +168,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/init/v10.go b/chain/actors/builtin/init/v10.go new file mode 100644 index 000000000..ef5a629ec --- /dev/null +++ b/chain/actors/builtin/init/v10.go @@ -0,0 +1,151 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package init + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/node/modules/dtypes" + + "crypto/sha256" + + builtin10 "github.com/filecoin-project/go-state-types/builtin" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, networkName string) (State, error) { + out := state10{store: store} + + s, err := init10.ConstructState(store, networkName) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + init10.State + store adt.Store +} + +func (s *state10) ResolveAddress(address address.Address) (address.Address, bool, error) { + return s.State.ResolveAddress(s.store, address) +} + +func (s *state10) MapAddressToNewID(address address.Address) (address.Address, error) { + return s.State.MapAddressToNewID(s.store, address) +} + +func (s *state10) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error { + addrs, err := adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + var actorID cbg.CborInt + return addrs.ForEach(&actorID, func(key string) error { + addr, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(abi.ActorID(actorID), addr) + }) +} + +func (s *state10) NetworkName() (dtypes.NetworkName, error) { + return dtypes.NetworkName(s.State.NetworkName), nil +} + +func (s *state10) SetNetworkName(name string) error { + s.State.NetworkName = name + return nil +} + +func (s *state10) SetNextID(id abi.ActorID) error { + s.State.NextID = id + return nil +} + +func (s *state10) Remove(addrs ...address.Address) (err error) { + m, err := adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + for _, addr := range addrs { + if err = m.Delete(abi.AddrKey(addr)); err != nil { + return fmt.Errorf("failed to delete entry for address: %s; err: %w", addr, err) + } + } + amr, err := m.Root() + if err != nil { + return fmt.Errorf("failed to get address map root: %w", err) + } + s.State.AddressMap = amr + return nil +} + +func (s *state10) SetAddressMap(mcid cid.Cid) error { + s.State.AddressMap = mcid + return nil +} + +func (s *state10) AddressMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) AddressMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) AddressMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.InitKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index 7c765b1e1..5f0b2d1f1 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -54,6 +54,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -169,19 +172,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/market/v10.go b/chain/actors/builtin/market/v10.go new file mode 100644 index 000000000..79c847101 --- /dev/null +++ b/chain/actors/builtin/market/v10.go @@ -0,0 +1,247 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package market + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lotus/chain/actors/adt" + + market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + + s, err := market10.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + market10.State + store adt.Store +} + +func (s *state10) StatesChanged(otherState State) (bool, error) { + otherState10, ok := otherState.(*state10) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.States.Equals(otherState10.State.States), nil +} + +func (s *state10) States() (DealStates, error) { + stateArray, err := adt10.AsArray(s.store, s.State.States, market10.StatesAmtBitwidth) + if err != nil { + return nil, err + } + return &dealStates10{stateArray}, nil +} + +func (s *state10) ProposalsChanged(otherState State) (bool, error) { + otherState10, ok := otherState.(*state10) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.Proposals.Equals(otherState10.State.Proposals), nil +} + +func (s *state10) Proposals() (DealProposals, error) { + proposalArray, err := adt10.AsArray(s.store, s.State.Proposals, market10.ProposalsAmtBitwidth) + if err != nil { + return nil, err + } + return &dealProposals10{proposalArray}, nil +} + +type dealStates10 struct { + adt.Array +} + +func (s *dealStates10) Get(dealID abi.DealID) (*DealState, bool, error) { + var deal10 market10.DealState + found, err := s.Array.Get(uint64(dealID), &deal10) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + deal := fromV10DealState(deal10) + return &deal, true, nil +} + +func (s *dealStates10) ForEach(cb func(dealID abi.DealID, ds DealState) error) error { + var ds10 market10.DealState + return s.Array.ForEach(&ds10, func(idx int64) error { + return cb(abi.DealID(idx), fromV10DealState(ds10)) + }) +} + +func (s *dealStates10) decode(val *cbg.Deferred) (*DealState, error) { + var ds10 market10.DealState + if err := ds10.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + ds := fromV10DealState(ds10) + return &ds, nil +} + +func (s *dealStates10) array() adt.Array { + return s.Array +} + +func fromV10DealState(v10 market10.DealState) DealState { + + return (DealState)(v10) + +} + +type dealProposals10 struct { + adt.Array +} + +func (s *dealProposals10) Get(dealID abi.DealID) (*DealProposal, bool, error) { + var proposal10 market10.DealProposal + found, err := s.Array.Get(uint64(dealID), &proposal10) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + + proposal, err := fromV10DealProposal(proposal10) + if err != nil { + return nil, true, xerrors.Errorf("decoding proposal: %w", err) + } + + return &proposal, true, nil +} + +func (s *dealProposals10) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error { + var dp10 market10.DealProposal + return s.Array.ForEach(&dp10, func(idx int64) error { + dp, err := fromV10DealProposal(dp10) + if err != nil { + return xerrors.Errorf("decoding proposal: %w", err) + } + + return cb(abi.DealID(idx), dp) + }) +} + +func (s *dealProposals10) decode(val *cbg.Deferred) (*DealProposal, error) { + var dp10 market10.DealProposal + if err := dp10.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + + dp, err := fromV10DealProposal(dp10) + if err != nil { + return nil, err + } + + return &dp, nil +} + +func (s *dealProposals10) array() adt.Array { + return s.Array +} + +func fromV10DealProposal(v10 market10.DealProposal) (DealProposal, error) { + + label, err := fromV10Label(v10.Label) + + if err != nil { + return DealProposal{}, xerrors.Errorf("error setting deal label: %w", err) + } + + return DealProposal{ + PieceCID: v10.PieceCID, + PieceSize: v10.PieceSize, + VerifiedDeal: v10.VerifiedDeal, + Client: v10.Client, + Provider: v10.Provider, + + Label: label, + + StartEpoch: v10.StartEpoch, + EndEpoch: v10.EndEpoch, + StoragePricePerEpoch: v10.StoragePricePerEpoch, + + ProviderCollateral: v10.ProviderCollateral, + ClientCollateral: v10.ClientCollateral, + }, nil +} + +func (s *state10) DealProposalsAmtBitwidth() int { + return market10.ProposalsAmtBitwidth +} + +func (s *state10) DealStatesAmtBitwidth() int { + return market10.StatesAmtBitwidth +} + +func (s *state10) ActorKey() string { + return actors.MarketKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func fromV10Label(v10 market10.DealLabel) (DealLabel, error) { + if v10.IsString() { + str, err := v10.ToString() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert string label to string: %w", err) + } + return markettypes.NewLabelFromString(str) + } + + bs, err := v10.ToBytes() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert bytes label to bytes: %w", err) + } + return markettypes.NewLabelFromBytes(bs) +} diff --git a/chain/actors/builtin/miner/diff.go b/chain/actors/builtin/miner/diff.go index 9c02c9bd7..dfd5c75b6 100644 --- a/chain/actors/builtin/miner/diff.go +++ b/chain/actors/builtin/miner/diff.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-amt-ipld/v4" "github.com/filecoin-project/go-hamt-ipld/v3" "github.com/filecoin-project/go-state-types/abi" - miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" cbg "github.com/whyrusleeping/cbor-gen" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -90,8 +90,8 @@ func MakeSectorChanges() *SectorChanges { func MakePreCommitChanges() *PreCommitChanges { return &PreCommitChanges{ - Added: []miner9.SectorPreCommitOnChainInfo{}, - Removed: []miner9.SectorPreCommitOnChainInfo{}, + Added: []miner10.SectorPreCommitOnChainInfo{}, + Removed: []miner10.SectorPreCommitOnChainInfo{}, } } diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index c71ce8a93..b26d1b5e6 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -16,8 +16,8 @@ import ( "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/proof" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" @@ -50,6 +50,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -111,6 +114,9 @@ func MakeState(store adt.Store, av actors.Version) (State, error) { case actors.Version9: return make9(store) + case actors.Version10: + return make10(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -133,8 +139,8 @@ type State interface { GetSector(abi.SectorNumber) (*SectorOnChainInfo, error) FindSector(abi.SectorNumber) (*SectorLocation, error) GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error) - GetPrecommittedSector(abi.SectorNumber) (*miner9.SectorPreCommitOnChainInfo, error) - ForEachPrecommittedSector(func(miner9.SectorPreCommitOnChainInfo) error) error + GetPrecommittedSector(abi.SectorNumber) (*miner10.SectorPreCommitOnChainInfo, error) + ForEachPrecommittedSector(func(miner10.SectorPreCommitOnChainInfo) error) error LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error) NumLiveSectors() (uint64, error) IsAllocated(abi.SectorNumber) (bool, error) @@ -169,7 +175,7 @@ type State interface { PrecommitsMap() (adt.Map, error) PrecommitsMapBitWidth() int PrecommitsMapHashFunction() func(input []byte) []byte - DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner9.SectorPreCommitOnChainInfo, error) + DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner10.SectorPreCommitOnChainInfo, error) DecodeSectorPreCommitOnChainInfoToV8(*cbg.Deferred) (miner8.SectorPreCommitOnChainInfo, error) ForEachPrecommittedSectorV8(func(miner8.SectorPreCommitOnChainInfo) error) error } @@ -208,7 +214,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = miner9.SectorOnChainInfo +type SectorOnChainInfo = miner10.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -263,8 +269,8 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = miner9.MinerInfo -type WorkerKeyChange = miner9.WorkerKeyChange +type MinerInfo = miner10.MinerInfo +type WorkerKeyChange = miner10.WorkerKeyChange type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo type SectorExpiration struct { @@ -286,8 +292,8 @@ type SectorExtensions struct { } type PreCommitChanges struct { - Added []miner9.SectorPreCommitOnChainInfo - Removed []miner9.SectorPreCommitOnChainInfo + Added []miner10.SectorPreCommitOnChainInfo + Removed []miner10.SectorPreCommitOnChainInfo } type LockedFunds struct { @@ -323,19 +329,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index eca0f28d1..f10a92026 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -17,8 +17,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" sha256simd "github.com/minio/sha256-simd" diff --git a/chain/actors/builtin/miner/v10.go b/chain/actors/builtin/miner/v10.go new file mode 100644 index 000000000..d4f162667 --- /dev/null +++ b/chain/actors/builtin/miner/v10.go @@ -0,0 +1,608 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package miner + +import ( + "bytes" + "errors" + "fmt" + + "github.com/filecoin-project/go-bitfield" + rle "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" + minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + "github.com/filecoin-project/lotus/chain/actors/adt" + + "crypto/sha256" + + builtin10 "github.com/filecoin-project/go-state-types/builtin" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + out.State = miner10.State{} + return &out, nil +} + +type state10 struct { + miner10.State + store adt.Store +} + +type deadline10 struct { + miner10.Deadline + store adt.Store +} + +type partition10 struct { + miner10.Partition + store adt.Store +} + +func (s *state10) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmount, err error) { + defer func() { + if r := recover(); r != nil { + err = xerrors.Errorf("failed to get available balance: %w", r) + available = abi.NewTokenAmount(0) + } + }() + // this panics if the miner doesnt have enough funds to cover their locked pledge + available, err = s.GetAvailableBalance(bal) + return available, err +} + +func (s *state10) VestedFunds(epoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.CheckVestedFunds(s.store, epoch) +} + +func (s *state10) LockedFunds() (LockedFunds, error) { + return LockedFunds{ + VestingFunds: s.State.LockedFunds, + InitialPledgeRequirement: s.State.InitialPledge, + PreCommitDeposits: s.State.PreCommitDeposits, + }, nil +} + +func (s *state10) FeeDebt() (abi.TokenAmount, error) { + return s.State.FeeDebt, nil +} + +func (s *state10) InitialPledge() (abi.TokenAmount, error) { + return s.State.InitialPledge, nil +} + +func (s *state10) PreCommitDeposits() (abi.TokenAmount, error) { + return s.State.PreCommitDeposits, nil +} + +func (s *state10) GetSector(num abi.SectorNumber) (*SectorOnChainInfo, error) { + info, ok, err := s.State.GetSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV10SectorOnChainInfo(*info) + return &ret, nil +} + +func (s *state10) FindSector(num abi.SectorNumber) (*SectorLocation, error) { + dlIdx, partIdx, err := s.State.FindSector(s.store, num) + if err != nil { + return nil, err + } + return &SectorLocation{ + Deadline: dlIdx, + Partition: partIdx, + }, nil +} + +func (s *state10) NumLiveSectors() (uint64, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return 0, err + } + var total uint64 + if err := dls.ForEach(s.store, func(dlIdx uint64, dl *miner10.Deadline) error { + total += dl.LiveSectors + return nil + }); err != nil { + return 0, err + } + return total, nil +} + +// GetSectorExpiration returns the effective expiration of the given sector. +// +// If the sector does not expire early, the Early expiration field is 0. +func (s *state10) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + // NOTE: this can be optimized significantly. + // 1. If the sector is non-faulty, it will expire on-time (can be + // learned from the sector info). + // 2. If it's faulty, it will expire early within the first 42 entries + // of the expiration queue. + + stopErr := errors.New("stop") + out := SectorExpiration{} + err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner10.Deadline) error { + partitions, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + quant := s.State.QuantSpecForDeadline(dlIdx) + var part miner10.Partition + return partitions.ForEach(&part, func(partIdx int64) error { + if found, err := part.Sectors.IsSet(uint64(num)); err != nil { + return err + } else if !found { + return nil + } + if found, err := part.Terminated.IsSet(uint64(num)); err != nil { + return err + } else if found { + // already terminated + return stopErr + } + + q, err := miner10.LoadExpirationQueue(s.store, part.ExpirationsEpochs, quant, miner10.PartitionExpirationAmtBitwidth) + if err != nil { + return err + } + var exp miner10.ExpirationSet + return q.ForEach(&exp, func(epoch int64) error { + if early, err := exp.EarlySectors.IsSet(uint64(num)); err != nil { + return err + } else if early { + out.Early = abi.ChainEpoch(epoch) + return nil + } + if onTime, err := exp.OnTimeSectors.IsSet(uint64(num)); err != nil { + return err + } else if onTime { + out.OnTime = abi.ChainEpoch(epoch) + return stopErr + } + return nil + }) + }) + }) + if err == stopErr { + err = nil + } + if err != nil { + return nil, err + } + if out.Early == 0 && out.OnTime == 0 { + return nil, xerrors.Errorf("failed to find sector %d", num) + } + return &out, nil +} + +func (s *state10) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { + info, ok, err := s.State.GetPrecommittedSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV10SectorPreCommitOnChainInfo(*info) + + return &ret, nil +} + +func (s *state10) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { + precommitted, err := adt10.AsMap(s.store, s.State.PreCommittedSectors, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + + var info miner10.SectorPreCommitOnChainInfo + if err := precommitted.ForEach(&info, func(_ string) error { + return cb(fromV10SectorPreCommitOnChainInfo(info)) + }); err != nil { + return err + } + + return nil +} + +func (s *state10) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) { + sectors, err := miner10.LoadSectors(s.store, s.State.Sectors) + if err != nil { + return nil, err + } + + // If no sector numbers are specified, load all. + if snos == nil { + infos := make([]*SectorOnChainInfo, 0, sectors.Length()) + var info10 miner10.SectorOnChainInfo + if err := sectors.ForEach(&info10, func(_ int64) error { + info := fromV10SectorOnChainInfo(info10) + infos = append(infos, &info) + return nil + }); err != nil { + return nil, err + } + return infos, nil + } + + // Otherwise, load selected. + infos10, err := sectors.Load(*snos) + if err != nil { + return nil, err + } + infos := make([]*SectorOnChainInfo, len(infos10)) + for i, info10 := range infos10 { + info := fromV10SectorOnChainInfo(*info10) + infos[i] = &info + } + return infos, nil +} + +func (s *state10) loadAllocatedSectorNumbers() (bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors) + return allocatedSectors, err +} + +func (s *state10) IsAllocated(num abi.SectorNumber) (bool, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return false, err + } + + return allocatedSectors.IsSet(uint64(num)) +} + +func (s *state10) GetProvingPeriodStart() (abi.ChainEpoch, error) { + return s.State.ProvingPeriodStart, nil +} + +func (s *state10) UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return nil, err + } + + allocatedRuns, err := allocatedSectors.RunIterator() + if err != nil { + return nil, err + } + + unallocatedRuns, err := rle.Subtract( + &rle.RunSliceIterator{Runs: []rle.Run{{Val: true, Len: abi.MaxSectorNumber}}}, + allocatedRuns, + ) + if err != nil { + return nil, err + } + + iter, err := rle.BitsFromRuns(unallocatedRuns) + if err != nil { + return nil, err + } + + sectors := make([]abi.SectorNumber, 0, count) + for iter.HasNext() && len(sectors) < count { + nextNo, err := iter.Next() + if err != nil { + return nil, err + } + sectors = append(sectors, abi.SectorNumber(nextNo)) + } + + return sectors, nil +} + +func (s *state10) GetAllocatedSectors() (*bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + if err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors); err != nil { + return nil, err + } + + return &allocatedSectors, nil +} + +func (s *state10) LoadDeadline(idx uint64) (Deadline, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + dl, err := dls.LoadDeadline(s.store, idx) + if err != nil { + return nil, err + } + return &deadline10{*dl, s.store}, nil +} + +func (s *state10) ForEachDeadline(cb func(uint64, Deadline) error) error { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + return dls.ForEach(s.store, func(i uint64, dl *miner10.Deadline) error { + return cb(i, &deadline10{*dl, s.store}) + }) +} + +func (s *state10) NumDeadlines() (uint64, error) { + return miner10.WPoStPeriodDeadlines, nil +} + +func (s *state10) DeadlinesChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !s.State.Deadlines.Equals(other10.Deadlines), nil +} + +func (s *state10) MinerInfoChanged(other State) (bool, error) { + other0, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Info.Equals(other0.State.Info), nil +} + +func (s *state10) Info() (MinerInfo, error) { + info, err := s.State.GetInfo(s.store) + if err != nil { + return MinerInfo{}, err + } + + mi := MinerInfo{ + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: info.WindowPoStProofType, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: info.BeneficiaryTerm, + PendingBeneficiaryTerm: info.PendingBeneficiaryTerm, + } + + return mi, nil +} + +func (s *state10) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { + return s.State.RecordedDeadlineInfo(epoch), nil +} + +func (s *state10) DeadlineCronActive() (bool, error) { + return s.State.DeadlineCronActive, nil +} + +func (s *state10) SectorsArray() (adt.Array, error) { + return adt10.AsArray(s.store, s.Sectors, miner10.SectorsAmtBitwidth) +} + +func (s *state10) DecodeSectorOnChainInfo(val *cbg.Deferred) (SectorOnChainInfo, error) { + var si miner10.SectorOnChainInfo + err := si.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorOnChainInfo{}, err + } + + return fromV10SectorOnChainInfo(si), nil +} + +func (s *state10) PrecommitsMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.PreCommittedSectors, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) PrecommitsMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) PrecommitsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { + var sp miner10.SectorPreCommitOnChainInfo + err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return minertypes.SectorPreCommitOnChainInfo{}, err + } + + return fromV10SectorPreCommitOnChainInfo(sp), nil +} + +func (s *state10) DecodeSectorPreCommitOnChainInfoToV8(val *cbg.Deferred) (minertypesv8.SectorPreCommitOnChainInfo, error) { + + return minertypesv8.SectorPreCommitOnChainInfo{}, fmt.Errorf("unsupported in actors v9") + +} + +func (s *state10) ForEachPrecommittedSectorV8(cb func(minertypesv8.SectorPreCommitOnChainInfo) error) error { + + return fmt.Errorf("unsupported for actors v9") + +} + +func (s *state10) EraseAllUnproven() error { + + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + + err = dls.ForEach(s.store, func(dindx uint64, dl *miner10.Deadline) error { + ps, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + + var part miner10.Partition + err = ps.ForEach(&part, func(pindx int64) error { + _ = part.ActivateUnproven() + err = ps.Set(uint64(pindx), &part) + return nil + }) + + if err != nil { + return err + } + + dl.Partitions, err = ps.Root() + if err != nil { + return err + } + + return dls.UpdateDeadline(s.store, dindx, dl) + }) + if err != nil { + return err + } + + return s.State.SaveDeadlines(s.store, dls) + +} + +func (d *deadline10) LoadPartition(idx uint64) (Partition, error) { + p, err := d.Deadline.LoadPartition(d.store, idx) + if err != nil { + return nil, err + } + return &partition10{*p, d.store}, nil +} + +func (d *deadline10) ForEachPartition(cb func(uint64, Partition) error) error { + ps, err := d.Deadline.PartitionsArray(d.store) + if err != nil { + return err + } + var part miner10.Partition + return ps.ForEach(&part, func(i int64) error { + return cb(uint64(i), &partition10{part, d.store}) + }) +} + +func (d *deadline10) PartitionsChanged(other Deadline) (bool, error) { + other10, ok := other.(*deadline10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !d.Deadline.Partitions.Equals(other10.Deadline.Partitions), nil +} + +func (d *deadline10) PartitionsPoSted() (bitfield.BitField, error) { + return d.Deadline.PartitionsPoSted, nil +} + +func (d *deadline10) DisputableProofCount() (uint64, error) { + + ops, err := d.OptimisticProofsSnapshotArray(d.store) + if err != nil { + return 0, err + } + + return ops.Length(), nil + +} + +func (p *partition10) AllSectors() (bitfield.BitField, error) { + return p.Partition.Sectors, nil +} + +func (p *partition10) FaultySectors() (bitfield.BitField, error) { + return p.Partition.Faults, nil +} + +func (p *partition10) RecoveringSectors() (bitfield.BitField, error) { + return p.Partition.Recoveries, nil +} + +func (p *partition10) UnprovenSectors() (bitfield.BitField, error) { + return p.Partition.Unproven, nil +} + +func fromV10SectorOnChainInfo(v10 miner10.SectorOnChainInfo) SectorOnChainInfo { + info := SectorOnChainInfo{ + SectorNumber: v10.SectorNumber, + SealProof: v10.SealProof, + SealedCID: v10.SealedCID, + DealIDs: v10.DealIDs, + Activation: v10.Activation, + Expiration: v10.Expiration, + DealWeight: v10.DealWeight, + VerifiedDealWeight: v10.VerifiedDealWeight, + InitialPledge: v10.InitialPledge, + ExpectedDayReward: v10.ExpectedDayReward, + ExpectedStoragePledge: v10.ExpectedStoragePledge, + + SectorKeyCID: v10.SectorKeyCID, + } + return info +} + +func fromV10SectorPreCommitOnChainInfo(v10 miner10.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { + return v10 +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) SectorsAmtBitwidth() int { + return miner10.SectorsAmtBitwidth +} + +func (s *state10) ActorKey() string { + return actors.MinerKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index 2fd9f6102..8c2029c77 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index b07ab6487..d816f823f 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index 5a60a2dc0..dabdccf09 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index 15e7c53ed..ec1b2ffdb 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v6.go b/chain/actors/builtin/miner/v6.go index ec4d81dfe..fcc2193d2 100644 --- a/chain/actors/builtin/miner/v6.go +++ b/chain/actors/builtin/miner/v6.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v7.go b/chain/actors/builtin/miner/v7.go index ea5f39316..faca5c960 100644 --- a/chain/actors/builtin/miner/v7.go +++ b/chain/actors/builtin/miner/v7.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v8.go b/chain/actors/builtin/miner/v8.go index b33d7fa09..6c5c9151a 100644 --- a/chain/actors/builtin/miner/v8.go +++ b/chain/actors/builtin/miner/v8.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index 26f930e48..05d759f7d 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -15,8 +15,8 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" + minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "crypto/sha256" @@ -579,7 +579,23 @@ func fromV9SectorOnChainInfo(v9 miner9.SectorOnChainInfo) SectorOnChainInfo { } func fromV9SectorPreCommitOnChainInfo(v9 miner9.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return v9 + ret := minertypes.SectorPreCommitOnChainInfo{ + Info: minertypes.SectorPreCommitInfo{ + SealProof: v9.Info.SealProof, + SectorNumber: v9.Info.SectorNumber, + SealedCID: v9.Info.SealedCID, + SealRandEpoch: v9.Info.SealRandEpoch, + DealIDs: v9.Info.DealIDs, + Expiration: v9.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v9.PreCommitDeposit, + PreCommitEpoch: v9.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v9.Info.UnsealedCid + + return ret } func (s *state9) GetState() interface{} { diff --git a/chain/actors/builtin/multisig/multisig.go b/chain/actors/builtin/multisig/multisig.go index f7b74ce2b..246831ffd 100644 --- a/chain/actors/builtin/multisig/multisig.go +++ b/chain/actors/builtin/multisig/multisig.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" - msig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" + msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -50,6 +50,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -104,19 +107,19 @@ type State interface { decodeTransaction(val *cbg.Deferred) (Transaction, error) } -type Transaction = msig9.Transaction +type Transaction = msig10.Transaction var Methods = builtintypes.MethodsMultisig // these types are the same between v0 and v6 -type ProposalHashData = msig9.ProposalHashData -type ProposeReturn = msig9.ProposeReturn -type ProposeParams = msig9.ProposeParams -type ApproveReturn = msig9.ApproveReturn -type TxnIDParams = msig9.TxnIDParams +type ProposalHashData = msig10.ProposalHashData +type ProposeReturn = msig10.ProposeReturn +type ProposeParams = msig10.ProposeParams +type ApproveReturn = msig10.ApproveReturn +type TxnIDParams = msig10.TxnIDParams func txnParams(id uint64, data *ProposalHashData) ([]byte, error) { - params := msig9.TxnIDParams{ID: msig9.TxnID(id)} + params := msig10.TxnIDParams{ID: msig10.TxnID(id)} if data != nil { if data.Requester.Protocol() != address.ID { return nil, fmt.Errorf("proposer address must be an ID address, was %s", data.Requester) @@ -149,19 +152,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/multisig/v10.go b/chain/actors/builtin/multisig/v10.go new file mode 100644 index 000000000..41d5a18e6 --- /dev/null +++ b/chain/actors/builtin/multisig/v10.go @@ -0,0 +1,130 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package multisig + +import ( + "bytes" + "encoding/binary" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin10 "github.com/filecoin-project/go-state-types/builtin" + msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state10 struct { + msig10.State + store adt.Store +} + +func (s *state10) LockedBalance(currEpoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.State.AmountLocked(currEpoch - s.State.StartEpoch), nil +} + +func (s *state10) StartEpoch() (abi.ChainEpoch, error) { + return s.State.StartEpoch, nil +} + +func (s *state10) UnlockDuration() (abi.ChainEpoch, error) { + return s.State.UnlockDuration, nil +} + +func (s *state10) InitialBalance() (abi.TokenAmount, error) { + return s.State.InitialBalance, nil +} + +func (s *state10) Threshold() (uint64, error) { + return s.State.NumApprovalsThreshold, nil +} + +func (s *state10) Signers() ([]address.Address, error) { + return s.State.Signers, nil +} + +func (s *state10) ForEachPendingTxn(cb func(id int64, txn Transaction) error) error { + arr, err := adt10.AsMap(s.store, s.State.PendingTxns, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + var out msig10.Transaction + return arr.ForEach(&out, func(key string) error { + txid, n := binary.Varint([]byte(key)) + if n <= 0 { + return fmt.Errorf("invalid pending transaction key: %v", key) + } + return cb(txid, (Transaction)(out)) //nolint:unconvert + }) +} + +func (s *state10) PendingTxnChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.PendingTxns.Equals(other10.PendingTxns), nil +} + +func (s *state10) PendingTransactionsMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.PendingTxns, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) PendingTransactionsMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) PendingTransactionsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) decodeTransaction(val *cbg.Deferred) (Transaction, error) { + var tx msig10.Transaction + if err := tx.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Transaction{}, err + } + return Transaction(tx), nil +} + +func (s *state10) ActorKey() string { + return actors.MultisigKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index 34d1eeb93..a8f2bdf63 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -32,14 +32,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin9.StoragePowerActorAddr - Methods = builtin9.MethodsPower + Address = builtin10.StoragePowerActorAddr + Methods = builtin10.MethodsPower ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -56,6 +56,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -141,19 +144,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/power/v10.go b/chain/actors/builtin/power/v10.go new file mode 100644 index 000000000..0754718a6 --- /dev/null +++ b/chain/actors/builtin/power/v10.go @@ -0,0 +1,186 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package power + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + "crypto/sha256" + + builtin10 "github.com/filecoin-project/go-state-types/builtin" + power10 "github.com/filecoin-project/go-state-types/builtin/v10/power" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state10 struct { + power10.State + store adt.Store +} + +func (s *state10) TotalLocked() (abi.TokenAmount, error) { + return s.TotalPledgeCollateral, nil +} + +func (s *state10) TotalPower() (Claim, error) { + return Claim{ + RawBytePower: s.TotalRawBytePower, + QualityAdjPower: s.TotalQualityAdjPower, + }, nil +} + +// Committed power to the network. Includes miners below the minimum threshold. +func (s *state10) TotalCommitted() (Claim, error) { + return Claim{ + RawBytePower: s.TotalBytesCommitted, + QualityAdjPower: s.TotalQABytesCommitted, + }, nil +} + +func (s *state10) MinerPower(addr address.Address) (Claim, bool, error) { + claims, err := s.ClaimsMap() + if err != nil { + return Claim{}, false, err + } + var claim power10.Claim + ok, err := claims.Get(abi.AddrKey(addr), &claim) + if err != nil { + return Claim{}, false, err + } + return Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }, ok, nil +} + +func (s *state10) MinerNominalPowerMeetsConsensusMinimum(a address.Address) (bool, error) { + return s.State.MinerNominalPowerMeetsConsensusMinimum(s.store, a) +} + +func (s *state10) TotalPowerSmoothed() (builtin.FilterEstimate, error) { + return builtin.FilterEstimate(s.State.ThisEpochQAPowerSmoothed), nil +} + +func (s *state10) MinerCounts() (uint64, uint64, error) { + return uint64(s.State.MinerAboveMinPowerCount), uint64(s.State.MinerCount), nil +} + +func (s *state10) ListAllMiners() ([]address.Address, error) { + claims, err := s.ClaimsMap() + if err != nil { + return nil, err + } + + var miners []address.Address + err = claims.ForEach(nil, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + miners = append(miners, a) + return nil + }) + if err != nil { + return nil, err + } + + return miners, nil +} + +func (s *state10) ForEachClaim(cb func(miner address.Address, claim Claim) error) error { + claims, err := s.ClaimsMap() + if err != nil { + return err + } + + var claim power10.Claim + return claims.ForEach(&claim, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + return cb(a, Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }) + }) +} + +func (s *state10) ClaimsChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Claims.Equals(other10.State.Claims), nil +} + +func (s *state10) ClaimsMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.Claims, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) ClaimsMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) ClaimsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) decodeClaim(val *cbg.Deferred) (Claim, error) { + var ci power10.Claim + if err := ci.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Claim{}, err + } + return fromV10Claim(ci), nil +} + +func fromV10Claim(v10 power10.Claim) Claim { + return Claim{ + RawBytePower: v10.RawBytePower, + QualityAdjPower: v10.QualityAdjPower, + } +} + +func (s *state10) ActorKey() string { + return actors.PowerKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/reward/reward.go b/chain/actors/builtin/reward/reward.go index 119783664..2e80f6390 100644 --- a/chain/actors/builtin/reward/reward.go +++ b/chain/actors/builtin/reward/reward.go @@ -23,7 +23,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lotus/chain/types" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin9.RewardActorAddr - Methods = builtin9.MethodsReward + Address = builtin10.RewardActorAddr + Methods = builtin10.MethodsReward ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -53,6 +53,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -120,19 +123,21 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } diff --git a/chain/actors/builtin/reward/v10.go b/chain/actors/builtin/reward/v10.go new file mode 100644 index 000000000..1b77a2d66 --- /dev/null +++ b/chain/actors/builtin/reward/v10.go @@ -0,0 +1,109 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package reward + +import ( + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + reward10 "github.com/filecoin-project/go-state-types/builtin/v10/reward" + smoothing10 "github.com/filecoin-project/go-state-types/builtin/v10/util/smoothing" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state10 struct { + reward10.State + store adt.Store +} + +func (s *state10) ThisEpochReward() (abi.TokenAmount, error) { + return s.State.ThisEpochReward, nil +} + +func (s *state10) ThisEpochRewardSmoothed() (builtin.FilterEstimate, error) { + + return builtin.FilterEstimate{ + PositionEstimate: s.State.ThisEpochRewardSmoothed.PositionEstimate, + VelocityEstimate: s.State.ThisEpochRewardSmoothed.VelocityEstimate, + }, nil + +} + +func (s *state10) ThisEpochBaselinePower() (abi.StoragePower, error) { + return s.State.ThisEpochBaselinePower, nil +} + +func (s *state10) TotalStoragePowerReward() (abi.TokenAmount, error) { + return s.State.TotalStoragePowerReward, nil +} + +func (s *state10) EffectiveBaselinePower() (abi.StoragePower, error) { + return s.State.EffectiveBaselinePower, nil +} + +func (s *state10) EffectiveNetworkTime() (abi.ChainEpoch, error) { + return s.State.EffectiveNetworkTime, nil +} + +func (s *state10) CumsumBaseline() (reward10.Spacetime, error) { + return s.State.CumsumBaseline, nil +} + +func (s *state10) CumsumRealized() (reward10.Spacetime, error) { + return s.State.CumsumRealized, nil +} + +func (s *state10) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { + return miner10.InitialPledgeForPower( + qaPower, + s.State.ThisEpochBaselinePower, + s.State.ThisEpochRewardSmoothed, + smoothing10.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + circSupply, + ), nil +} + +func (s *state10) PreCommitDepositForPower(networkQAPower builtin.FilterEstimate, sectorWeight abi.StoragePower) (abi.TokenAmount, error) { + return miner10.PreCommitDepositForPower(s.State.ThisEpochRewardSmoothed, + smoothing10.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + sectorWeight), nil +} + +func (s *state10) ActorKey() string { + return actors.RewardKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/verifreg/actor.go.template b/chain/actors/builtin/verifreg/actor.go.template index 6882b000a..bf3141f1a 100644 --- a/chain/actors/builtin/verifreg/actor.go.template +++ b/chain/actors/builtin/verifreg/actor.go.template @@ -115,3 +115,8 @@ func VersionCodes() map[actors.Version]cid.Cid { {{- end}} } } + +type Allocation = verifregtypes.Allocation +type AllocationId = verifregtypes.AllocationId +type Claim = verifregtypes.Claim +type ClaimId = verifregtypes.ClaimId diff --git a/chain/actors/builtin/verifreg/state.go.template b/chain/actors/builtin/verifreg/state.go.template index 0a2512b3d..583f55dd8 100644 --- a/chain/actors/builtin/verifreg/state.go.template +++ b/chain/actors/builtin/verifreg/state.go.template @@ -28,7 +28,10 @@ import ( builtin{{.v}} "github.com/filecoin-project/go-state-types/builtin" {{end}} {{if (ge .v 9)}} - "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/big" + {{if (gt .v 9)}} + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + {{end}} {{else}} verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" {{end}} @@ -167,34 +170,50 @@ func (s *state{{.v}}) GetState() interface{} { return &s.State } -func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { {{if (le .v 8)}} return nil, false, fmt.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.FindAllocation(s.store, clientIdAddr, allocationId) -{{end}} + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg{{.v}}.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err{{end}} } -func (s *state{{.v}}) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state{{.v}}) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { {{if (le .v 8)}} return nil, fmt.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.LoadAllocationsToMap(s.store, clientIdAddr) + v{{.v}}Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v{{.v}}Map)) + for k, v := range v{{.v}}Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err {{end}} } -func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { {{if (le .v 8)}} return nil, false, fmt.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.FindClaim(s.store, providerIdAddr, claimId) + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg{{.v}}.ClaimId(claimId)) + return (*Claim)(claim), ok, err {{end}} } -func (s *state{{.v}}) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state{{.v}}) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { {{if (le .v 8)}} return nil, fmt.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.LoadClaimsToMap(s.store, providerIdAddr) + v{{.v}}Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v{{.v}}Map)) + for k, v := range v{{.v}}Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + {{end}} } diff --git a/chain/actors/builtin/verifreg/v0.go b/chain/actors/builtin/verifreg/v0.go index c48716228..2c972bc1a 100644 --- a/chain/actors/builtin/verifreg/v0.go +++ b/chain/actors/builtin/verifreg/v0.go @@ -130,25 +130,25 @@ func (s *state0) GetState() interface{} { return &s.State } -func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v0") } -func (s *state0) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state0) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v0") } -func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v0") } -func (s *state0) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state0) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v0") diff --git a/chain/actors/builtin/verifreg/v10.go b/chain/actors/builtin/verifreg/v10.go new file mode 100644 index 000000000..4c14f86d6 --- /dev/null +++ b/chain/actors/builtin/verifreg/v10.go @@ -0,0 +1,172 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package verifreg + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin10 "github.com/filecoin-project/go-state-types/builtin" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" + + "github.com/filecoin-project/go-state-types/big" + + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lily/chain/actors" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state10 struct { + verifreg10.State + store adt.Store +} + +func (s *state10) ActorKey() string { + return actors.VerifregKey +} + +func (s *state10) ActorVersion() actors.Version { + return actors.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func (s *state10) VerifiedClientsMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) VerifiedClientsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) VerifiedClientsMap() (adt.Map, error) { + + return nil, fmt.Errorf("unsupported in actors v10") + +} + +func (s *state10) VerifiersMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.Verifiers, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) VerifiersMapBitWidth() int { + + return builtin10.DefaultHamtBitwidth + +} + +func (s *state10) VerifiersMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state10) RootKey() (address.Address, error) { + return s.State.RootKey, nil +} + +func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + + return false, big.Zero(), fmt.Errorf("unsupported in actors v10") + +} + +func (s *state10) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version10, s.VerifiersMap, addr) +} + +func (s *state10) RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) { + return getRemoveDataCapProposalID(s.store, actors.Version10, s.removeDataCapProposalIDs, verifier, client) +} + +func (s *state10) ForEachVerifier(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachCap(s.store, actors.Version10, s.VerifiersMap, cb) +} + +func (s *state10) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + + return fmt.Errorf("unsupported in actors v10") + +} + +func (s *state10) removeDataCapProposalIDs() (adt.Map, error) { + return adt10.AsMap(s.store, s.RemoveDataCapProposalIDs, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg10.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state10) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v10Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v10Map)) + for k, v := range v10Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err + +} + +func (s *state10) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { + + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg10.ClaimId(claimId)) + return (*Claim)(claim), ok, err + +} + +func (s *state10) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v10Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v10Map)) + for k, v := range v10Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + +} diff --git a/chain/actors/builtin/verifreg/v2.go b/chain/actors/builtin/verifreg/v2.go index a1d388436..03cb17a4a 100644 --- a/chain/actors/builtin/verifreg/v2.go +++ b/chain/actors/builtin/verifreg/v2.go @@ -130,25 +130,25 @@ func (s *state2) GetState() interface{} { return &s.State } -func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v2") } -func (s *state2) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state2) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v2") } -func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v2") } -func (s *state2) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state2) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v2") diff --git a/chain/actors/builtin/verifreg/v3.go b/chain/actors/builtin/verifreg/v3.go index 3be489f1f..37f035eb1 100644 --- a/chain/actors/builtin/verifreg/v3.go +++ b/chain/actors/builtin/verifreg/v3.go @@ -132,25 +132,25 @@ func (s *state3) GetState() interface{} { return &s.State } -func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v3") } -func (s *state3) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state3) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v3") } -func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v3") } -func (s *state3) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state3) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v3") diff --git a/chain/actors/builtin/verifreg/v4.go b/chain/actors/builtin/verifreg/v4.go index 819b547ad..529e7cb4c 100644 --- a/chain/actors/builtin/verifreg/v4.go +++ b/chain/actors/builtin/verifreg/v4.go @@ -132,25 +132,25 @@ func (s *state4) GetState() interface{} { return &s.State } -func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v4") } -func (s *state4) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state4) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v4") } -func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v4") } -func (s *state4) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state4) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v4") diff --git a/chain/actors/builtin/verifreg/v5.go b/chain/actors/builtin/verifreg/v5.go index 83a2496f5..ea4513864 100644 --- a/chain/actors/builtin/verifreg/v5.go +++ b/chain/actors/builtin/verifreg/v5.go @@ -132,25 +132,25 @@ func (s *state5) GetState() interface{} { return &s.State } -func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v5") } -func (s *state5) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state5) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v5") } -func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v5") } -func (s *state5) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state5) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v5") diff --git a/chain/actors/builtin/verifreg/v6.go b/chain/actors/builtin/verifreg/v6.go index 8aec727be..3a9e658f7 100644 --- a/chain/actors/builtin/verifreg/v6.go +++ b/chain/actors/builtin/verifreg/v6.go @@ -132,25 +132,25 @@ func (s *state6) GetState() interface{} { return &s.State } -func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v6") } -func (s *state6) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state6) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v6") } -func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v6") } -func (s *state6) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state6) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v6") diff --git a/chain/actors/builtin/verifreg/v7.go b/chain/actors/builtin/verifreg/v7.go index 36b157b93..9aa6abefc 100644 --- a/chain/actors/builtin/verifreg/v7.go +++ b/chain/actors/builtin/verifreg/v7.go @@ -131,25 +131,25 @@ func (s *state7) GetState() interface{} { return &s.State } -func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v7") } -func (s *state7) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state7) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v7") } -func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v7") } -func (s *state7) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state7) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v7") diff --git a/chain/actors/builtin/verifreg/v8.go b/chain/actors/builtin/verifreg/v8.go index ab2ade637..18ef4bb11 100644 --- a/chain/actors/builtin/verifreg/v8.go +++ b/chain/actors/builtin/verifreg/v8.go @@ -130,25 +130,25 @@ func (s *state8) GetState() interface{} { return &s.State } -func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v8") } -func (s *state8) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state8) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, fmt.Errorf("unsupported in actors v8") } -func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, fmt.Errorf("unsupported in actors v8") } -func (s *state8) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state8) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, fmt.Errorf("unsupported in actors v8") diff --git a/chain/actors/builtin/verifreg/v9.go b/chain/actors/builtin/verifreg/v9.go index 3b8655b81..5ea7ec410 100644 --- a/chain/actors/builtin/verifreg/v9.go +++ b/chain/actors/builtin/verifreg/v9.go @@ -130,26 +130,41 @@ func (s *state9) GetState() interface{} { return &s.State } -func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { - - return s.FindAllocation(s.store, clientIdAddr, allocationId) +func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg9.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err } -func (s *state9) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state9) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v9Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v9Map)) + for k, v := range v9Map { + retMap[AllocationId(k)] = Allocation(v) + } - return s.LoadAllocationsToMap(s.store, clientIdAddr) + return retMap, err } -func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { - return s.FindClaim(s.store, providerIdAddr, claimId) + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg9.ClaimId(claimId)) + return (*Claim)(claim), ok, err } -func (s *state9) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state9) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v9Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v9Map)) + for k, v := range v9Map { + retMap[ClaimId(k)] = Claim(v) + } - return s.LoadClaimsToMap(s.store, providerIdAddr) + return retMap, err } diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index 104ff2d4e..e380a9a51 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -24,7 +24,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" lotusactors "github.com/filecoin-project/lotus/chain/actors" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin9.VerifiedRegistryActorAddr - Methods = builtin9.MethodsVerifiedRegistry + Address = builtin10.VerifiedRegistryActorAddr + Methods = builtin10.MethodsVerifiedRegistry ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -53,6 +53,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version9: return load9(store, act.Head) + case actors.Version10: + return load10(store, act.Head) + } } @@ -139,19 +142,26 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ - actors.Version0: (&state0{}).Code(), - actors.Version2: (&state2{}).Code(), - actors.Version3: (&state3{}).Code(), - actors.Version4: (&state4{}).Code(), - actors.Version5: (&state5{}).Code(), - actors.Version6: (&state6{}).Code(), - actors.Version7: (&state7{}).Code(), - actors.Version8: (&state8{}).Code(), - actors.Version9: (&state9{}).Code(), + actors.Version0: (&state0{}).Code(), + actors.Version2: (&state2{}).Code(), + actors.Version3: (&state3{}).Code(), + actors.Version4: (&state4{}).Code(), + actors.Version5: (&state5{}).Code(), + actors.Version6: (&state6{}).Code(), + actors.Version7: (&state7{}).Code(), + actors.Version8: (&state8{}).Code(), + actors.Version9: (&state9{}).Code(), + actors.Version10: (&state10{}).Code(), } } + +type Allocation = verifregtypes.Allocation +type AllocationId = verifregtypes.AllocationId +type Claim = verifregtypes.Claim +type ClaimId = verifregtypes.ClaimId diff --git a/chain/datasource/datasource.go b/chain/datasource/datasource.go index cb2a27a46..bee45ddd6 100644 --- a/chain/datasource/datasource.go +++ b/chain/datasource/datasource.go @@ -13,13 +13,13 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-hamt-ipld/v3" "github.com/filecoin-project/go-state-types/abi" + builtin_types "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/vm" states0 "github.com/filecoin-project/specs-actors/actors/states" states2 "github.com/filecoin-project/specs-actors/v2/actors/states" - states3 "github.com/filecoin-project/specs-actors/v3/actors/states" states4 "github.com/filecoin-project/specs-actors/v4/actors/states" states5 "github.com/filecoin-project/specs-actors/v5/actors/states" lru "github.com/hashicorp/golang-lru" @@ -445,8 +445,8 @@ func getStateTreeHamtRootCIDAndVersion(ctx context.Context, store adt.Store, c c } return tree.Map, root.Version, nil case types.StateTreeVersion2: - var tree *states3.Tree - tree, err := states3.LoadTree(store, root.Actors) + var tree *states2.Tree + tree, err := states2.LoadTree(store, root.Actors) if err != nil { return nil, 0, err } @@ -465,6 +465,13 @@ func getStateTreeHamtRootCIDAndVersion(ctx context.Context, store adt.Store, c c return nil, 0, err } return tree.Map, root.Version, nil + case types.StateTreeVersion5: + var tree *builtin_types.ActorTree + tree, err := builtin_types.LoadTree(store, root.Actors) + if tree != nil { + return nil, 0, err + } + return tree.Map, root.Version, nil default: return nil, 0, fmt.Errorf("unsupported state tree version: %d", root.Version) } diff --git a/chain/indexer/distributed/queue/tracing/carrier.go b/chain/indexer/distributed/queue/tracing/carrier.go index caf106460..0c95126d2 100644 --- a/chain/indexer/distributed/queue/tracing/carrier.go +++ b/chain/indexer/distributed/queue/tracing/carrier.go @@ -32,7 +32,7 @@ type TraceCarrier struct { Remote bool `json:"remote"` } -//MarshalJSON converts TraceCarrier to a trace.SpanContext and marshals it to JSON. +// MarshalJSON converts TraceCarrier to a trace.SpanContext and marshals it to JSON. func (c *TraceCarrier) MarshalJSON() ([]byte, error) { return c.AsSpanContext().MarshalJSON() } diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 20f104e88..86eac2161 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 20f104e88065aae59fd212d64be5bed108604e78 +Subproject commit 86eac2161f442945bffee3fbfe7d094c20b48dd3 diff --git a/go.mod b/go.mod index 15e185fe3..0930fec67 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/filecoin-project/go-amt-ipld/v3 v3.1.1 // indirect github.com/filecoin-project/go-bitfield v0.2.4 github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec - github.com/filecoin-project/go-jsonrpc v0.1.8 + github.com/filecoin-project/go-jsonrpc v0.1.9 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.9.10-0.20221109071515-5536f160fe27 - github.com/filecoin-project/lotus v1.18.0 + github.com/filecoin-project/go-state-types v0.10.0-alpha-10 + github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 @@ -22,12 +22,12 @@ require ( github.com/filecoin-project/specs-actors/v5 v5.0.6 github.com/filecoin-project/specs-actors/v6 v6.0.2 github.com/filecoin-project/specs-actors/v7 v7.0.1 - github.com/gammazero/workerpool v1.1.2 + github.com/gammazero/workerpool v1.1.3 github.com/go-pg/migrations/v8 v8.0.1 github.com/go-pg/pg/v10 v10.10.6 github.com/hashicorp/golang-lru v0.5.4 github.com/ipfs/go-block-format v0.0.3 - github.com/ipfs/go-cid v0.2.0 + github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-fs-lock v0.0.7 github.com/ipfs/go-ipfs-blockstore v1.2.0 github.com/ipfs/go-ipld-cbor v0.0.6 @@ -35,28 +35,28 @@ require ( github.com/ipfs/go-metrics-prometheus v0.0.2 github.com/ipld/go-car v0.4.0 github.com/lib/pq v1.9.0 - github.com/libp2p/go-libp2p-core v0.20.0 // indirect + github.com/libp2p/go-libp2p-core v0.20.1 // indirect github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/minio/sha256-simd v1.0.0 github.com/mitchellh/go-homedir v1.1.0 - github.com/multiformats/go-multiaddr v0.6.0 + github.com/multiformats/go-multiaddr v0.7.0 github.com/multiformats/go-multihash v0.2.1 - github.com/prometheus/client_golang v1.12.1 + github.com/prometheus/client_golang v1.13.0 github.com/raulk/clock v1.1.0 github.com/stretchr/testify v1.8.0 - github.com/urfave/cli/v2 v2.8.1 - github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c + github.com/urfave/cli/v2 v2.16.3 + github.com/whyrusleeping/cbor-gen v0.0.0-20221021053955-c138aae13722 go.opencensus.io v0.23.0 - go.opentelemetry.io/otel v1.7.0 - go.opentelemetry.io/otel/bridge/opencensus v0.25.0 + go.opentelemetry.io/otel v1.11.1 + go.opentelemetry.io/otel/bridge/opencensus v0.33.0 go.opentelemetry.io/otel/exporters/jaeger v1.2.0 - go.opentelemetry.io/otel/sdk v1.2.0 + go.opentelemetry.io/otel/sdk v1.11.1 go.uber.org/fx v1.15.0 go.uber.org/multierr v1.8.0 - go.uber.org/zap v1.22.0 - golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 + go.uber.org/zap v1.23.0 + golang.org/x/sync v0.0.0-20220907140024-f12130a52804 golang.org/x/text v0.3.7 - golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 gopkg.in/cheggaaa/pb.v1 v1.0.28 ) @@ -68,16 +68,16 @@ require ( github.com/hibiken/asynq/x v0.0.0-20220413130846-5c723f597e01 github.com/ipfs/go-ipld-format v0.4.0 github.com/jedib0t/go-pretty/v6 v6.2.7 - github.com/libp2p/go-libp2p v0.22.0 + github.com/libp2p/go-libp2p v0.23.2 github.com/multiformats/go-varint v0.0.6 - go.opentelemetry.io/otel/trace v1.7.0 + go.opentelemetry.io/otel/trace v1.11.1 go.uber.org/atomic v1.10.0 ) require ( - github.com/DataDog/zstd v1.4.1 // indirect + github.com/DataDog/zstd v1.4.5 // indirect github.com/GeertJohan/go.incremental v1.0.0 // indirect - github.com/GeertJohan/go.rice v1.0.2 // indirect + github.com/GeertJohan/go.rice v1.0.3 // indirect github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee // indirect github.com/Kubuxu/imtui v0.0.0-20210401140320-41663d68d0fa // indirect github.com/StackExchange/wmi v1.2.1 // indirect @@ -85,21 +85,22 @@ require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect github.com/akavel/rsrc v0.8.0 // indirect github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect + github.com/armon/go-metrics v0.3.9 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bep/debounce v1.2.0 // indirect + github.com/bep/debounce v1.2.1 // indirect + github.com/boltdb/bolt v1.3.1 // indirect github.com/buger/goterm v1.0.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cheekybits/genny v1.0.0 // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect github.com/cilium/ebpf v0.4.0 // indirect github.com/containerd/cgroups v1.0.4 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/coreos/go-systemd/v22 v22.4.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 // indirect github.com/cskr/pubsub v1.0.2 // indirect - github.com/daaku/go.zipexe v1.0.0 // indirect + github.com/daaku/go.zipexe v1.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect @@ -108,11 +109,12 @@ require ( github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/docker/go-units v0.4.0 // indirect + github.com/docker/go-units v0.5.0 // indirect github.com/drand/drand v1.3.0 // indirect github.com/drand/kyber v1.1.7 // indirect github.com/drand/kyber-bls12381 v0.2.1 // indirect github.com/dustin/go-humanize v1.0.0 // indirect + github.com/elastic/go-elasticsearch/v7 v7.14.0 // indirect github.com/elastic/go-sysinfo v1.7.0 // indirect github.com/elastic/go-windows v1.0.0 // indirect github.com/elastic/gosigar v0.14.2 // indirect @@ -124,10 +126,10 @@ require ( github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837 // indirect github.com/filecoin-project/go-crypto v0.0.1 // indirect github.com/filecoin-project/go-data-transfer v1.15.2 // indirect - github.com/filecoin-project/go-ds-versioning v0.1.1 // indirect + github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect github.com/filecoin-project/go-fil-commcid v0.1.0 // indirect github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 // indirect - github.com/filecoin-project/go-fil-markets v1.24.0-v17 // indirect + github.com/filecoin-project/go-fil-markets v1.25.2 // indirect github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 // indirect github.com/filecoin-project/go-legs v0.4.4 // indirect @@ -135,14 +137,14 @@ require ( github.com/filecoin-project/go-statemachine v1.0.2 // indirect github.com/filecoin-project/go-statestore v0.2.0 // indirect github.com/filecoin-project/go-storedcounter v0.1.0 // indirect - github.com/filecoin-project/index-provider v0.8.1 // indirect + github.com/filecoin-project/index-provider v0.9.1 // indirect github.com/filecoin-project/pubsub v1.0.0 // indirect github.com/filecoin-project/specs-actors/v8 v8.0.1 // indirect - github.com/filecoin-project/storetheindex v0.4.17 // indirect + github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 // indirect github.com/flynn/noise v1.0.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/gammazero/deque v0.1.0 // indirect + github.com/gammazero/deque v0.2.0 // indirect github.com/gbrlsnchs/jwt/v3 v3.0.1 // indirect github.com/gdamore/encoding v1.0.0 // indirect github.com/gdamore/tcell/v2 v2.2.0 // indirect @@ -164,13 +166,18 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/gopacket v1.1.19 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gorilla/mux v1.7.4 // indirect + github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026 // indirect github.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 // indirect github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-hclog v0.16.2 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/raft v1.1.1 // indirect + github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/icza/backscanner v0.0.0-20210726202459-ac2ffc679f94 // indirect github.com/ipfs/bbloom v0.0.4 // indirect @@ -178,12 +185,12 @@ require ( github.com/ipfs/go-bitswap v0.10.2 // indirect github.com/ipfs/go-blockservice v0.4.0 // indirect github.com/ipfs/go-cidutil v0.1.0 // indirect - github.com/ipfs/go-datastore v0.5.1 // indirect + github.com/ipfs/go-datastore v0.6.0 // indirect github.com/ipfs/go-ds-badger2 v0.1.2 // indirect github.com/ipfs/go-ds-leveldb v0.5.0 // indirect github.com/ipfs/go-ds-measure v0.2.0 // indirect github.com/ipfs/go-filestore v1.2.0 // indirect - github.com/ipfs/go-graphsync v0.13.1 // indirect + github.com/ipfs/go-graphsync v0.13.2 // indirect github.com/ipfs/go-ipfs-blocksutil v0.0.1 // indirect github.com/ipfs/go-ipfs-chunker v0.0.5 // indirect github.com/ipfs/go-ipfs-cmds v0.7.0 // indirect @@ -198,19 +205,20 @@ require ( github.com/ipfs/go-ipfs-routing v0.2.1 // indirect github.com/ipfs/go-ipfs-util v0.0.2 // indirect github.com/ipfs/go-ipld-legacy v0.1.1 // indirect - github.com/ipfs/go-ipns v0.2.0 // indirect + github.com/ipfs/go-ipns v0.3.0 // indirect github.com/ipfs/go-log v1.0.5 // indirect - github.com/ipfs/go-merkledag v0.8.0 // indirect + github.com/ipfs/go-merkledag v0.8.1 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipfs/go-path v0.3.0 // indirect - github.com/ipfs/go-peertaskqueue v0.7.1 // indirect - github.com/ipfs/go-unixfs v0.3.1 // indirect + github.com/ipfs/go-peertaskqueue v0.8.0 // indirect + github.com/ipfs/go-unixfs v0.4.0 // indirect github.com/ipfs/go-unixfsnode v1.4.0 // indirect - github.com/ipfs/go-verifcid v0.0.1 // indirect + github.com/ipfs/go-verifcid v0.0.2 // indirect github.com/ipfs/interface-go-ipfs-core v0.7.0 // indirect - github.com/ipld/go-car/v2 v2.4.1 // indirect - github.com/ipld/go-codec-dagpb v1.3.2 // indirect - github.com/ipld/go-ipld-prime v0.17.0 // indirect + github.com/ipld/go-car/v2 v2.5.0 // indirect + github.com/ipld/go-codec-dagpb v1.5.0 // indirect + github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 // indirect + github.com/ipld/go-ipld-prime v0.18.0 // indirect github.com/ipld/go-ipld-selector-text-lite v0.0.1 // indirect github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -223,20 +231,23 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/kelseyhightower/envconfig v1.4.0 // indirect github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391 // indirect - github.com/klauspost/compress v1.15.1 // indirect - github.com/klauspost/cpuid/v2 v2.1.0 // indirect + github.com/klauspost/compress v1.15.10 // indirect + github.com/klauspost/cpuid/v2 v2.1.1 // indirect github.com/koron/go-ssdp v0.0.3 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/libp2p/go-cidranger v1.1.0 // indirect github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect github.com/libp2p/go-libp2p-connmgr v0.4.0 // indirect - github.com/libp2p/go-libp2p-gostream v0.4.0 // indirect + github.com/libp2p/go-libp2p-consensus v0.0.1 // indirect + github.com/libp2p/go-libp2p-gorpc v0.4.0 // indirect + github.com/libp2p/go-libp2p-gostream v0.5.0 // indirect github.com/libp2p/go-libp2p-kad-dht v0.18.0 // indirect github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect github.com/libp2p/go-libp2p-noise v0.5.0 // indirect github.com/libp2p/go-libp2p-peerstore v0.8.0 // indirect - github.com/libp2p/go-libp2p-pubsub v0.8.0 // indirect + github.com/libp2p/go-libp2p-pubsub v0.8.2 // indirect + github.com/libp2p/go-libp2p-raft v0.1.8 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect github.com/libp2p/go-libp2p-routing-helpers v0.2.3 // indirect github.com/libp2p/go-libp2p-tls v0.5.0 // indirect @@ -246,12 +257,10 @@ require ( github.com/libp2p/go-netroute v0.2.0 // indirect github.com/libp2p/go-openssl v0.1.0 // indirect github.com/libp2p/go-reuseport v0.2.0 // indirect - github.com/libp2p/go-yamux/v3 v3.1.2 // indirect - github.com/lucas-clemente/quic-go v0.28.1 // indirect + github.com/libp2p/go-yamux/v4 v4.0.0 // indirect + github.com/lucas-clemente/quic-go v0.29.1 // indirect github.com/lucasb-eyer/go-colorful v1.0.3 // indirect github.com/magefile/mage v1.9.0 // indirect - github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect - github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect @@ -259,17 +268,18 @@ require ( github.com/mattn/go-isatty v0.0.16 // indirect github.com/mattn/go-pointer v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/miekg/dns v1.1.50 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiformats/go-base32 v0.0.4 // indirect + github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multibase v0.1.1 // indirect - github.com/multiformats/go-multicodec v0.5.0 // indirect + github.com/multiformats/go-multicodec v0.6.0 // indirect github.com/multiformats/go-multistream v0.3.3 // indirect github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c // indirect github.com/nkovacs/streamquote v1.0.0 // indirect @@ -299,6 +309,8 @@ require ( github.com/stretchr/objx v0.4.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/twmb/murmur3 v1.1.6 // indirect + github.com/ugorji/go/codec v1.2.6 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.0.1 // indirect github.com/vmihailenco/bufpool v0.1.11 // indirect @@ -313,19 +325,19 @@ require ( github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 // indirect github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect + github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.12.1 // indirect - go.opentelemetry.io/otel/metric v0.25.0 // indirect - go.opentelemetry.io/otel/sdk/export/metric v0.25.0 // indirect + go.opentelemetry.io/otel/metric v0.33.0 // indirect + go.opentelemetry.io/otel/sdk/metric v0.33.0 // indirect go.uber.org/dig v1.12.0 // indirect go4.org v0.0.0-20200411211856-f5505b9728dd // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect + golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect + golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect - golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect + golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5 // indirect + golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect google.golang.org/grpc v1.45.0 // indirect diff --git a/go.sum b/go.sum index 3c467edeb..056801278 100644 --- a/go.sum +++ b/go.sum @@ -49,12 +49,15 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM= +github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GeertJohan/go.incremental v1.0.0 h1:7AH+pY1XUgQE4Y1HcXYaMqAI0m9yrFqo/jt0CW30vsg= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= -github.com/GeertJohan/go.rice v1.0.2 h1:PtRw+Tg3oa3HYwiDBZyvOJ8LdIyf6lAovJJtr7YOAYk= -github.com/GeertJohan/go.rice v1.0.2/go.mod h1:af5vUNlDNkCjOZeSGFgIJxDje9qdjsO6hshx0gTmZt4= +github.com/GeertJohan/go.rice v1.0.3 h1:k5viR+xGtIhF61125vCE1cmJ5957RQGXG6dmbaWZSmI= +github.com/GeertJohan/go.rice v1.0.3/go.mod h1:XVdrU4pW00M4ikZed5q56tPf1v2KwnIKeIdc9CBYNt4= github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee h1:8doiS7ib3zi6/K172oDhSKU0dJ/miJramo9NITOMyZQ= github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= @@ -91,6 +94,9 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= +github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= @@ -102,16 +108,17 @@ github.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NR github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.2.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo= -github.com/bep/debounce v1.2.0/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= +github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= +github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= +github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -145,7 +152,6 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -156,6 +162,8 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= github.com/cilium/ebpf v0.4.0 h1:QlHdikaxALkqWasW8hAC1mfR0jdmvbfaBdBPFmRSglA= github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -168,6 +176,7 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/cgroups v1.0.4/go.mod h1:nLNQtsF7Sl2HxNebu77i1R0oDlhiTG+kO4JTrUzo6IA= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -179,22 +188,23 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= +github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg= github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= -github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= -github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= +github.com/daaku/go.zipexe v1.0.2 h1:Zg55YLYTr7M9wjKn8SY/WcpuuEi+kR2u4E8RhvpyXmk= +github.com/daaku/go.zipexe v1.0.2/go.mod h1:5xWogtqlYnfBXkSB1o9xysukNP9GTvaNkqzUZbt3Bw8= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -226,8 +236,9 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczC github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y= github.com/drand/drand v1.3.0 h1:k/w/PtHzmlU6OmfoAqgirWyrJ4FZH8ESlJrsKF20UkM= github.com/drand/drand v1.3.0/go.mod h1:D6kAVlxufq1gi71YCGfzN455JrXF4Q272ZJEG975fzo= @@ -246,6 +257,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/go-elasticsearch/v7 v7.14.0 h1:extp3jos/rwJn3J+lgbaGlwAgs0TVsIHme00GyNAyX4= +github.com/elastic/go-elasticsearch/v7 v7.14.0/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/elastic/go-sysinfo v1.7.0 h1:4vVvcfi255+8+TyQ7TYUTEK3A+G8v5FLE+ZKYL1z1Dg= github.com/elastic/go-sysinfo v1.7.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= github.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY= @@ -300,15 +313,15 @@ github.com/filecoin-project/go-crypto v0.0.1 h1:AcvpSGGCgjaY8y1az6AMfKQWreF/pWO2 github.com/filecoin-project/go-crypto v0.0.1/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ= github.com/filecoin-project/go-data-transfer v1.15.2 h1:PzqsFr2Q/onMGKrGh7TtRT0dKsJcVJrioJJnjnKmxlk= github.com/filecoin-project/go-data-transfer v1.15.2/go.mod h1:qXOJ3IF5dEJQHykXXTwcaRxu17bXAxr+LglXzkL6bZQ= -github.com/filecoin-project/go-ds-versioning v0.1.1 h1:JiyBqaQlwC+UM0WhcBtVEeT3XrX59mQhT8U3p7nu86o= -github.com/filecoin-project/go-ds-versioning v0.1.1/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= +github.com/filecoin-project/go-ds-versioning v0.1.2 h1:to4pTadv3IeV1wvgbCbN6Vqd+fu+7tveXgv/rCEZy6w= +github.com/filecoin-project/go-ds-versioning v0.1.2/go.mod h1:C9/l9PnB1+mwPa26BBVpCjG/XQCB0yj/q5CK2J8X1I4= github.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88OqLYEo6roi+GiIeOh8= github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8= -github.com/filecoin-project/go-fil-markets v1.24.0-v17 h1:YjT0usMeR6kdAo3RBfftTPe5bNIgNmBbo5YzJHF1iLk= -github.com/filecoin-project/go-fil-markets v1.24.0-v17/go.mod h1:JW/UHkHDqP4MikCIIWNY5IHvTTsdv/zNMk9jJXKzhIU= +github.com/filecoin-project/go-fil-markets v1.25.2 h1:kVfgaamTC7dkn8KwS5zRJBNEBSNvVqdG3BCoDaUYuCI= +github.com/filecoin-project/go-fil-markets v1.25.2/go.mod h1:dc2oTPU6GH3Qk1nA+Er+hSX64rg+NVykkPIWFBYxcZU= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= @@ -317,8 +330,8 @@ github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGy github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec h1:v+qI303NEoIxZMAsK6Ry4twUm4fFdDilY6x7RJRFdJo= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec/go.mod h1:LNNMpJFvDONV8ZMjKAgwjpYMQiINukJHshJJBgeBt3M= -github.com/filecoin-project/go-jsonrpc v0.1.8 h1:uXX/ikAk3Q4f/k8DRd9Zw+fWnfiYb5I+UI1tzlQgHog= -github.com/filecoin-project/go-jsonrpc v0.1.8/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.1.9 h1:HRWLxo7HAWzI3xZGeFG4LZJoYpms+Q+8kwmMTLnyS3A= +github.com/filecoin-project/go-jsonrpc v0.1.9/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-legs v0.4.4 h1:mpMmAOOnamaz0CV9rgeKhEWA8j9kMC+f+UGCGrxKaZo= github.com/filecoin-project/go-legs v0.4.4/go.mod h1:JQ3hA6xpJdbR8euZ2rO0jkxaMxeidXf0LDnVuqPAe9s= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= @@ -333,8 +346,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.9.10-0.20221109071515-5536f160fe27 h1:1/o3al2zThas9rW6xqPKAzjs4q2tiBHaBNBP2sx0Vc4= -github.com/filecoin-project/go-state-types v0.9.10-0.20221109071515-5536f160fe27/go.mod h1:7ty480tvttEAqWKywhAaDCElk7ksTqEXtXWAzTSdEKo= +github.com/filecoin-project/go-state-types v0.10.0-alpha-10 h1:QUpSayVFUADlrtzCh7SDNlbuaNSlYPBR46Nt7WpFl9I= +github.com/filecoin-project/go-state-types v0.10.0-alpha-10/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -343,10 +356,10 @@ github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNd github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo= github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5zQkWJM/CpAZa/uOuus= github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= -github.com/filecoin-project/index-provider v0.8.1 h1:ggoBWvMSWR91HZQCWfv8SZjoTGNyJBwNMLuN9bJZrbU= -github.com/filecoin-project/index-provider v0.8.1/go.mod h1:c/Ym5HtWPp9NQgNc9dgSBMpSNsZ/DE9FEi9qVubl5RM= -github.com/filecoin-project/lotus v1.18.0 h1:HxdShHMEZT703n9KlQTgPVoUF/ocidMC/d3TzwxzTP8= -github.com/filecoin-project/lotus v1.18.0/go.mod h1:jJih5ApnJZssc/wWsLJm+IWnfy8YaCyaDbvs/wTIVDk= +github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= +github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= +github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887 h1:uJ9wDdkPZ026muNv3IZGOHU5pPVfdmbW0DMozwCDSDs= +github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887/go.mod h1:Lzz0lq20H+5z2RKaKvrYQK04hpr5Sd7DlFkRwvrSmWQ= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= @@ -367,9 +380,10 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= -github.com/filecoin-project/storetheindex v0.4.17 h1:w0dVc954TGPukoVbidlYvn9Xt+wVhk5vBvrqeJiRo8I= -github.com/filecoin-project/storetheindex v0.4.17/go.mod h1:y2dL8C5D3PXi183hdxgGtM8vVYOZ1lg515tpl/D3tN8= +github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 h1:6GCuzxLVHBzlz7y+FkbHh6n0UyoEGWqDwJKQPJoz7bE= +github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893/go.mod h1:S7590oDimBvXMUtzWsBXoshu9HtYKwtXl47zAK9rcP8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= @@ -380,14 +394,16 @@ github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/gammazero/deque v0.1.0 h1:f9LnNmq66VDeuAlSAapemq/U7hJ2jpIWa4c09q8Dlik= -github.com/gammazero/deque v0.1.0/go.mod h1:KQw7vFau1hHuM8xmI9RbgKFbAsQFWmBpqQ2KenFLk6M= -github.com/gammazero/workerpool v1.1.2 h1:vuioDQbgrz4HoaCi2q1HLlOXdpbap5AET7xu5/qj87g= -github.com/gammazero/workerpool v1.1.2/go.mod h1:UelbXcO0zCIGFcufcirHhq2/xtLXJdQ29qZNlXG9OjQ= +github.com/gammazero/deque v0.2.0 h1:SkieyNB4bg2/uZZLxvya0Pq6diUlwx7m2TeT7GAIWaA= +github.com/gammazero/deque v0.2.0/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= +github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= +github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= github.com/gbrlsnchs/jwt/v3 v3.0.1 h1:lbUmgAKpxnClrKloyIwpxm4OuWeDl5wLk52G91ODPw4= github.com/gbrlsnchs/jwt/v3 v3.0.1/go.mod h1:AncDcjXz18xetI3A6STfXq2w+LuTx8pQ8bGEwRN8zVM= github.com/gdamore/encoding v1.0.0 h1:+7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra+YNuAtDBdko= @@ -514,7 +530,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -543,14 +560,15 @@ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk= github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc= github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -582,17 +600,27 @@ github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyN github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.9.1/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-hclog v0.16.2 h1:K4ev2ib4LdQETX5cSZBG0DVLk1jwGqSPXBjdah3veNs= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -604,6 +632,10 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/raft v1.1.1 h1:HJr7UE1x/JrJSc9Oy6aDBHtNHUUBHjcQjTgvUVihoZs= +github.com/hashicorp/raft v1.1.1/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= +github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea h1:xykPFhrBAS2J0VBzVa5e80b5ZtYuNQtgXjN40qBZlD4= +github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hibiken/asynq v0.21.0/go.mod h1:tyc63ojaW8SJ5SBm8mvI4DDONsguP5HE85EEl4Qr5Ig= github.com/hibiken/asynq v0.23.0 h1:kmKkNFgqiXBatC8oz94Mer6uvKoGn4STlIVDV5wnKyE= @@ -655,8 +687,9 @@ github.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnO github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.1.0/go.mod h1:rH5/Xv83Rfy8Rw6xG+id3DYAMUVmem1MowoKwdXmN2o= -github.com/ipfs/go-cid v0.2.0 h1:01JTiihFq9en9Vz0lc0VDWvZe/uBonGpzo4THP0vcQ0= github.com/ipfs/go-cid v0.2.0/go.mod h1:P+HXFDF4CVhaVayiEb4wkAy7zBHxBwsJyt0Y5U6MLro= +github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= +github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= github.com/ipfs/go-cidutil v0.1.0/go.mod h1:e7OEVBMIv9JaOxt9zaGEmAoSlXW9jdFZ5lP/0PwcfpA= github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= @@ -669,8 +702,9 @@ github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13X github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= -github.com/ipfs/go-datastore v0.5.1 h1:WkRhLuISI+XPD0uk3OskB0fYFSyqK8Ob5ZYew9Qa1nQ= github.com/ipfs/go-datastore v0.5.1/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= +github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= +github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= github.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= @@ -694,8 +728,8 @@ github.com/ipfs/go-filestore v1.2.0/go.mod h1:HLJrCxRXquTeEEpde4lTLMaE/MYJZD7WHL github.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM= github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U= github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= -github.com/ipfs/go-graphsync v0.13.1 h1:lWiP/WLycoPUYyj3IDEi1GJNP30kFuYOvimcfeuZyQs= -github.com/ipfs/go-graphsync v0.13.1/go.mod h1:y8e8G6CmZeL9Srvx1l15CtGiRdf3h5JdQuqPz/iYL0A= +github.com/ipfs/go-graphsync v0.13.2 h1:+7IjTrdg3+3iwtPXSkLoxvhaByS3+3b9NStMAowFqkw= +github.com/ipfs/go-graphsync v0.13.2/go.mod h1:TO1Y65spARny/t37hkid5xCpQJ6vR7A7VFTEUb0Z6eA= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw= github.com/ipfs/go-ipfs-blockstore v0.2.1/go.mod h1:jGesd8EtCM3/zPgx+qr0/feTXGUeRai6adgwC+Q+JvE= @@ -760,8 +794,8 @@ github.com/ipfs/go-ipld-format v0.4.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxn github.com/ipfs/go-ipld-legacy v0.1.0/go.mod h1:86f5P/srAmh9GcIcWQR9lfFLZPrIyyXQeVlOWeeWEuI= github.com/ipfs/go-ipld-legacy v0.1.1 h1:BvD8PEuqwBHLTKqlGFTHSwrwFOMkVESEvwIYwR2cdcc= github.com/ipfs/go-ipld-legacy v0.1.1/go.mod h1:8AyKFCjgRPsQFf15ZQgDB8Din4DML/fOmKZkkFkrIEg= -github.com/ipfs/go-ipns v0.2.0 h1:BgmNtQhqOw5XEZ8RAfWEpK4DhqaYiuP6h71MhIp7xXU= -github.com/ipfs/go-ipns v0.2.0/go.mod h1:3cLT2rbvgPZGkHJoPO1YMJeh6LtkxopCkKFcio/wE24= +github.com/ipfs/go-ipns v0.3.0 h1:ai791nTgVo+zTuq2bLvEGmWP1M0A6kGTXUsgv/Yq67A= +github.com/ipfs/go-ipns v0.3.0/go.mod h1:3cLT2rbvgPZGkHJoPO1YMJeh6LtkxopCkKFcio/wE24= 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= @@ -781,6 +815,7 @@ github.com/ipfs/go-log/v2 v2.1.2/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHn github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= github.com/ipfs/go-log/v2 v2.4.0/go.mod h1:nPZnh7Cj7lwS3LpRU5Mwr2ol1c2gXIEXuF6aywqrtmo= +github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk= @@ -788,8 +823,8 @@ github.com/ipfs/go-merkledag v0.2.4/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M= github.com/ipfs/go-merkledag v0.5.1/go.mod h1:cLMZXx8J08idkp5+id62iVftUQV+HlYJ3PIhDfZsjA4= github.com/ipfs/go-merkledag v0.6.0/go.mod h1:9HSEwRd5sV+lbykiYP+2NC/3o6MZbKNaa4hfNcH5iH0= -github.com/ipfs/go-merkledag v0.8.0 h1:ZUda+sh/MGZX4Z13DE/VQT4GmKWm4H95Nje4qcL/yPE= -github.com/ipfs/go-merkledag v0.8.0/go.mod h1:/RmH1kOs7qDMNtGKPh4d/UErNMVuAMpPS/tP57a3aoY= +github.com/ipfs/go-merkledag v0.8.1 h1:N3yrqSre/ffvdwtHL4MXy0n7XH+VzN8DlzDrJySPa94= +github.com/ipfs/go-merkledag v0.8.1/go.mod h1:uYUlWE34GhbcTjGuUDEcdPzsEtOdnOupL64NgSRjmWI= 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-metrics-prometheus v0.0.2 h1:9i2iljLg12S78OhC6UAiXi176xvQGiZaGVF1CUVdE+s= @@ -798,17 +833,20 @@ github.com/ipfs/go-path v0.3.0 h1:tkjga3MtpXyM5v+3EbRvOHEoo+frwi4oumw5K+KYWyA= github.com/ipfs/go-path v0.3.0/go.mod h1:NOScsVgxfC/eIw4nz6OiGwK42PjaSJ4Y/ZFPn1Xe07I= github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= github.com/ipfs/go-peertaskqueue v0.7.0/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= -github.com/ipfs/go-peertaskqueue v0.7.1 h1:7PLjon3RZwRQMgOTvYccZ+mjzkmds/7YzSWKFlBAypE= github.com/ipfs/go-peertaskqueue v0.7.1/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= +github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJYsUjqaU= +github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= -github.com/ipfs/go-unixfs v0.3.1 h1:LrfED0OGfG98ZEegO4/xiprx2O+yS+krCMQSp7zLVv8= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= +github.com/ipfs/go-unixfs v0.4.0 h1:qSyyxfB/OiDdWHYiSbyaqKC7zfSE/TFL0QdwkRjBm20= +github.com/ipfs/go-unixfs v0.4.0/go.mod h1:I7Nqtm06HgOOd+setAoCU6rf/HgVFHE+peeNuOv/5+g= github.com/ipfs/go-unixfsnode v1.1.2/go.mod h1:5dcE2x03pyjHk4JjamXmunTMzz+VUtqvPwZjIEkfV6s= github.com/ipfs/go-unixfsnode v1.4.0 h1:9BUxHBXrbNi8mWHc6j+5C580WJqtVw9uoeEKn4tMhwA= github.com/ipfs/go-unixfsnode v1.4.0/go.mod h1:qc7YFFZ8tABc58p62HnIYbUMwj9chhUuFWmxSokfePo= -github.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E= github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= +github.com/ipfs/go-verifcid v0.0.2 h1:XPnUv0XmdH+ZIhLGKg6U2vaPaRDXb9urMyNVCE7uvTs= +github.com/ipfs/go-verifcid v0.0.2/go.mod h1:40cD9x1y4OWnFXbLNJYRe7MpNvWlMn3LZAG5Wb4xnPU= github.com/ipfs/interface-go-ipfs-core v0.7.0 h1:7tb+2upz8oCcjIyjo1atdMk+P+u7wPmI+GksBlLE8js= github.com/ipfs/interface-go-ipfs-core v0.7.0/go.mod h1:lF27E/nnSPbylPqKVXGZghal2hzifs3MmjyiEjnc9FY= github.com/ipfs/iptb v1.4.0 h1:YFYTrCkLMRwk/35IMyC6+yjoQSHTEcNcefBStLJzgvo= @@ -817,13 +855,15 @@ github.com/ipld/go-car v0.1.0/go.mod h1:RCWzaUh2i4mOEkB3W45Vc+9jnS/M6Qay5ooytiBH github.com/ipld/go-car v0.4.0 h1:U6W7F1aKF/OJMHovnOVdst2cpQE5GhmHibQkAixgNcQ= github.com/ipld/go-car v0.4.0/go.mod h1:Uslcn4O9cBKK9wqHm/cLTFacg6RAPv6LZx2mxd2Ypl4= github.com/ipld/go-car/v2 v2.1.1/go.mod h1:+2Yvf0Z3wzkv7NeI69i8tuZ+ft7jyjPYIWZzeVNeFcI= -github.com/ipld/go-car/v2 v2.4.1 h1:9S+FYbQzQJ/XzsdiOV13W5Iu/i+gUnr6csbSD9laFEg= -github.com/ipld/go-car/v2 v2.4.1/go.mod h1:zjpRf0Jew9gHqSvjsKVyoq9OY9SWoEKdYCQUKVaaPT0= +github.com/ipld/go-car/v2 v2.5.0 h1:S9h7A6qBAJ+B1M1jIKtau+HPDe30UbM71vsyBzwvRIE= +github.com/ipld/go-car/v2 v2.5.0/go.mod h1:jKjGOqoCj5zn6KjnabD6JbnCsMntqU2hLiU6baZVO3E= github.com/ipld/go-codec-dagpb v1.2.0/go.mod h1:6nBN7X7h8EOsEejZGqC7tej5drsdBAXbMHyBT+Fne5s= github.com/ipld/go-codec-dagpb v1.3.0/go.mod h1:ga4JTU3abYApDC3pZ00BC2RSvC3qfBb9MSJkMLSwnhA= github.com/ipld/go-codec-dagpb v1.3.1/go.mod h1:ErNNglIi5KMur/MfFE/svtgQthzVvf+43MrzLbpcIZY= -github.com/ipld/go-codec-dagpb v1.3.2 h1:MZQUIjanHXXfDuYmtWYT8nFbqfFsZuyHClj6VDmSXr4= -github.com/ipld/go-codec-dagpb v1.3.2/go.mod h1:ga4JTU3abYApDC3pZ00BC2RSvC3qfBb9MSJkMLSwnhA= +github.com/ipld/go-codec-dagpb v1.5.0 h1:RspDRdsJpLfgCI0ONhTAnbHdySGD4t+LHSPK4X1+R0k= +github.com/ipld/go-codec-dagpb v1.5.0/go.mod h1:0yRIutEFD8o1DGVqw4RSHh+BUTlJA9XWldxaaWR/o4g= +github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 h1:QAI/Ridj0+foHD6epbxmB4ugxz9B4vmNdYSmQLGa05E= +github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0/go.mod h1:odxGcpiQZLzP5+yGu84Ljo8y3EzCvNAQKEodHNsHLXA= github.com/ipld/go-ipld-prime v0.0.2-0.20191108012745-28a82f04c785/go.mod h1:bDDSvVz7vaK12FNvMeRYnpRFkSUPNQOiCYQezMD/P3w= github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= github.com/ipld/go-ipld-prime v0.9.1-0.20210324083106-dc342a9917db/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= @@ -831,8 +871,9 @@ github.com/ipld/go-ipld-prime v0.10.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/ github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHtEaLglS3ZeV8= github.com/ipld/go-ipld-prime v0.14.0/go.mod h1:9ASQLwUFLptCov6lIYc70GRB4V7UTyLD0IJtrDJe6ZM= github.com/ipld/go-ipld-prime v0.16.0/go.mod h1:axSCuOCBPqrH+gvXr2w9uAOulJqBPhHPT2PjoiiU1qA= -github.com/ipld/go-ipld-prime v0.17.0 h1:+U2peiA3aQsE7mrXjD2nYZaZrCcakoz2Wge8K42Ld8g= github.com/ipld/go-ipld-prime v0.17.0/go.mod h1:aYcKm5TIvGfY8P3QBKz/2gKcLxzJ1zDaD+o0bOowhgs= +github.com/ipld/go-ipld-prime v0.18.0 h1:xUk7NUBSWHEXdjiOu2sLXouFJOMs0yoYzeI5RAqhYQo= +github.com/ipld/go-ipld-prime v0.18.0/go.mod h1:735yXW548CKrLwVCYXzqx90p5deRJMVVxM9eJ4Qe+qE= github.com/ipld/go-ipld-prime-proto v0.0.0-20191113031812-e32bd156a1e5/go.mod h1:gcvzoEDBjwycpXt3LBE061wT9f46szXGHAmj9uoP6fU= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73 h1:TsyATB2ZRRQGTwafJdgEUQkmjOExRV0DNokcihZxbnQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73/go.mod h1:2PJ0JgxyB08t0b2WKrcuqI3di0V+5n6RS/LTUJhkoxY= @@ -904,13 +945,16 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.10 h1:Ai8UzuomSCDw90e1qNMtb15msBXsNpH6gzkkENQNcJo= +github.com/klauspost/compress v1.15.10/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= -github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= +github.com/klauspost/cpuid/v2 v2.1.1 h1:t0wUqjowdm8ezddV5k0tLWVklVuvLJpoHeb4WBdydm0= +github.com/klauspost/cpuid/v2 v2.1.1/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= @@ -957,11 +1001,13 @@ github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZk github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= +github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t2DTVAJxMo= github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= -github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= +github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= github.com/libp2p/go-libp2p v0.17.0/go.mod h1:Fkin50rsGdv5mm5BshBUtPRZknt9esfmYXBOYcwOTgw= -github.com/libp2p/go-libp2p v0.22.0 h1:2Tce0kHOp5zASFKJbNzRElvh0iZwdtG5uZheNW8chIw= -github.com/libp2p/go-libp2p v0.22.0/go.mod h1:UDolmweypBSjQb2f7xutPnwZ/fxioLbMBxSjRksxxU4= +github.com/libp2p/go-libp2p v0.19.4/go.mod h1:MIt8y481VDhUe4ErWi1a4bvt/CjjFfOq6kZTothWIXY= +github.com/libp2p/go-libp2p v0.23.2 h1:yqyTeKQJyofWXxEv/eEVUvOrGdt/9x+0PIQ4N1kaxmE= +github.com/libp2p/go-libp2p v0.23.2/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I= github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= @@ -970,8 +1016,8 @@ github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/ github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= +github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= github.com/libp2p/go-libp2p-autonat v0.4.2/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= -github.com/libp2p/go-libp2p-autonat v0.6.0/go.mod h1:bFC6kY8jwzNNWoqc8iGE57vsfwyJ/lP4O4DOV1e0B2o= github.com/libp2p/go-libp2p-autonat v0.7.0/go.mod h1:uPvPn6J7cN+LCfFwW5tpOYvAz5NvPTc4iBamTV/WDMg= github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= @@ -981,10 +1027,13 @@ github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFk github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= +github.com/libp2p/go-libp2p-circuit v0.6.0/go.mod h1:kB8hY+zCpMeScyvFrKrGicRdid6vNXbunKE4rXATZ0M= github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= github.com/libp2p/go-libp2p-connmgr v0.3.0/go.mod h1:RVoyPjJm0J9Vd1m6qUN2Tn7kJm4rL1Ml20pFsFgPGik= github.com/libp2p/go-libp2p-connmgr v0.4.0 h1:q/KZUS1iMDIQckMZarMYwhQisJqiFPHAVC1c4DR3hDE= github.com/libp2p/go-libp2p-connmgr v0.4.0/go.mod h1:exFQQm19PFAx+QuJmBPw4MM58QejzPJRFFFYnNmgi2w= +github.com/libp2p/go-libp2p-consensus v0.0.1 h1:jcVbHRZLwTXU9iT/mPi+Lx4/OrIzq3bU1TbZNhYFCV8= +github.com/libp2p/go-libp2p-consensus v0.0.1/go.mod h1:+9Wrfhc5QOqWB0gXI0m6ARlkHfdJpcFXmRU0WoHz4Mo= github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= @@ -1015,16 +1064,21 @@ github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQR github.com/libp2p/go-libp2p-core v0.11.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= github.com/libp2p/go-libp2p-core v0.12.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= github.com/libp2p/go-libp2p-core v0.13.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.20.0 h1:PGKM74+T+O/FaZNARNW32i90RMBHCcgd/hkum2UQ5eY= -github.com/libp2p/go-libp2p-core v0.20.0/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY= +github.com/libp2p/go-libp2p-core v0.14.0/go.mod h1:tLasfcVdTXnixsLB0QYaT1syJOhsbrhG7q6pGrHtBg8= +github.com/libp2p/go-libp2p-core v0.15.1/go.mod h1:agSaboYM4hzB1cWekgVReqV5M4g5M+2eNNejV+1EEhs= +github.com/libp2p/go-libp2p-core v0.20.1 h1:fQz4BJyIFmSZAiTbKV8qoYhEH5Dtv/cVhZbG3Ib/+Cw= +github.com/libp2p/go-libp2p-core v0.20.1/go.mod h1:6zR8H7CvQWgYLsbG4on6oLNSGcyKaYFSEYyDt51+bIY= github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= github.com/libp2p/go-libp2p-discovery v0.6.0/go.mod h1:/u1voHt0tKIe5oIA1RHBKQLVCWPna2dXmPNHc2zR9S8= -github.com/libp2p/go-libp2p-gostream v0.4.0 h1:heduMMEB78yBqeEQv+P7Fn5X926MHC2jDIC7/7yLpYA= -github.com/libp2p/go-libp2p-gostream v0.4.0/go.mod h1:21DVGBcCQwRfEXZpCnZ2kG24QiEkBpEQvG53gYXE4u0= +github.com/libp2p/go-libp2p-gorpc v0.4.0 h1:kxHg5C3IuXeOq5FHPGbMHwQzKDlTVeB/NDr0ndc8J/g= +github.com/libp2p/go-libp2p-gorpc v0.4.0/go.mod h1:jux2Mb6BfUE1n58KbVCmWtqvpiZo0DDaKobKInf4s5o= +github.com/libp2p/go-libp2p-gostream v0.3.1/go.mod h1:1V3b+u4Zhaq407UUY9JLCpboaeufAeVQbnvAt12LRsI= +github.com/libp2p/go-libp2p-gostream v0.5.0 h1:niNGTUrFoUDP/8jxMgu97zngMO+UGYBpVpbCKwIJBls= +github.com/libp2p/go-libp2p-gostream v0.5.0/go.mod h1:rXrb0CqfcRRxa7m3RSKORQiKiWgk3IPeXWda66ZXKsA= github.com/libp2p/go-libp2p-kad-dht v0.18.0 h1:akqO3gPMwixR7qFSFq70ezRun97g5hrA/lBW9jrjUYM= github.com/libp2p/go-libp2p-kad-dht v0.18.0/go.mod h1:Gb92MYIPm3K2pJLGn8wl0m8wiKDvHrYpg+rOd0GzzPA= github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA= @@ -1036,13 +1090,16 @@ github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw= github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= +github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M= github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= github.com/libp2p/go-libp2p-nat v0.1.0/go.mod h1:DQzAG+QbDYjN1/C3B6vXucLtz3u9rEonLVPtZVzQqks= github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= +github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= github.com/libp2p/go-libp2p-noise v0.2.0/go.mod h1:IEbYhBBzGyvdLBoxxULL/SGbJARhUeqlO8lVSREYu2Q= github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= +github.com/libp2p/go-libp2p-noise v0.4.0/go.mod h1:BzzY5pyzCYSyJbQy9oD8z5oP2idsafjt4/X42h9DjZU= github.com/libp2p/go-libp2p-noise v0.5.0 h1:gwJZ/3iH3MRnBrLIyr/YLdCOnmqfJMptlsFFUIc3j0Y= github.com/libp2p/go-libp2p-noise v0.5.0/go.mod h1:CYYpJ+T4pox1d1J/hhUVxuMf6b2s3c41hFUgS8/yFQw= github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= @@ -1059,16 +1116,20 @@ github.com/libp2p/go-libp2p-peerstore v0.8.0 h1:bzTG693TA1Ju/zKmUCQzDLSqiJnyRFVw github.com/libp2p/go-libp2p-peerstore v0.8.0/go.mod h1:9geHWmNA3YDlQBjL/uPEJD6vpDK12aDNlUNHJ6kio/s= github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= -github.com/libp2p/go-libp2p-pubsub v0.8.0 h1:KygfDpaa9AeUPGCVcpVenpXNFauDn+5kBYu3EjcL3Tg= -github.com/libp2p/go-libp2p-pubsub v0.8.0/go.mod h1:e4kT+DYjzPUYGZeWk4I+oxCSYTXizzXii5LDRRhjKSw= +github.com/libp2p/go-libp2p-pubsub v0.8.2 h1:QLGUmkgKmwEVxVDYGsqc5t9CykOMY2Y21cXQHjR462I= +github.com/libp2p/go-libp2p-pubsub v0.8.2/go.mod h1:e4kT+DYjzPUYGZeWk4I+oxCSYTXizzXii5LDRRhjKSw= github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA= github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= -github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= github.com/libp2p/go-libp2p-quic-transport v0.15.2/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= +github.com/libp2p/go-libp2p-quic-transport v0.16.0/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ= +github.com/libp2p/go-libp2p-quic-transport v0.17.0/go.mod h1:x4pw61P3/GRCcSLypcQJE/Q2+E9f4X+5aRcZLXf20LM= +github.com/libp2p/go-libp2p-raft v0.1.8 h1:Fq0aWHbbhi6WJXf+yaOQeMzV+9UgkbHIIGyaJbH3vpo= +github.com/libp2p/go-libp2p-raft v0.1.8/go.mod h1:+YDisn3uszb7vxshLgKoDdRGs79WSbHRgrOdrYqDPk4= github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= +github.com/libp2p/go-libp2p-resource-manager v0.2.1/go.mod h1:K+eCkiapf+ey/LADO4TaMpMTP9/Qde/uLlrnRqV4PLQ= github.com/libp2p/go-libp2p-routing-helpers v0.2.3 h1:xY61alxJ6PurSi+MXbywZpelvuU4U4p/gPTxjqCqTzY= github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= @@ -1080,9 +1141,12 @@ github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaT github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= +github.com/libp2p/go-libp2p-swarm v0.4.0/go.mod h1:XVFcO52VoLoo0eitSxNQWYq4D6sydGOweTOAjJNraCw= github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat6JknzUehFx8xW4= github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc= github.com/libp2p/go-libp2p-swarm v0.9.0/go.mod h1:2f8d8uxTJmpeqHF/1ujjdXZp+98nNIbujVOMEZxCbZ8= +github.com/libp2p/go-libp2p-swarm v0.10.0/go.mod h1:71ceMcV6Rg/0rIQ97rsZWMzto1l9LnNquef+efcRbmA= +github.com/libp2p/go-libp2p-swarm v0.10.2/go.mod h1:Pdkq0QU5a+qu+oyqIV3bknMsnzk9lnNyKvB9acJ5aZs= github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= @@ -1094,19 +1158,26 @@ github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotl github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= github.com/libp2p/go-libp2p-testing v0.6.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= +github.com/libp2p/go-libp2p-testing v0.7.0/go.mod h1:OLbdn9DbgdMwv00v+tlp1l3oe2Cl+FAjoWIA2pa0X6E= +github.com/libp2p/go-libp2p-testing v0.9.0/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldraIanyjuRiAbK/XQU= +github.com/libp2p/go-libp2p-testing v0.9.2/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldraIanyjuRiAbK/XQU= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= github.com/libp2p/go-libp2p-tls v0.3.1/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= +github.com/libp2p/go-libp2p-tls v0.4.1/go.mod h1:EKCixHEysLNDlLUoKxv+3f/Lp90O2EXNjTr0UQDnrIw= github.com/libp2p/go-libp2p-tls v0.5.0 h1:aRNTeOI8Ljm1r4L2uMGxkMsVnyZoPwaqQqMw23qAsQs= github.com/libp2p/go-libp2p-tls v0.5.0/go.mod h1:1a4tq0xQSZ0kAkDkZVAppuP3SAIUHcnzi2djJ/2EN4I= github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= +github.com/libp2p/go-libp2p-transport-upgrader v0.4.0/go.mod h1:J4ko0ObtZSmgn5BX5AmegP+dK3CSnU2lMCKsSq/EY0s= github.com/libp2p/go-libp2p-transport-upgrader v0.4.2/go.mod h1:NR8ne1VwfreD5VIWIU62Agt/J18ekORFU/j1i2y8zvk= github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= github.com/libp2p/go-libp2p-transport-upgrader v0.6.0/go.mod h1:1e07y1ZSZdHo9HPbuU8IztM1Cj+DR5twgycb4pnRzRo= +github.com/libp2p/go-libp2p-transport-upgrader v0.7.0/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= +github.com/libp2p/go-libp2p-transport-upgrader v0.7.1/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg= github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= @@ -1115,9 +1186,12 @@ github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhL github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po= +github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5cMVO9S94Y6gkv4= github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE= -github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k= github.com/libp2p/go-libp2p-yamux v0.7.0/go.mod h1:fMyA0CsPfHkIuBU0wjRGrCjTBFiXTXxG0k5M4ETv+08= +github.com/libp2p/go-libp2p-yamux v0.8.0/go.mod h1:yTkPgN2ib8FHyU1ZcVD7aelzyAqXXwEPbyx+aSKm9h8= +github.com/libp2p/go-libp2p-yamux v0.8.1/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE= +github.com/libp2p/go-libp2p-yamux v0.9.1/go.mod h1:wRc6wvyxQINFcKe7daL4BeQ02Iyp+wxyC8WCNfngBrA= github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= github.com/libp2p/go-maddr-filter v0.1.0 h1:4ACqZKw8AqiuJfwFGq1CYDFugfXTOos+qQ3DETkhtCE= @@ -1128,6 +1202,7 @@ github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3 github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= +github.com/libp2p/go-mplex v0.4.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E= github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= @@ -1168,17 +1243,23 @@ github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2L github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= +github.com/libp2p/go-stream-muxer-multistream v0.4.0/go.mod h1:nb+dGViZleRP4XcyHuZSVrJCBl55nRBOMmiSL/dyziw= github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= +github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= github.com/libp2p/go-tcp-transport v0.2.3/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= +github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI= +github.com/libp2p/go-tcp-transport v0.5.0/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= +github.com/libp2p/go-tcp-transport v0.5.1/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y= github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc= github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA= github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= +github.com/libp2p/go-ws-transport v0.6.0/go.mod h1:dXqtI9e2JV9FtF1NOtWVZSKXh5zXvnuwPXfj8GPBbYU= github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= @@ -1187,18 +1268,26 @@ github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZ github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= +github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U= github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs= -github.com/libp2p/go-yamux/v3 v3.1.2 h1:lNEy28MBk1HavUAlzKgShp+F6mn/ea1nDYWftZhFW9Q= +github.com/libp2p/go-yamux/v3 v3.0.1/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= +github.com/libp2p/go-yamux/v3 v3.0.2/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo= +github.com/libp2p/go-yamux/v3 v3.1.1/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= github.com/libp2p/go-yamux/v3 v3.1.2/go.mod h1:jeLEQgLXqE2YqX1ilAClIfCMDY+0uXQUKmmb/qp0gT4= +github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= +github.com/libp2p/go-yamux/v4 v4.0.0/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= github.com/libp2p/zeroconf/v2 v2.1.1/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= github.com/lucas-clemente/quic-go v0.23.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lucas-clemente/quic-go v0.28.1 h1:Uo0lvVxWg5la9gflIF9lwa39ONq85Xq2D91YNEIslzU= -github.com/lucas-clemente/quic-go v0.28.1/go.mod h1:oGz5DKK41cJt5+773+BSO9BXDsREY4HLf7+0odGAPO0= +github.com/lucas-clemente/quic-go v0.25.0/go.mod h1:YtzP8bxRVCBlO77yRanE264+fY/T2U9ZlW1AaHOsMOg= +github.com/lucas-clemente/quic-go v0.27.0/go.mod h1:AzgQoPda7N+3IqMMMkywBKggIFo2KT6pfnlrQ2QieeI= +github.com/lucas-clemente/quic-go v0.27.1/go.mod h1:AzgQoPda7N+3IqMMMkywBKggIFo2KT6pfnlrQ2QieeI= +github.com/lucas-clemente/quic-go v0.29.1 h1:Z+WMJ++qMLhvpFkRZA+jl3BTxUjm415YBmWanXB8zP0= +github.com/lucas-clemente/quic-go v0.29.1/go.mod h1:CTcNfLYJS2UuRNB+zcNlgvkjBhxX6Hm3WUxxAQx2mgE= github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg= @@ -1209,23 +1298,24 @@ github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/marten-seemann/qpack v0.2.1 h1:jvTsT/HpCn2UZJdP+UUB53FfUUgeOyG5K1ns0OJOGVs= github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/marten-seemann/qtls-go1-15 v0.1.4/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= -github.com/marten-seemann/qtls-go1-16 v0.1.5 h1:o9JrYPPco/Nukd/HpOHMHZoBDXQqoNtUCmny98/1uqQ= github.com/marten-seemann/qtls-go1-16 v0.1.5/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-17 v0.1.2 h1:JADBlm0LYiVbuSySCHeY863dNkcpMmDR7s0bLKJeYlQ= -github.com/marten-seemann/qtls-go1-17 v0.1.2/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= +github.com/marten-seemann/qtls-go1-17 v0.1.1/go.mod h1:C2ekUKcDdz9SDWxec1N/MvcXBpaX9l3Nx67XaR84L5s= +github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI= +github.com/marten-seemann/qtls-go1-18 v0.1.1/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= github.com/marten-seemann/qtls-go1-18 v0.1.2 h1:JH6jmzbduz0ITVQ7ShevK10Av5+jBEKAHMntXmIV7kM= github.com/marten-seemann/qtls-go1-18 v0.1.2/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4= -github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= github.com/marten-seemann/qtls-go1-19 v0.1.0 h1:rLFKD/9mp/uq1SYGYuVZhm83wkmU95pK5df3GufyYYU= github.com/marten-seemann/qtls-go1-19 v0.1.0/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= +github.com/marten-seemann/webtransport-go v0.1.1 h1:TnyKp3pEXcDooTaNn4s9dYpMJ7kMnTp7k5h+SgYP/mc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1236,6 +1326,7 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -1248,6 +1339,8 @@ github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -1262,8 +1355,10 @@ github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00v github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.48/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.50 h1:DQUfb9uc6smULcREF09Uc+/Gd46YWqJd5DbpPE9xkcA= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c h1:bzE/A84HN25pxAuk9Eej1Kz9OUelF97nAc82bDquQI8= @@ -1302,8 +1397,9 @@ github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjW github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base32 v0.0.4 h1:+qMh4a2f37b4xTNs6mqitDinryCI+tfO2dRVMN9mjSE= github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= +github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= +github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= @@ -1318,8 +1414,10 @@ github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4 github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= -github.com/multiformats/go-multiaddr v0.6.0 h1:qMnoOPj2s8xxPU5kZ57Cqdr0hHhARz7mFsPMIiYNqzg= -github.com/multiformats/go-multiaddr v0.6.0/go.mod h1:F4IpaKZuPP360tOMn2Tpyu0At8w23aRyVqeK0DbFeGM= +github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= +github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= +github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= +github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= @@ -1343,8 +1441,10 @@ github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1 github.com/multiformats/go-multicodec v0.3.0/go.mod h1:qGGaQmioCDh+TeFOnxrbU0DaIPw8yFgAZgFG0V7p1qQ= github.com/multiformats/go-multicodec v0.3.1-0.20210902112759-1539a079fd61/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.3.1-0.20211210143421-a526f306ed2c/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= -github.com/multiformats/go-multicodec v0.5.0 h1:EgU6cBe/D7WRwQb1KmnBvU7lrcFGMggZVTPtOW9dDHs= +github.com/multiformats/go-multicodec v0.4.1/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.5.0/go.mod h1:DiY2HFaEp5EhEXb/iYzVAunmyX/aSFMxq2KMKfWEues= +github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE= +github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= @@ -1358,8 +1458,10 @@ github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= +github.com/multiformats/go-multistream v0.2.0/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-multistream v0.2.1/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= github.com/multiformats/go-multistream v0.2.2/go.mod h1:UIcnm7Zuo8HKG+HkWgfQsGL+/MIEhyTqbODbIUwSXKs= +github.com/multiformats/go-multistream v0.3.0/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o= github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg= github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= @@ -1410,8 +1512,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -1434,6 +1536,8 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -1464,13 +1568,15 @@ github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4 github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1491,6 +1597,7 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.33.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc= @@ -1577,8 +1684,8 @@ github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= +github.com/smartystreets/assertions v1.13.0 h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN23diwyr69Qs= github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1632,20 +1739,28 @@ github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go. github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo= github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg= +github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= github.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.25.0+incompatible h1:IxcNZ7WRY1Y3G4poYlx24szfsn/3LvK9QHCq9oQw8+U= github.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= +github.com/ugorji/go v1.1.13/go.mod h1:jxau1n+/wyTGLQoCkjok9r5zFa/FxT6eI5HiHKQszjc= +github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.13/go.mod h1:oNVt3Dq+FO91WNQ/9JnHKQP2QJxTzoN7wCBFCq1OeuU= +github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ= +github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4= -github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= +github.com/urfave/cli/v2 v2.16.3 h1:gHoFIwpPjoyIMbJp/VFd+/vuD0dAgFK4B6DpEMFJfQk= +github.com/urfave/cli/v2 v2.16.3/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8= @@ -1665,6 +1780,7 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-testmark v0.10.0 h1:E86YlUMYfwIacEsQGlnTvjk1IgYkyTGjPhF0RnwTCmw= +github.com/warpfork/go-testmark v0.10.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= @@ -1691,8 +1807,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:f github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= -github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c h1:6VPKXBDRt7mDUyiHx9X8ROnPYFDf3L7OfEuKCI5dZDI= -github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= +github.com/whyrusleeping/cbor-gen v0.0.0-20221021053955-c138aae13722 h1:0HEhvpGQJ2Gd0ngPW83aduQQuF/V9v13+3zpSrR3lrA= +github.com/whyrusleeping/cbor-gen v0.0.0-20221021053955-c138aae13722/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= @@ -1721,9 +1837,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 h1:O9XLFXGkVswDFmH9LaYpqu+r/AAFWqr0DL6V00KEVFg= -github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= +github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.12.1 h1:hYRcyznPRJp+5mzF2sazTLP2nGvGjYDD2VzhHhFomLU= github.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo= go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs= @@ -1747,35 +1864,31 @@ go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.6-0.20201102222123-380f4078db9f/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I= -go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= -go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel/bridge/opencensus v0.25.0 h1:18Ww8TpCEGes12HZJzB2nEbUglvMLzPxqgZypsrKiNc= -go.opentelemetry.io/otel/bridge/opencensus v0.25.0/go.mod h1:dkZDdaNwLlIutxK2Kc2m3jwW2M1ISaNf8/rOYVwuVHs= +go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= +go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= +go.opentelemetry.io/otel/bridge/opencensus v0.33.0 h1:DnSFYr/VxUVwkHL0UoaMcxx74Jugb1HO0B08cYBmi0c= +go.opentelemetry.io/otel/bridge/opencensus v0.33.0/go.mod h1:gylOY4P2e7kPYc6T9M8XfQ5+RK4+evGorTOOy+gO4Nc= go.opentelemetry.io/otel/exporters/jaeger v1.2.0 h1:C/5Egj3MJBXRJi22cSl07suqPqtZLnLFmH//OxETUEc= go.opentelemetry.io/otel/exporters/jaeger v1.2.0/go.mod h1:KJLFbEMKTNPIfOxcg/WikIozEoKcPgJRz3Ce1vLlM8E= -go.opentelemetry.io/otel/internal/metric v0.25.0 h1:w/7RXe16WdPylaIXDgcYM6t/q0K5lXgSdZOEbIEyliE= -go.opentelemetry.io/otel/internal/metric v0.25.0/go.mod h1:Nhuw26QSX7d6n4duoqAFi5KOQR4AuzyMcl5eXOgwxtc= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v0.25.0 h1:7cXOnCADUsR3+EOqxPaSKwhEuNu0gz/56dRN1hpIdKw= -go.opentelemetry.io/otel/metric v0.25.0/go.mod h1:E884FSpQfnJOMMUaq+05IWlJ4rjZpk2s/F1Ju+TEEm8= +go.opentelemetry.io/otel/metric v0.33.0 h1:xQAyl7uGEYvrLAiV/09iTJlp1pZnQ9Wl793qbVvED1E= +go.opentelemetry.io/otel/metric v0.33.0/go.mod h1:QlTYc+EnYNq/M2mNk1qDDMRLpqCOj2f/r5c7Fd5FYaI= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk v1.2.0 h1:wKN260u4DesJYhyjxDa7LRFkuhH7ncEVKU37LWcyNIo= go.opentelemetry.io/otel/sdk v1.2.0/go.mod h1:jNN8QtpvbsKhgaC6V5lHiejMoKD+V8uadoSafgHPx1U= -go.opentelemetry.io/otel/sdk/export/metric v0.25.0 h1:6UjAFmVB5Fza3K5qUJpYWGrk8QMPIqlSnya5FI46VBY= -go.opentelemetry.io/otel/sdk/export/metric v0.25.0/go.mod h1:Ej7NOa+WpN49EIcr1HMUYRvxXXCCnQCg2+ovdt2z8Pk= -go.opentelemetry.io/otel/sdk/metric v0.25.0 h1:J+Ta+4IAA5W9AdWhGQLfciEpavBqqSkBzTDeYvJLFNU= -go.opentelemetry.io/otel/sdk/metric v0.25.0/go.mod h1:G4xzj4LvC6xDDSsVXpvRVclQCbofGGg4ZU2VKKtDRfg= +go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= +go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOlithYrdktys= +go.opentelemetry.io/otel/sdk/metric v0.33.0 h1:oTqyWfksgKoJmbrs2q7O7ahkJzt+Ipekihf8vhpa9qo= +go.opentelemetry.io/otel/sdk/metric v0.33.0/go.mod h1:xdypMeA21JBOvjjzDUtD0kzIcHO/SPez+a8HOzJPGp0= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0= -go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= -go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= +go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1796,6 +1909,7 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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= @@ -1812,8 +1926,9 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.22.0 h1:Zcye5DUgBloQ9BaT4qc9BnjOFog5TvBSAGkJ3Nf70c0= -go.uber.org/zap v1.22.0/go.mod h1:H4siCOZOrAolnUPJEkfaSjDqyP+BDS0DdDWzwcgt3+U= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= @@ -1843,6 +1958,7 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1857,8 +1973,9 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= +golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1874,8 +1991,8 @@ golang.org/x/exp v0.0.0-20200821190819-94841d0725da/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20200901203048-c4f52b2c50aa/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20210615023648-acb5c1269671/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= golang.org/x/exp v0.0.0-20210714144626-1041f73d31d8/go.mod h1:DVyR6MI7P4kEQgvZJSj1fQGrWIi2RzIrfYWycwheUAc= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b h1:SCE/18RnFsLrjydh/R/s5EVvHoZprqEQUuoxK8q2Pc4= +golang.org/x/exp v0.0.0-20220916125017-b168a2c6b86b/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1902,6 +2019,7 @@ golang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hM golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1966,12 +2084,13 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220812174116-3211cb980234 h1:RDqmgfe7SvlMWoqC3xwQ2blLO3fcWcxMa3eBLRdRW7E= -golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5 h1:KafLifaRFIuSJ5C+7CyFJOF9haxKNC1CEIDk8GX6X0k= +golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1993,8 +2112,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220907140024-f12130a52804 h1:0SH2R3f1b1VmIMG7BXbEZCBUu2dKmHschSmjqGUrW8A= +golang.org/x/sync v0.0.0-20220907140024-f12130a52804/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2022,6 +2142,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190523142557-0e01d883c5c5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2095,14 +2216,15 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211209171907-798191bca915/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2121,8 +2243,8 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ= +golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2185,14 +2307,16 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= 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= @@ -2300,6 +2424,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= diff --git a/lens/util/repo.go b/lens/util/repo.go index 184460721..d55a40230 100644 --- a/lens/util/repo.go +++ b/lens/util/repo.go @@ -49,7 +49,7 @@ func ParseParams(params []byte, method abi.MethodNum, actCode cid.Cid) (_ string return "", m.Name, nil } - if method == builtin2.UniversalReceiverHookMethodNum { + if method == builtin2.MustGenerateFRCMethodNum("Receive") { b, err := json.Marshal(m.Params) if err != nil { return "", "", err diff --git a/storage/sql.go b/storage/sql.go index 5aa1602cd..163acee67 100644 --- a/storage/sql.go +++ b/storage/sql.go @@ -442,19 +442,22 @@ func (s *TxStorage) PersistModel(ctx context.Context, m interface{}) error { // // Example given the below model: // -// type SomeModel struct { -// Height int64 `pg:",pk,notnull,use_zero"` -// MinerID string `pg:",pk,notnull"` -// StateRoot string `pg:",pk,notnull"` -// OwnerID string `pg:",notnull"` -// WorkerID string `pg:",notnull"` -// } +// type SomeModel struct { +// Height int64 `pg:",pk,notnull,use_zero"` +// MinerID string `pg:",pk,notnull"` +// StateRoot string `pg:",pk,notnull"` +// OwnerID string `pg:",notnull"` +// WorkerID string `pg:",notnull"` +// } // // The strings returned are: // conflict string: +// // "(cid, height, state_root) DO UPDATE" +// // update string: -// "owner_id" = EXCLUDED.owner_id, "worker_id" = EXCLUDED.worker_id +// +// "owner_id" = EXCLUDED.owner_id, "worker_id" = EXCLUDED.worker_id func GenerateUpsertStrings(model interface{}) (string, string) { var cf []string var ucf []string From 3c2fdd8b7d5bf29059f6b33bd996415ed3d3e0fa Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 16 Jan 2023 17:15:59 -0800 Subject: [PATCH 02/20] fix: make actors gen - generate v10 actor state accessors - update integrated state processor actor version --- chain/actors/builtin/builtin.go | 202 ------------------ chain/actors/builtin/builtin.go.template | 96 --------- chain/actors/builtin/market/state.go.template | 25 ++- chain/actors/builtin/market/v0.go | 4 +- chain/actors/builtin/market/v10.go | 11 +- chain/actors/builtin/market/v2.go | 4 +- chain/actors/builtin/market/v3.go | 4 +- chain/actors/builtin/market/v4.go | 4 +- chain/actors/builtin/market/v5.go | 4 +- chain/actors/builtin/market/v6.go | 4 +- chain/actors/builtin/market/v7.go | 4 +- chain/actors/builtin/market/v8.go | 4 +- chain/actors/builtin/market/v9.go | 11 +- chain/actors/builtin/miner/actor.go.template | 19 +- chain/actors/builtin/miner/diff.go | 5 +- chain/actors/builtin/miner/miner.go | 19 +- chain/actors/builtin/miner/state.go.template | 68 +++--- chain/actors/builtin/miner/v0.go | 17 +- chain/actors/builtin/miner/v10.go | 33 ++- chain/actors/builtin/miner/v2.go | 17 +- chain/actors/builtin/miner/v3.go | 17 +- chain/actors/builtin/miner/v4.go | 17 +- chain/actors/builtin/miner/v5.go | 17 +- chain/actors/builtin/miner/v6.go | 17 +- chain/actors/builtin/miner/v7.go | 17 +- chain/actors/builtin/miner/v8.go | 17 +- chain/actors/builtin/miner/v9.go | 19 +- chain/indexer/integrated/processor/state.go | 15 +- 28 files changed, 228 insertions(+), 463 deletions(-) diff --git a/chain/actors/builtin/builtin.go b/chain/actors/builtin/builtin.go index bf2d9ad11..4a5857cc4 100644 --- a/chain/actors/builtin/builtin.go +++ b/chain/actors/builtin/builtin.go @@ -21,25 +21,12 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/lotus/chain/actors" smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" -) - -var SystemActorAddr = builtin.SystemActorAddr -var BurntFundsActorAddr = builtin.BurntFundsActorAddr -var CronActorAddr = builtin.CronActorAddr -var SaftAddress = makeAddress("t0122") -var ReserveAddress = makeAddress("t090") -var RootVerifierAddress = makeAddress("t080") - -var ( - ExpectedLeadersPerEpoch = builtin.ExpectedLeadersPerEpoch ) const ( @@ -60,10 +47,6 @@ type ExtendedSectorInfo = proof.ExtendedSectorInfo type PoStProof = proof.PoStProof type FilterEstimate = smoothingtypes.FilterEstimate -func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower { - return minertypes.QAPowerForWeight(size, duration, dealWeight, verifiedWeight) -} - func ActorNameByCode(c cid.Cid) string { if name, version, ok := actors.GetActorMetaByCode(c); ok { return fmt.Sprintf("fil/%d/%s", version, name) @@ -97,191 +80,6 @@ func ActorNameByCode(c cid.Cid) string { } } -func IsBuiltinActor(c cid.Cid) bool { - _, _, ok := actors.GetActorMetaByCode(c) - if ok { - return true - } - - if builtin0.IsBuiltinActor(c) { - return true - } - - if builtin2.IsBuiltinActor(c) { - return true - } - - if builtin3.IsBuiltinActor(c) { - return true - } - - if builtin4.IsBuiltinActor(c) { - return true - } - - if builtin5.IsBuiltinActor(c) { - return true - } - - if builtin6.IsBuiltinActor(c) { - return true - } - - if builtin7.IsBuiltinActor(c) { - return true - } - - return false -} - -func IsAccountActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == "account" - } - - if c == builtin0.AccountActorCodeID { - return true - } - - if c == builtin2.AccountActorCodeID { - return true - } - - if c == builtin3.AccountActorCodeID { - return true - } - - if c == builtin4.AccountActorCodeID { - return true - } - - if c == builtin5.AccountActorCodeID { - return true - } - - if c == builtin6.AccountActorCodeID { - return true - } - - if c == builtin7.AccountActorCodeID { - return true - } - - return false -} - -func IsStorageMinerActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == actors.MinerKey - } - - if c == builtin0.StorageMinerActorCodeID { - return true - } - - if c == builtin2.StorageMinerActorCodeID { - return true - } - - if c == builtin3.StorageMinerActorCodeID { - return true - } - - if c == builtin4.StorageMinerActorCodeID { - return true - } - - if c == builtin5.StorageMinerActorCodeID { - return true - } - - if c == builtin6.StorageMinerActorCodeID { - return true - } - - if c == builtin7.StorageMinerActorCodeID { - return true - } - - return false -} - -func IsMultisigActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == actors.MultisigKey - } - - if c == builtin0.MultisigActorCodeID { - return true - } - - if c == builtin2.MultisigActorCodeID { - return true - } - - if c == builtin3.MultisigActorCodeID { - return true - } - - if c == builtin4.MultisigActorCodeID { - return true - } - - if c == builtin5.MultisigActorCodeID { - return true - } - - if c == builtin6.MultisigActorCodeID { - return true - } - - if c == builtin7.MultisigActorCodeID { - return true - } - - return false -} - -func IsPaymentChannelActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == "paymentchannel" - } - - if c == builtin0.PaymentChannelActorCodeID { - return true - } - - if c == builtin2.PaymentChannelActorCodeID { - return true - } - - if c == builtin3.PaymentChannelActorCodeID { - return true - } - - if c == builtin4.PaymentChannelActorCodeID { - return true - } - - if c == builtin5.PaymentChannelActorCodeID { - return true - } - - if c == builtin6.PaymentChannelActorCodeID { - return true - } - - if c == builtin7.PaymentChannelActorCodeID { - return true - } - - return false -} - func makeAddress(addr string) address.Address { ret, err := address.NewFromString(addr) if err != nil { diff --git a/chain/actors/builtin/builtin.go.template b/chain/actors/builtin/builtin.go.template index 014d93a39..5636e96c6 100644 --- a/chain/actors/builtin/builtin.go.template +++ b/chain/actors/builtin/builtin.go.template @@ -13,26 +13,14 @@ import ( {{end}} {{end}} - "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/proof" "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lotus/chain/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing" ) -var SystemActorAddr = builtin.SystemActorAddr -var BurntFundsActorAddr = builtin.BurntFundsActorAddr -var CronActorAddr = builtin.CronActorAddr -var SaftAddress = makeAddress("t0122") -var ReserveAddress = makeAddress("t090") -var RootVerifierAddress = makeAddress("t080") - -var ( - ExpectedLeadersPerEpoch = builtin.ExpectedLeadersPerEpoch -) const ( EpochDurationSeconds = builtin.EpochDurationSeconds @@ -52,10 +40,6 @@ type ExtendedSectorInfo = proof.ExtendedSectorInfo type PoStProof = proof.PoStProof type FilterEstimate = smoothingtypes.FilterEstimate -func QAPowerForWeight(size abi.SectorSize, duration abi.ChainEpoch, dealWeight, verifiedWeight abi.DealWeight) abi.StoragePower { - return minertypes.QAPowerForWeight(size, duration, dealWeight, verifiedWeight) -} - func ActorNameByCode(c cid.Cid) string { if name, version, ok := actors.GetActorMetaByCode(c); ok { return fmt.Sprintf("fil/%d/%s", version, name) @@ -73,86 +57,6 @@ func ActorNameByCode(c cid.Cid) string { } } -func IsBuiltinActor(c cid.Cid) bool { - _, _, ok := actors.GetActorMetaByCode(c) - if ok { - return true - } - - {{range .versions}} - {{if (le . 7)}} - if builtin{{.}}.IsBuiltinActor(c) { - return true - } - {{end}} - {{end}} - return false -} - -func IsAccountActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == "account" - } - - {{range .versions}} - {{if (le . 7)}} - if c == builtin{{.}}.AccountActorCodeID { - return true - } - {{end}} - {{end}} - return false -} - -func IsStorageMinerActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == actors.MinerKey - } - - {{range .versions}} - {{if (le . 7)}} - if c == builtin{{.}}.StorageMinerActorCodeID { - return true - } - {{end}} - {{end}} - return false -} - -func IsMultisigActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == actors.MultisigKey - } - - {{range .versions}} - {{if (le . 7)}} - if c == builtin{{.}}.MultisigActorCodeID { - return true - } - {{end}} - {{end}} - return false -} - -func IsPaymentChannelActor(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == "paymentchannel" - } - - {{range .versions}} - {{if (le . 7)}} - if c == builtin{{.}}.PaymentChannelActorCodeID { - return true - } - {{end}} - {{end}} - return false -} - func makeAddress(addr string) address.Address { ret, err := address.NewFromString(addr) if err != nil { diff --git a/chain/actors/builtin/market/state.go.template b/chain/actors/builtin/market/state.go.template index 0ddee8698..012f4c12d 100644 --- a/chain/actors/builtin/market/state.go.template +++ b/chain/actors/builtin/market/state.go.template @@ -14,6 +14,10 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" +{{if (ge .v 9)}} + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" +{{end}} + {{if (le .v 7)}} market{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/market" adt{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/util/adt" @@ -139,16 +143,17 @@ func (s *dealStates{{.v}}) array() adt.Array { } func fromV{{.v}}DealState(v{{.v}} market{{.v}}.DealState) DealState { - {{if (le .v 8)}} - return DealState{ - SectorStartEpoch: v{{.v}}.SectorStartEpoch, - LastUpdatedEpoch: v{{.v}}.LastUpdatedEpoch, - SlashEpoch: v{{.v}}.SlashEpoch, - VerifiedClaim: 0, - } - {{else}} - return (DealState)(v{{.v}}) - {{end}} + ret := DealState{ + SectorStartEpoch: v{{.v}}.SectorStartEpoch, + LastUpdatedEpoch: v{{.v}}.LastUpdatedEpoch, + SlashEpoch: v{{.v}}.SlashEpoch, + VerifiedClaim: 0, + } + {{if (ge .v 9)}} + ret.VerifiedClaim = verifregtypes.AllocationId(v{{.v}}.VerifiedClaim) + {{end}} + + return ret } type dealProposals{{.v}} struct { diff --git a/chain/actors/builtin/market/v0.go b/chain/actors/builtin/market/v0.go index 20bf51c9a..a97e9503a 100644 --- a/chain/actors/builtin/market/v0.go +++ b/chain/actors/builtin/market/v0.go @@ -126,14 +126,14 @@ func (s *dealStates0) array() adt.Array { } func fromV0DealState(v0 market0.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v0.SectorStartEpoch, LastUpdatedEpoch: v0.LastUpdatedEpoch, SlashEpoch: v0.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals0 struct { diff --git a/chain/actors/builtin/market/v10.go b/chain/actors/builtin/market/v10.go index 79c847101..d63690f5e 100644 --- a/chain/actors/builtin/market/v10.go +++ b/chain/actors/builtin/market/v10.go @@ -14,6 +14,8 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" @@ -122,9 +124,16 @@ func (s *dealStates10) array() adt.Array { } func fromV10DealState(v10 market10.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v10.SectorStartEpoch, + LastUpdatedEpoch: v10.LastUpdatedEpoch, + SlashEpoch: v10.SlashEpoch, + VerifiedClaim: 0, + } - return (DealState)(v10) + ret.VerifiedClaim = verifregtypes.AllocationId(v10.VerifiedClaim) + return ret } type dealProposals10 struct { diff --git a/chain/actors/builtin/market/v2.go b/chain/actors/builtin/market/v2.go index 81bb6f87d..a88388280 100644 --- a/chain/actors/builtin/market/v2.go +++ b/chain/actors/builtin/market/v2.go @@ -126,14 +126,14 @@ func (s *dealStates2) array() adt.Array { } func fromV2DealState(v2 market2.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v2.SectorStartEpoch, LastUpdatedEpoch: v2.LastUpdatedEpoch, SlashEpoch: v2.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals2 struct { diff --git a/chain/actors/builtin/market/v3.go b/chain/actors/builtin/market/v3.go index dfba355e4..f496df3dc 100644 --- a/chain/actors/builtin/market/v3.go +++ b/chain/actors/builtin/market/v3.go @@ -121,14 +121,14 @@ func (s *dealStates3) array() adt.Array { } func fromV3DealState(v3 market3.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v3.SectorStartEpoch, LastUpdatedEpoch: v3.LastUpdatedEpoch, SlashEpoch: v3.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals3 struct { diff --git a/chain/actors/builtin/market/v4.go b/chain/actors/builtin/market/v4.go index c1002dcc6..1aacd4de0 100644 --- a/chain/actors/builtin/market/v4.go +++ b/chain/actors/builtin/market/v4.go @@ -121,14 +121,14 @@ func (s *dealStates4) array() adt.Array { } func fromV4DealState(v4 market4.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v4.SectorStartEpoch, LastUpdatedEpoch: v4.LastUpdatedEpoch, SlashEpoch: v4.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals4 struct { diff --git a/chain/actors/builtin/market/v5.go b/chain/actors/builtin/market/v5.go index c282dc842..83765ea66 100644 --- a/chain/actors/builtin/market/v5.go +++ b/chain/actors/builtin/market/v5.go @@ -121,14 +121,14 @@ func (s *dealStates5) array() adt.Array { } func fromV5DealState(v5 market5.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v5.SectorStartEpoch, LastUpdatedEpoch: v5.LastUpdatedEpoch, SlashEpoch: v5.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals5 struct { diff --git a/chain/actors/builtin/market/v6.go b/chain/actors/builtin/market/v6.go index 60355dc59..8cc679d43 100644 --- a/chain/actors/builtin/market/v6.go +++ b/chain/actors/builtin/market/v6.go @@ -121,14 +121,14 @@ func (s *dealStates6) array() adt.Array { } func fromV6DealState(v6 market6.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v6.SectorStartEpoch, LastUpdatedEpoch: v6.LastUpdatedEpoch, SlashEpoch: v6.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals6 struct { diff --git a/chain/actors/builtin/market/v7.go b/chain/actors/builtin/market/v7.go index 24f78821e..5029a30ce 100644 --- a/chain/actors/builtin/market/v7.go +++ b/chain/actors/builtin/market/v7.go @@ -121,14 +121,14 @@ func (s *dealStates7) array() adt.Array { } func fromV7DealState(v7 market7.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v7.SectorStartEpoch, LastUpdatedEpoch: v7.LastUpdatedEpoch, SlashEpoch: v7.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals7 struct { diff --git a/chain/actors/builtin/market/v8.go b/chain/actors/builtin/market/v8.go index 42be7995c..b6a5169f0 100644 --- a/chain/actors/builtin/market/v8.go +++ b/chain/actors/builtin/market/v8.go @@ -122,14 +122,14 @@ func (s *dealStates8) array() adt.Array { } func fromV8DealState(v8 market8.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v8.SectorStartEpoch, LastUpdatedEpoch: v8.LastUpdatedEpoch, SlashEpoch: v8.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals8 struct { diff --git a/chain/actors/builtin/market/v9.go b/chain/actors/builtin/market/v9.go index 36586b69e..c54375722 100644 --- a/chain/actors/builtin/market/v9.go +++ b/chain/actors/builtin/market/v9.go @@ -14,6 +14,8 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" @@ -122,9 +124,16 @@ func (s *dealStates9) array() adt.Array { } func fromV9DealState(v9 market9.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v9.SectorStartEpoch, + LastUpdatedEpoch: v9.LastUpdatedEpoch, + SlashEpoch: v9.SlashEpoch, + VerifiedClaim: 0, + } - return (DealState)(v9) + ret.VerifiedClaim = verifregtypes.AllocationId(v9.VerifiedClaim) + return ret } type dealProposals9 struct { diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index 5d7c84bb6..8d4a54176 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -20,6 +20,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" miner{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin{{import .latestVersion}}miner" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" {{range .versions}} {{if (le . 7)}} @@ -84,8 +85,8 @@ type State interface { GetSector(abi.SectorNumber) (*SectorOnChainInfo, error) FindSector(abi.SectorNumber) (*SectorLocation, error) GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error) - GetPrecommittedSector(abi.SectorNumber) (*miner{{.latestVersion}}.SectorPreCommitOnChainInfo, error) - ForEachPrecommittedSector(func(miner{{.latestVersion}}.SectorPreCommitOnChainInfo) error) error + GetPrecommittedSector(abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) + ForEachPrecommittedSector(func(SectorPreCommitOnChainInfo) error) error LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error) NumLiveSectors() (uint64, error) IsAllocated(abi.SectorNumber) (bool, error) @@ -120,7 +121,7 @@ type State interface { PrecommitsMap() (adt.Map, error) PrecommitsMapBitWidth() int PrecommitsMapHashFunction() func(input []byte) []byte - DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner{{.latestVersion}}.SectorPreCommitOnChainInfo, error) + DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (SectorPreCommitOnChainInfo, error) DecodeSectorPreCommitOnChainInfoToV8(*cbg.Deferred) (miner8.SectorPreCommitOnChainInfo, error) ForEachPrecommittedSectorV8(func(miner8.SectorPreCommitOnChainInfo) error) error } @@ -214,9 +215,13 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = miner{{.latestVersion}}.MinerInfo -type WorkerKeyChange = miner{{.latestVersion}}.WorkerKeyChange +type MinerInfo = minertypes.MinerInfo +type WorkerKeyChange = minertypes.WorkerKeyChange type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo +type BeneficiaryTerm = minertypes.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange +type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes.SectorPreCommitInfo type SectorExpiration struct { OnTime abi.ChainEpoch @@ -237,8 +242,8 @@ type SectorExtensions struct { } type PreCommitChanges struct { - Added []miner{{.latestVersion}}.SectorPreCommitOnChainInfo - Removed []miner{{.latestVersion}}.SectorPreCommitOnChainInfo + Added []SectorPreCommitOnChainInfo + Removed []SectorPreCommitOnChainInfo } type LockedFunds struct { diff --git a/chain/actors/builtin/miner/diff.go b/chain/actors/builtin/miner/diff.go index dfd5c75b6..990544aa1 100644 --- a/chain/actors/builtin/miner/diff.go +++ b/chain/actors/builtin/miner/diff.go @@ -7,7 +7,6 @@ import ( "github.com/filecoin-project/go-amt-ipld/v4" "github.com/filecoin-project/go-hamt-ipld/v3" "github.com/filecoin-project/go-state-types/abi" - miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" cbg "github.com/whyrusleeping/cbor-gen" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" @@ -90,8 +89,8 @@ func MakeSectorChanges() *SectorChanges { func MakePreCommitChanges() *PreCommitChanges { return &PreCommitChanges{ - Added: []miner10.SectorPreCommitOnChainInfo{}, - Removed: []miner10.SectorPreCommitOnChainInfo{}, + Added: []SectorPreCommitOnChainInfo{}, + Removed: []SectorPreCommitOnChainInfo{}, } } diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index b26d1b5e6..e8e836b37 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -18,6 +18,7 @@ import ( miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" @@ -139,8 +140,8 @@ type State interface { GetSector(abi.SectorNumber) (*SectorOnChainInfo, error) FindSector(abi.SectorNumber) (*SectorLocation, error) GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error) - GetPrecommittedSector(abi.SectorNumber) (*miner10.SectorPreCommitOnChainInfo, error) - ForEachPrecommittedSector(func(miner10.SectorPreCommitOnChainInfo) error) error + GetPrecommittedSector(abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) + ForEachPrecommittedSector(func(SectorPreCommitOnChainInfo) error) error LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error) NumLiveSectors() (uint64, error) IsAllocated(abi.SectorNumber) (bool, error) @@ -175,7 +176,7 @@ type State interface { PrecommitsMap() (adt.Map, error) PrecommitsMapBitWidth() int PrecommitsMapHashFunction() func(input []byte) []byte - DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner10.SectorPreCommitOnChainInfo, error) + DecodeSectorPreCommitOnChainInfo(*cbg.Deferred) (SectorPreCommitOnChainInfo, error) DecodeSectorPreCommitOnChainInfoToV8(*cbg.Deferred) (miner8.SectorPreCommitOnChainInfo, error) ForEachPrecommittedSectorV8(func(miner8.SectorPreCommitOnChainInfo) error) error } @@ -269,9 +270,13 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = miner10.MinerInfo -type WorkerKeyChange = miner10.WorkerKeyChange +type MinerInfo = minertypes.MinerInfo +type WorkerKeyChange = minertypes.WorkerKeyChange type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo +type BeneficiaryTerm = minertypes.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange +type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes.SectorPreCommitInfo type SectorExpiration struct { OnTime abi.ChainEpoch @@ -292,8 +297,8 @@ type SectorExtensions struct { } type PreCommitChanges struct { - Added []miner10.SectorPreCommitOnChainInfo - Removed []miner10.SectorPreCommitOnChainInfo + Added []SectorPreCommitOnChainInfo + Removed []SectorPreCommitOnChainInfo } type LockedFunds struct { diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index 7d8c4b967..3b08e4e24 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -18,7 +18,6 @@ import ( "github.com/filecoin-project/lily/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" - minertypes "github.com/filecoin-project/go-state-types/builtin/v{{.latestVersion}}/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" {{if (le .v 1)}} @@ -225,7 +224,7 @@ func (s *state{{.v}}) GetSectorExpiration(num abi.SectorNumber) (*SectorExpirati return &out, nil } -func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -236,7 +235,7 @@ func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.S return &ret, nil } -func (s *state{{.v}}) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state{{.v}}) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { {{if (ge .v 3) -}} precommitted, err := adt{{.v}}.AsMap(s.store, s.State.PreCommittedSectors, builtin{{.v}}.DefaultHamtBitwidth) {{- else -}} @@ -404,33 +403,33 @@ func (s *state{{.v}}) Info() (MinerInfo, error) { return MinerInfo{}, err } -{{if (le .v 2)}} - wpp, err := info.SealProofType.RegisteredWindowPoStProof() - if err != nil { - return MinerInfo{}, err - } -{{end}} + {{if (le .v 2)}} + wpp, err := info.SealProofType.RegisteredWindowPoStProof() + if err != nil { + return MinerInfo{}, err + } + {{end}} mi := MinerInfo{ - Owner: info.Owner, - Worker: info.Worker, - ControlAddresses: info.ControlAddresses, - - PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), - - PeerId: info.PeerId, - Multiaddrs: info.Multiaddrs, - WindowPoStProofType: {{if (ge .v 3)}}info.WindowPoStProofType{{else}}wpp{{end}}, - SectorSize: info.SectorSize, - WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, - ConsensusFaultElapsed: {{if (ge .v 2)}}info.ConsensusFaultElapsed{{else}}-1{{end}}, - {{if (ge .v 9)}} + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: {{if (ge .v 3)}}info.WindowPoStProofType{{else}}wpp{{end}}, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: {{if (ge .v 2)}}info.ConsensusFaultElapsed{{else}}-1{{end}}, + {{if (ge .v 9)}} Beneficiary: info.Beneficiary, - BeneficiaryTerm: info.BeneficiaryTerm, - PendingBeneficiaryTerm: info.PendingBeneficiaryTerm,{{end}} + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + {{end}} } - return mi, nil -} + return mi, nil} func (s *state{{.v}}) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { return s.State.{{if (ge .v 4)}}Recorded{{end}}DeadlineInfo(epoch), nil @@ -480,11 +479,11 @@ func (s *state{{.v}}) PrecommitsMapHashFunction() func(input []byte) []byte { {{end}} } -func (s *state{{.v}}) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state{{.v}}) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner{{.v}}.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV{{.v}}SectorPreCommitOnChainInfo(sp), nil @@ -653,9 +652,9 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO return info } -func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - {{if (le .v 8)}}return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v{{.v}}.Info.SealProof, SectorNumber: v{{.v}}.Info.SectorNumber, SealedCID: v{{.v}}.Info.SealedCID, @@ -666,7 +665,12 @@ func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOn }, PreCommitDeposit: v{{.v}}.PreCommitDeposit, PreCommitEpoch: v{{.v}}.PreCommitEpoch, - }{{else}}return v{{.v}}{{end}} + } +{{if (ge .v 9)}} + ret.Info.UnsealedCid = v{{.v}}.Info.UnsealedCid +{{end}} + +return ret } {{if (le .v 8)}} diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index f10a92026..ca0d0e273 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -17,7 +17,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -202,7 +201,7 @@ func (s *state0) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -213,7 +212,7 @@ func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state0) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state0) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt0.AsMap(s.store, s.State.PreCommittedSectors) if err != nil { return err @@ -441,11 +440,11 @@ func (s *state0) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state0) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state0) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner0.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV0SectorPreCommitOnChainInfo(sp), nil @@ -561,9 +560,9 @@ func fromV0SectorOnChainInfo(v0 miner0.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v0.Info.SealProof, SectorNumber: v0.Info.SectorNumber, SealedCID: v0.Info.SealedCID, @@ -575,6 +574,8 @@ func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v0.PreCommitDeposit, PreCommitEpoch: v0.PreCommitEpoch, } + + return ret } func fromV0SectorPreCommitOnChainInfoToV8(v0 miner0.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v10.go b/chain/actors/builtin/miner/v10.go index d4f162667..f6fe9cc25 100644 --- a/chain/actors/builtin/miner/v10.go +++ b/chain/actors/builtin/miner/v10.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -200,7 +199,7 @@ func (s *state10) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, return &out, nil } -func (s *state10) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state10) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -211,7 +210,7 @@ func (s *state10) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Secto return &ret, nil } -func (s *state10) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state10) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt10.AsMap(s.store, s.State.PreCommittedSectors, builtin10.DefaultHamtBitwidth) if err != nil { return err @@ -390,8 +389,8 @@ func (s *state10) Info() (MinerInfo, error) { ConsensusFaultElapsed: info.ConsensusFaultElapsed, Beneficiary: info.Beneficiary, - BeneficiaryTerm: info.BeneficiaryTerm, - PendingBeneficiaryTerm: info.PendingBeneficiaryTerm, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), } return mi, nil @@ -438,11 +437,11 @@ func (s *state10) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state10) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state10) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner10.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV10SectorPreCommitOnChainInfo(sp), nil @@ -578,8 +577,24 @@ func fromV10SectorOnChainInfo(v10 miner10.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV10SectorPreCommitOnChainInfo(v10 miner10.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return v10 +func fromV10SectorPreCommitOnChainInfo(v10 miner10.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v10.Info.SealProof, + SectorNumber: v10.Info.SectorNumber, + SealedCID: v10.Info.SealedCID, + SealRandEpoch: v10.Info.SealRandEpoch, + DealIDs: v10.Info.DealIDs, + Expiration: v10.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v10.PreCommitDeposit, + PreCommitEpoch: v10.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v10.Info.UnsealedCid + + return ret } func (s *state10) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index 8c2029c77..002c14f7d 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -200,7 +199,7 @@ func (s *state2) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -211,7 +210,7 @@ func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state2) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state2) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt2.AsMap(s.store, s.State.PreCommittedSectors) if err != nil { return err @@ -439,11 +438,11 @@ func (s *state2) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state2) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state2) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner2.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV2SectorPreCommitOnChainInfo(sp), nil @@ -591,9 +590,9 @@ func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v2.Info.SealProof, SectorNumber: v2.Info.SectorNumber, SealedCID: v2.Info.SealedCID, @@ -605,6 +604,8 @@ func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v2.PreCommitDeposit, PreCommitEpoch: v2.PreCommitEpoch, } + + return ret } func fromV2SectorPreCommitOnChainInfoToV8(v2 miner2.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index d816f823f..c3f19060e 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -202,7 +201,7 @@ func (s *state3) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -213,7 +212,7 @@ func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state3) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state3) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt3.AsMap(s.store, s.State.PreCommittedSectors, builtin3.DefaultHamtBitwidth) if err != nil { return err @@ -436,11 +435,11 @@ func (s *state3) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state3) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state3) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner3.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV3SectorPreCommitOnChainInfo(sp), nil @@ -592,9 +591,9 @@ func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v3.Info.SealProof, SectorNumber: v3.Info.SectorNumber, SealedCID: v3.Info.SealedCID, @@ -606,6 +605,8 @@ func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v3.PreCommitDeposit, PreCommitEpoch: v3.PreCommitEpoch, } + + return ret } func fromV3SectorPreCommitOnChainInfoToV8(v3 miner3.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index dabdccf09..6553823ac 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -202,7 +201,7 @@ func (s *state4) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -213,7 +212,7 @@ func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state4) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state4) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt4.AsMap(s.store, s.State.PreCommittedSectors, builtin4.DefaultHamtBitwidth) if err != nil { return err @@ -436,11 +435,11 @@ func (s *state4) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state4) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state4) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner4.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV4SectorPreCommitOnChainInfo(sp), nil @@ -592,9 +591,9 @@ func fromV4SectorOnChainInfo(v4 miner4.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v4.Info.SealProof, SectorNumber: v4.Info.SectorNumber, SealedCID: v4.Info.SealedCID, @@ -606,6 +605,8 @@ func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v4.PreCommitDeposit, PreCommitEpoch: v4.PreCommitEpoch, } + + return ret } func fromV4SectorPreCommitOnChainInfoToV8(v4 miner4.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index ec1b2ffdb..08610f581 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -202,7 +201,7 @@ func (s *state5) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -213,7 +212,7 @@ func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state5) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state5) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt5.AsMap(s.store, s.State.PreCommittedSectors, builtin5.DefaultHamtBitwidth) if err != nil { return err @@ -436,11 +435,11 @@ func (s *state5) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state5) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state5) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner5.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV5SectorPreCommitOnChainInfo(sp), nil @@ -592,9 +591,9 @@ func fromV5SectorOnChainInfo(v5 miner5.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v5.Info.SealProof, SectorNumber: v5.Info.SectorNumber, SealedCID: v5.Info.SealedCID, @@ -606,6 +605,8 @@ func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v5.PreCommitDeposit, PreCommitEpoch: v5.PreCommitEpoch, } + + return ret } func fromV5SectorPreCommitOnChainInfoToV8(v5 miner5.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v6.go b/chain/actors/builtin/miner/v6.go index fcc2193d2..6113794a3 100644 --- a/chain/actors/builtin/miner/v6.go +++ b/chain/actors/builtin/miner/v6.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -202,7 +201,7 @@ func (s *state6) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -213,7 +212,7 @@ func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state6) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state6) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt6.AsMap(s.store, s.State.PreCommittedSectors, builtin6.DefaultHamtBitwidth) if err != nil { return err @@ -436,11 +435,11 @@ func (s *state6) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state6) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state6) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner6.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV6SectorPreCommitOnChainInfo(sp), nil @@ -592,9 +591,9 @@ func fromV6SectorOnChainInfo(v6 miner6.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v6.Info.SealProof, SectorNumber: v6.Info.SectorNumber, SealedCID: v6.Info.SealedCID, @@ -606,6 +605,8 @@ func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v6.PreCommitDeposit, PreCommitEpoch: v6.PreCommitEpoch, } + + return ret } func fromV6SectorPreCommitOnChainInfoToV8(v6 miner6.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v7.go b/chain/actors/builtin/miner/v7.go index faca5c960..64f6ecdf9 100644 --- a/chain/actors/builtin/miner/v7.go +++ b/chain/actors/builtin/miner/v7.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -201,7 +200,7 @@ func (s *state7) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -212,7 +211,7 @@ func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state7) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state7) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt7.AsMap(s.store, s.State.PreCommittedSectors, builtin7.DefaultHamtBitwidth) if err != nil { return err @@ -435,11 +434,11 @@ func (s *state7) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state7) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state7) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner7.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV7SectorPreCommitOnChainInfo(sp), nil @@ -593,9 +592,9 @@ func fromV7SectorOnChainInfo(v7 miner7.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v7.Info.SealProof, SectorNumber: v7.Info.SectorNumber, SealedCID: v7.Info.SealedCID, @@ -607,6 +606,8 @@ func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v7.PreCommitDeposit, PreCommitEpoch: v7.PreCommitEpoch, } + + return ret } func fromV7SectorPreCommitOnChainInfoToV8(v7 miner7.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v8.go b/chain/actors/builtin/miner/v8.go index 6c5c9151a..1614b692c 100644 --- a/chain/actors/builtin/miner/v8.go +++ b/chain/actors/builtin/miner/v8.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -200,7 +199,7 @@ func (s *state8) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -211,7 +210,7 @@ func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state8) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state8) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt8.AsMap(s.store, s.State.PreCommittedSectors, builtin8.DefaultHamtBitwidth) if err != nil { return err @@ -434,11 +433,11 @@ func (s *state8) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state8) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state8) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner8.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV8SectorPreCommitOnChainInfo(sp), nil @@ -592,9 +591,9 @@ func fromV8SectorOnChainInfo(v8 miner8.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v8.Info.SealProof, SectorNumber: v8.Info.SectorNumber, SealedCID: v8.Info.SealedCID, @@ -606,6 +605,8 @@ func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v8.PreCommitDeposit, PreCommitEpoch: v8.PreCommitEpoch, } + + return ret } func fromV8SectorPreCommitOnChainInfoToV8(v8 miner8.SectorPreCommitOnChainInfo) minertypesv8.SectorPreCommitOnChainInfo { diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index 05d759f7d..9fbefbbb2 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -15,7 +15,6 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v10/miner" minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -200,7 +199,7 @@ func (s *state9) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -211,7 +210,7 @@ func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state9) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state9) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt9.AsMap(s.store, s.State.PreCommittedSectors, builtin9.DefaultHamtBitwidth) if err != nil { return err @@ -390,8 +389,8 @@ func (s *state9) Info() (MinerInfo, error) { ConsensusFaultElapsed: info.ConsensusFaultElapsed, Beneficiary: info.Beneficiary, - BeneficiaryTerm: info.BeneficiaryTerm, - PendingBeneficiaryTerm: info.PendingBeneficiaryTerm, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), } return mi, nil @@ -438,11 +437,11 @@ func (s *state9) PrecommitsMapHashFunction() func(input []byte) []byte { } -func (s *state9) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state9) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner9.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV9SectorPreCommitOnChainInfo(sp), nil @@ -578,9 +577,9 @@ func fromV9SectorOnChainInfo(v9 miner9.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV9SectorPreCommitOnChainInfo(v9 miner9.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - ret := minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV9SectorPreCommitOnChainInfo(v9 miner9.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v9.Info.SealProof, SectorNumber: v9.Info.SectorNumber, SealedCID: v9.Info.SealedCID, diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index ecf30eebb..b0136710a 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -414,7 +414,8 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces case tasktype.MinerBeneficiary: out.ActorProcessors[t] = actorstate.NewTask(api, actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - mineractors.VersionCodes()[actors.Version9]: {minertask.BeneficiaryExtractor{}}, + mineractors.VersionCodes()[actors.Version9]: {minertask.BeneficiaryExtractor{}}, + mineractors.VersionCodes()[actors.Version10]: {minertask.BeneficiaryExtractor{}}, }, )) case tasktype.MinerCurrentDeadlineInfo: @@ -444,7 +445,10 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces mineractors.VersionCodes()[actors.Version6]: {minertask.PreCommitInfoExtractorV8{}}, mineractors.VersionCodes()[actors.Version7]: {minertask.PreCommitInfoExtractorV8{}}, mineractors.VersionCodes()[actors.Version8]: {minertask.PreCommitInfoExtractorV8{}}, - mineractors.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + + // updated extractor for onchain types + mineractors.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + mineractors.VersionCodes()[actors.Version10]: {minertask.PreCommitInfoExtractorV9{}}, }, )) case tasktype.MinerSectorDeal: @@ -473,9 +477,10 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces case tasktype.MinerSectorInfoV7: out.ActorProcessors[t] = actorstate.NewTask(api, actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - mineractors.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, - mineractors.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, - mineractors.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + mineractors.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, + mineractors.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, + mineractors.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + mineractors.VersionCodes()[actors.Version10]: {minertask.V7SectorInfoExtractor{}}, }, )) From 88b98230e43150db14ba537c64cf891dcc132054 Mon Sep 17 00:00:00 2001 From: frrist Date: Wed, 18 Jan 2023 12:09:48 -0800 Subject: [PATCH 03/20] update lotus deps --- extern/filecoin-ffi | 2 +- go.mod | 4 ++-- go.sum | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 86eac2161..d2e527cf6 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 86eac2161f442945bffee3fbfe7d094c20b48dd3 +Subproject commit d2e527cf6881fd4f8a9547f15ffa1674a8004ea3 diff --git a/go.mod b/go.mod index 0930fec67..c634c2cd2 100644 --- a/go.mod +++ b/go.mod @@ -13,8 +13,8 @@ require ( github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec github.com/filecoin-project/go-jsonrpc v0.1.9 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.10.0-alpha-10 - github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887 + github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 + github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 diff --git a/go.sum b/go.sum index 056801278..b984f2b49 100644 --- a/go.sum +++ b/go.sum @@ -348,6 +348,8 @@ github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/ github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.10.0-alpha-10 h1:QUpSayVFUADlrtzCh7SDNlbuaNSlYPBR46Nt7WpFl9I= github.com/filecoin-project/go-state-types v0.10.0-alpha-10/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= +github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 h1:gT+IBH1eTLqiC+2c1TZjF5QliI20bcn/+3B/fuzio0s= +github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -358,6 +360,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19 h1:8thGBIFXoLHT8WmZ2tk42XAc7H66WsfqczVrS2VODyE= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19/go.mod h1:61ZGQoiDUAWjgI2ahc7AKC92yJsTm5steyWbkn0jkZE= github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887 h1:uJ9wDdkPZ026muNv3IZGOHU5pPVfdmbW0DMozwCDSDs= github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887/go.mod h1:Lzz0lq20H+5z2RKaKvrYQK04hpr5Sd7DlFkRwvrSmWQ= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= From 542bd8511d8a178b4405d7c1f79ca01a22b8a59a Mon Sep 17 00:00:00 2001 From: frrist Date: Wed, 18 Jan 2023 19:02:07 -0800 Subject: [PATCH 04/20] hopfully fix most of the things - there are still some bugs in lotus that prevent lily from running correctly --- chain/actors/actors.go | 1 + chain/actors/builtin/datacap/datacap.go | 14 +- chain/actors/builtin/datacap/v11.go | 92 +++ chain/actors/builtin/init/init.go | 14 +- chain/actors/builtin/init/v11.go | 151 +++++ chain/actors/builtin/market/market.go | 5 + chain/actors/builtin/market/v11.go | 256 ++++++++ chain/actors/builtin/miner/miner.go | 12 +- chain/actors/builtin/miner/v11.go | 623 ++++++++++++++++++++ chain/actors/builtin/multisig/multisig.go | 21 +- chain/actors/builtin/multisig/v11.go | 130 ++++ chain/actors/builtin/power/power.go | 11 +- chain/actors/builtin/power/v11.go | 186 ++++++ chain/actors/builtin/reward/reward.go | 11 +- chain/actors/builtin/reward/v11.go | 109 ++++ chain/actors/builtin/verifreg/v11.go | 172 ++++++ chain/actors/builtin/verifreg/verifreg.go | 11 +- chain/indexer/integrated/processor/state.go | 6 +- lens/util/repo.go | 20 +- tasks/actorstate/task.go | 3 +- tasks/messages/parsedmessage/task.go | 1 + 21 files changed, 1815 insertions(+), 34 deletions(-) create mode 100644 chain/actors/builtin/datacap/v11.go create mode 100644 chain/actors/builtin/init/v11.go create mode 100644 chain/actors/builtin/market/v11.go create mode 100644 chain/actors/builtin/miner/v11.go create mode 100644 chain/actors/builtin/multisig/v11.go create mode 100644 chain/actors/builtin/power/v11.go create mode 100644 chain/actors/builtin/reward/v11.go create mode 100644 chain/actors/builtin/verifreg/v11.go diff --git a/chain/actors/actors.go b/chain/actors/actors.go index c3c59191a..1ef261601 100644 --- a/chain/actors/actors.go +++ b/chain/actors/actors.go @@ -26,6 +26,7 @@ const ( Version8 Version = 8 Version9 Version = 9 Version10 Version = 10 + Version11 Version = 11 ) const ( AccountKey = "account" diff --git a/chain/actors/builtin/datacap/datacap.go b/chain/actors/builtin/datacap/datacap.go index 4f635f0fc..6ad0df6e3 100644 --- a/chain/actors/builtin/datacap/datacap.go +++ b/chain/actors/builtin/datacap/datacap.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin10 "github.com/filecoin-project/go-state-types/builtin" + builtin11 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" @@ -17,8 +17,8 @@ import ( ) var ( - Address = builtin10.DatacapActorAddr - Methods = builtin10.MethodsDatacap + Address = builtin11.DatacapActorAddr + Methods = builtin11.MethodsDatacap ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -35,6 +35,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version10: return load10(store, act.Head) + case actorstypes.Version11: + return load11(store, act.Head) + } } @@ -50,6 +53,9 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address case actorstypes.Version10: return make10(store, governor, bitwidth) + case actorstypes.Version11: + return make11(store, governor, bitwidth) + default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) } @@ -76,6 +82,7 @@ func AllCodes() []cid.Cid { return []cid.Cid{ (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -83,5 +90,6 @@ func VersionCodes() map[actors.Version]cid.Cid { return map[actors.Version]cid.Cid{ actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/datacap/v11.go b/chain/actors/builtin/datacap/v11.go new file mode 100644 index 000000000..b42b8dfdc --- /dev/null +++ b/chain/actors/builtin/datacap/v11.go @@ -0,0 +1,92 @@ +package datacap + +import ( + "crypto/sha256" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + + datacap11 "github.com/filecoin-project/go-state-types/builtin/v11/datacap" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make11(store adt.Store, governor address.Address, bitwidth uint64) (State, error) { + out := state11{store: store} + s, err := datacap11.ConstructState(store, governor, bitwidth) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state11 struct { + datacap11.State + store adt.Store +} + +func (s *state11) Governor() (address.Address, error) { + return s.State.Governor, nil +} + +func (s *state11) GetState() interface{} { + return &s.State +} + +func (s *state11) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachClient(s.store, actors.Version11, s.VerifiedClients, cb) +} + +func (s *state11) VerifiedClients() (adt.Map, error) { + return adt11.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth)) +} + +func (s *state11) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version11, s.VerifiedClients, addr) +} + +func (s *state11) VerifiedClientsMapBitWidth() int { + return int(s.Token.HamtBitWidth) +} + +func (s *state11) VerifiedClientsMapHashFunction() func(input []byte) []byte { + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } +} + +func (s *state11) ActorKey() string { + return actors.DatacapKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/init/init.go b/chain/actors/builtin/init/init.go index 3205aa96d..e922a40ae 100644 --- a/chain/actors/builtin/init/init.go +++ b/chain/actors/builtin/init/init.go @@ -28,14 +28,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin10 "github.com/filecoin-project/go-state-types/builtin" + builtin11 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin10.InitActorAddr - Methods = builtin10.MethodsInit + Address = builtin11.InitActorAddr + Methods = builtin11.MethodsInit ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -55,6 +55,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -119,6 +122,9 @@ func MakeState(store adt.Store, av actors.Version, networkName string) (State, e case actors.Version10: return make10(store, networkName) + case actors.Version11: + return make11(store, networkName) + } return nil, fmt.Errorf("unknown actor version %d", av) } @@ -169,6 +175,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -184,5 +191,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/init/v11.go b/chain/actors/builtin/init/v11.go new file mode 100644 index 000000000..0ac6b750e --- /dev/null +++ b/chain/actors/builtin/init/v11.go @@ -0,0 +1,151 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package init + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/node/modules/dtypes" + + "crypto/sha256" + + builtin11 "github.com/filecoin-project/go-state-types/builtin" + init11 "github.com/filecoin-project/go-state-types/builtin/v11/init" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make11(store adt.Store, networkName string) (State, error) { + out := state11{store: store} + + s, err := init11.ConstructState(store, networkName) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state11 struct { + init11.State + store adt.Store +} + +func (s *state11) ResolveAddress(address address.Address) (address.Address, bool, error) { + return s.State.ResolveAddress(s.store, address) +} + +func (s *state11) MapAddressToNewID(address address.Address) (address.Address, error) { + return s.State.MapAddressToNewID(s.store, address) +} + +func (s *state11) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error { + addrs, err := adt11.AsMap(s.store, s.State.AddressMap, builtin11.DefaultHamtBitwidth) + if err != nil { + return err + } + var actorID cbg.CborInt + return addrs.ForEach(&actorID, func(key string) error { + addr, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(abi.ActorID(actorID), addr) + }) +} + +func (s *state11) NetworkName() (dtypes.NetworkName, error) { + return dtypes.NetworkName(s.State.NetworkName), nil +} + +func (s *state11) SetNetworkName(name string) error { + s.State.NetworkName = name + return nil +} + +func (s *state11) SetNextID(id abi.ActorID) error { + s.State.NextID = id + return nil +} + +func (s *state11) Remove(addrs ...address.Address) (err error) { + m, err := adt11.AsMap(s.store, s.State.AddressMap, builtin11.DefaultHamtBitwidth) + if err != nil { + return err + } + for _, addr := range addrs { + if err = m.Delete(abi.AddrKey(addr)); err != nil { + return fmt.Errorf("failed to delete entry for address: %s; err: %w", addr, err) + } + } + amr, err := m.Root() + if err != nil { + return fmt.Errorf("failed to get address map root: %w", err) + } + s.State.AddressMap = amr + return nil +} + +func (s *state11) SetAddressMap(mcid cid.Cid) error { + s.State.AddressMap = mcid + return nil +} + +func (s *state11) AddressMap() (adt.Map, error) { + return adt11.AsMap(s.store, s.State.AddressMap, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) AddressMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) AddressMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) GetState() interface{} { + return &s.State +} + +func (s *state11) ActorKey() string { + return actors.InitKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index 5f0b2d1f1..9123ec11b 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -57,6 +57,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -173,6 +176,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -188,5 +192,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/market/v11.go b/chain/actors/builtin/market/v11.go new file mode 100644 index 000000000..624ac2565 --- /dev/null +++ b/chain/actors/builtin/market/v11.go @@ -0,0 +1,256 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package market + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lotus/chain/actors/adt" + + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + market11 "github.com/filecoin-project/go-state-types/builtin/v11/market" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" + markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make11(store adt.Store) (State, error) { + out := state11{store: store} + + s, err := market11.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state11 struct { + market11.State + store adt.Store +} + +func (s *state11) StatesChanged(otherState State) (bool, error) { + otherState11, ok := otherState.(*state11) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.States.Equals(otherState11.State.States), nil +} + +func (s *state11) States() (DealStates, error) { + stateArray, err := adt11.AsArray(s.store, s.State.States, market11.StatesAmtBitwidth) + if err != nil { + return nil, err + } + return &dealStates11{stateArray}, nil +} + +func (s *state11) ProposalsChanged(otherState State) (bool, error) { + otherState11, ok := otherState.(*state11) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.Proposals.Equals(otherState11.State.Proposals), nil +} + +func (s *state11) Proposals() (DealProposals, error) { + proposalArray, err := adt11.AsArray(s.store, s.State.Proposals, market11.ProposalsAmtBitwidth) + if err != nil { + return nil, err + } + return &dealProposals11{proposalArray}, nil +} + +type dealStates11 struct { + adt.Array +} + +func (s *dealStates11) Get(dealID abi.DealID) (*DealState, bool, error) { + var deal11 market11.DealState + found, err := s.Array.Get(uint64(dealID), &deal11) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + deal := fromV11DealState(deal11) + return &deal, true, nil +} + +func (s *dealStates11) ForEach(cb func(dealID abi.DealID, ds DealState) error) error { + var ds11 market11.DealState + return s.Array.ForEach(&ds11, func(idx int64) error { + return cb(abi.DealID(idx), fromV11DealState(ds11)) + }) +} + +func (s *dealStates11) decode(val *cbg.Deferred) (*DealState, error) { + var ds11 market11.DealState + if err := ds11.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + ds := fromV11DealState(ds11) + return &ds, nil +} + +func (s *dealStates11) array() adt.Array { + return s.Array +} + +func fromV11DealState(v11 market11.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v11.SectorStartEpoch, + LastUpdatedEpoch: v11.LastUpdatedEpoch, + SlashEpoch: v11.SlashEpoch, + VerifiedClaim: 0, + } + + ret.VerifiedClaim = verifregtypes.AllocationId(v11.VerifiedClaim) + + return ret +} + +type dealProposals11 struct { + adt.Array +} + +func (s *dealProposals11) Get(dealID abi.DealID) (*DealProposal, bool, error) { + var proposal11 market11.DealProposal + found, err := s.Array.Get(uint64(dealID), &proposal11) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + + proposal, err := fromV11DealProposal(proposal11) + if err != nil { + return nil, true, xerrors.Errorf("decoding proposal: %w", err) + } + + return &proposal, true, nil +} + +func (s *dealProposals11) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error { + var dp11 market11.DealProposal + return s.Array.ForEach(&dp11, func(idx int64) error { + dp, err := fromV11DealProposal(dp11) + if err != nil { + return xerrors.Errorf("decoding proposal: %w", err) + } + + return cb(abi.DealID(idx), dp) + }) +} + +func (s *dealProposals11) decode(val *cbg.Deferred) (*DealProposal, error) { + var dp11 market11.DealProposal + if err := dp11.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + + dp, err := fromV11DealProposal(dp11) + if err != nil { + return nil, err + } + + return &dp, nil +} + +func (s *dealProposals11) array() adt.Array { + return s.Array +} + +func fromV11DealProposal(v11 market11.DealProposal) (DealProposal, error) { + + label, err := fromV11Label(v11.Label) + + if err != nil { + return DealProposal{}, xerrors.Errorf("error setting deal label: %w", err) + } + + return DealProposal{ + PieceCID: v11.PieceCID, + PieceSize: v11.PieceSize, + VerifiedDeal: v11.VerifiedDeal, + Client: v11.Client, + Provider: v11.Provider, + + Label: label, + + StartEpoch: v11.StartEpoch, + EndEpoch: v11.EndEpoch, + StoragePricePerEpoch: v11.StoragePricePerEpoch, + + ProviderCollateral: v11.ProviderCollateral, + ClientCollateral: v11.ClientCollateral, + }, nil +} + +func (s *state11) DealProposalsAmtBitwidth() int { + return market11.ProposalsAmtBitwidth +} + +func (s *state11) DealStatesAmtBitwidth() int { + return market11.StatesAmtBitwidth +} + +func (s *state11) ActorKey() string { + return actors.MarketKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func fromV11Label(v11 market11.DealLabel) (DealLabel, error) { + if v11.IsString() { + str, err := v11.ToString() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert string label to string: %w", err) + } + return markettypes.NewLabelFromString(str) + } + + bs, err := v11.ToBytes() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert bytes label to bytes: %w", err) + } + return markettypes.NewLabelFromBytes(bs) +} diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index e8e836b37..6f5b388ec 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/proof" - miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -54,6 +54,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -118,6 +121,9 @@ func MakeState(store adt.Store, av actors.Version) (State, error) { case actors.Version10: return make10(store) + case actors.Version11: + return make11(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -215,7 +221,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = miner10.SectorOnChainInfo +type SectorOnChainInfo = miner11.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -335,6 +341,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -350,5 +357,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/miner/v11.go b/chain/actors/builtin/miner/v11.go new file mode 100644 index 000000000..1ef086d70 --- /dev/null +++ b/chain/actors/builtin/miner/v11.go @@ -0,0 +1,623 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package miner + +import ( + "bytes" + "errors" + "fmt" + + "github.com/filecoin-project/go-bitfield" + rle "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + "github.com/filecoin-project/lotus/chain/actors/adt" + + "crypto/sha256" + + builtin11 "github.com/filecoin-project/go-state-types/builtin" + miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make11(store adt.Store) (State, error) { + out := state11{store: store} + out.State = miner11.State{} + return &out, nil +} + +type state11 struct { + miner11.State + store adt.Store +} + +type deadline11 struct { + miner11.Deadline + store adt.Store +} + +type partition11 struct { + miner11.Partition + store adt.Store +} + +func (s *state11) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmount, err error) { + defer func() { + if r := recover(); r != nil { + err = xerrors.Errorf("failed to get available balance: %w", r) + available = abi.NewTokenAmount(0) + } + }() + // this panics if the miner doesnt have enough funds to cover their locked pledge + available, err = s.GetAvailableBalance(bal) + return available, err +} + +func (s *state11) VestedFunds(epoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.CheckVestedFunds(s.store, epoch) +} + +func (s *state11) LockedFunds() (LockedFunds, error) { + return LockedFunds{ + VestingFunds: s.State.LockedFunds, + InitialPledgeRequirement: s.State.InitialPledge, + PreCommitDeposits: s.State.PreCommitDeposits, + }, nil +} + +func (s *state11) FeeDebt() (abi.TokenAmount, error) { + return s.State.FeeDebt, nil +} + +func (s *state11) InitialPledge() (abi.TokenAmount, error) { + return s.State.InitialPledge, nil +} + +func (s *state11) PreCommitDeposits() (abi.TokenAmount, error) { + return s.State.PreCommitDeposits, nil +} + +func (s *state11) GetSector(num abi.SectorNumber) (*SectorOnChainInfo, error) { + info, ok, err := s.State.GetSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV11SectorOnChainInfo(*info) + return &ret, nil +} + +func (s *state11) FindSector(num abi.SectorNumber) (*SectorLocation, error) { + dlIdx, partIdx, err := s.State.FindSector(s.store, num) + if err != nil { + return nil, err + } + return &SectorLocation{ + Deadline: dlIdx, + Partition: partIdx, + }, nil +} + +func (s *state11) NumLiveSectors() (uint64, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return 0, err + } + var total uint64 + if err := dls.ForEach(s.store, func(dlIdx uint64, dl *miner11.Deadline) error { + total += dl.LiveSectors + return nil + }); err != nil { + return 0, err + } + return total, nil +} + +// GetSectorExpiration returns the effective expiration of the given sector. +// +// If the sector does not expire early, the Early expiration field is 0. +func (s *state11) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + // NOTE: this can be optimized significantly. + // 1. If the sector is non-faulty, it will expire on-time (can be + // learned from the sector info). + // 2. If it's faulty, it will expire early within the first 42 entries + // of the expiration queue. + + stopErr := errors.New("stop") + out := SectorExpiration{} + err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner11.Deadline) error { + partitions, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + quant := s.State.QuantSpecForDeadline(dlIdx) + var part miner11.Partition + return partitions.ForEach(&part, func(partIdx int64) error { + if found, err := part.Sectors.IsSet(uint64(num)); err != nil { + return err + } else if !found { + return nil + } + if found, err := part.Terminated.IsSet(uint64(num)); err != nil { + return err + } else if found { + // already terminated + return stopErr + } + + q, err := miner11.LoadExpirationQueue(s.store, part.ExpirationsEpochs, quant, miner11.PartitionExpirationAmtBitwidth) + if err != nil { + return err + } + var exp miner11.ExpirationSet + return q.ForEach(&exp, func(epoch int64) error { + if early, err := exp.EarlySectors.IsSet(uint64(num)); err != nil { + return err + } else if early { + out.Early = abi.ChainEpoch(epoch) + return nil + } + if onTime, err := exp.OnTimeSectors.IsSet(uint64(num)); err != nil { + return err + } else if onTime { + out.OnTime = abi.ChainEpoch(epoch) + return stopErr + } + return nil + }) + }) + }) + if err == stopErr { + err = nil + } + if err != nil { + return nil, err + } + if out.Early == 0 && out.OnTime == 0 { + return nil, xerrors.Errorf("failed to find sector %d", num) + } + return &out, nil +} + +func (s *state11) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { + info, ok, err := s.State.GetPrecommittedSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV11SectorPreCommitOnChainInfo(*info) + + return &ret, nil +} + +func (s *state11) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { + precommitted, err := adt11.AsMap(s.store, s.State.PreCommittedSectors, builtin11.DefaultHamtBitwidth) + if err != nil { + return err + } + + var info miner11.SectorPreCommitOnChainInfo + if err := precommitted.ForEach(&info, func(_ string) error { + return cb(fromV11SectorPreCommitOnChainInfo(info)) + }); err != nil { + return err + } + + return nil +} + +func (s *state11) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) { + sectors, err := miner11.LoadSectors(s.store, s.State.Sectors) + if err != nil { + return nil, err + } + + // If no sector numbers are specified, load all. + if snos == nil { + infos := make([]*SectorOnChainInfo, 0, sectors.Length()) + var info11 miner11.SectorOnChainInfo + if err := sectors.ForEach(&info11, func(_ int64) error { + info := fromV11SectorOnChainInfo(info11) + infos = append(infos, &info) + return nil + }); err != nil { + return nil, err + } + return infos, nil + } + + // Otherwise, load selected. + infos11, err := sectors.Load(*snos) + if err != nil { + return nil, err + } + infos := make([]*SectorOnChainInfo, len(infos11)) + for i, info11 := range infos11 { + info := fromV11SectorOnChainInfo(*info11) + infos[i] = &info + } + return infos, nil +} + +func (s *state11) loadAllocatedSectorNumbers() (bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors) + return allocatedSectors, err +} + +func (s *state11) IsAllocated(num abi.SectorNumber) (bool, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return false, err + } + + return allocatedSectors.IsSet(uint64(num)) +} + +func (s *state11) GetProvingPeriodStart() (abi.ChainEpoch, error) { + return s.State.ProvingPeriodStart, nil +} + +func (s *state11) UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return nil, err + } + + allocatedRuns, err := allocatedSectors.RunIterator() + if err != nil { + return nil, err + } + + unallocatedRuns, err := rle.Subtract( + &rle.RunSliceIterator{Runs: []rle.Run{{Val: true, Len: abi.MaxSectorNumber}}}, + allocatedRuns, + ) + if err != nil { + return nil, err + } + + iter, err := rle.BitsFromRuns(unallocatedRuns) + if err != nil { + return nil, err + } + + sectors := make([]abi.SectorNumber, 0, count) + for iter.HasNext() && len(sectors) < count { + nextNo, err := iter.Next() + if err != nil { + return nil, err + } + sectors = append(sectors, abi.SectorNumber(nextNo)) + } + + return sectors, nil +} + +func (s *state11) GetAllocatedSectors() (*bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + if err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors); err != nil { + return nil, err + } + + return &allocatedSectors, nil +} + +func (s *state11) LoadDeadline(idx uint64) (Deadline, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + dl, err := dls.LoadDeadline(s.store, idx) + if err != nil { + return nil, err + } + return &deadline11{*dl, s.store}, nil +} + +func (s *state11) ForEachDeadline(cb func(uint64, Deadline) error) error { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + return dls.ForEach(s.store, func(i uint64, dl *miner11.Deadline) error { + return cb(i, &deadline11{*dl, s.store}) + }) +} + +func (s *state11) NumDeadlines() (uint64, error) { + return miner11.WPoStPeriodDeadlines, nil +} + +func (s *state11) DeadlinesChanged(other State) (bool, error) { + other11, ok := other.(*state11) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !s.State.Deadlines.Equals(other11.Deadlines), nil +} + +func (s *state11) MinerInfoChanged(other State) (bool, error) { + other0, ok := other.(*state11) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Info.Equals(other0.State.Info), nil +} + +func (s *state11) Info() (MinerInfo, error) { + info, err := s.State.GetInfo(s.store) + if err != nil { + return MinerInfo{}, err + } + + mi := MinerInfo{ + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: info.WindowPoStProofType, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + } + + return mi, nil +} + +func (s *state11) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { + return s.State.RecordedDeadlineInfo(epoch), nil +} + +func (s *state11) DeadlineCronActive() (bool, error) { + return s.State.DeadlineCronActive, nil +} + +func (s *state11) SectorsArray() (adt.Array, error) { + return adt11.AsArray(s.store, s.Sectors, miner11.SectorsAmtBitwidth) +} + +func (s *state11) DecodeSectorOnChainInfo(val *cbg.Deferred) (SectorOnChainInfo, error) { + var si miner11.SectorOnChainInfo + err := si.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorOnChainInfo{}, err + } + + return fromV11SectorOnChainInfo(si), nil +} + +func (s *state11) PrecommitsMap() (adt.Map, error) { + return adt11.AsMap(s.store, s.PreCommittedSectors, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) PrecommitsMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) PrecommitsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { + var sp miner11.SectorPreCommitOnChainInfo + err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorPreCommitOnChainInfo{}, err + } + + return fromV11SectorPreCommitOnChainInfo(sp), nil +} + +func (s *state11) DecodeSectorPreCommitOnChainInfoToV8(val *cbg.Deferred) (minertypesv8.SectorPreCommitOnChainInfo, error) { + + return minertypesv8.SectorPreCommitOnChainInfo{}, fmt.Errorf("unsupported in actors v9") + +} + +func (s *state11) ForEachPrecommittedSectorV8(cb func(minertypesv8.SectorPreCommitOnChainInfo) error) error { + + return fmt.Errorf("unsupported for actors v9") + +} + +func (s *state11) EraseAllUnproven() error { + + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + + err = dls.ForEach(s.store, func(dindx uint64, dl *miner11.Deadline) error { + ps, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + + var part miner11.Partition + err = ps.ForEach(&part, func(pindx int64) error { + _ = part.ActivateUnproven() + err = ps.Set(uint64(pindx), &part) + return nil + }) + + if err != nil { + return err + } + + dl.Partitions, err = ps.Root() + if err != nil { + return err + } + + return dls.UpdateDeadline(s.store, dindx, dl) + }) + if err != nil { + return err + } + + return s.State.SaveDeadlines(s.store, dls) + +} + +func (d *deadline11) LoadPartition(idx uint64) (Partition, error) { + p, err := d.Deadline.LoadPartition(d.store, idx) + if err != nil { + return nil, err + } + return &partition11{*p, d.store}, nil +} + +func (d *deadline11) ForEachPartition(cb func(uint64, Partition) error) error { + ps, err := d.Deadline.PartitionsArray(d.store) + if err != nil { + return err + } + var part miner11.Partition + return ps.ForEach(&part, func(i int64) error { + return cb(uint64(i), &partition11{part, d.store}) + }) +} + +func (d *deadline11) PartitionsChanged(other Deadline) (bool, error) { + other11, ok := other.(*deadline11) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !d.Deadline.Partitions.Equals(other11.Deadline.Partitions), nil +} + +func (d *deadline11) PartitionsPoSted() (bitfield.BitField, error) { + return d.Deadline.PartitionsPoSted, nil +} + +func (d *deadline11) DisputableProofCount() (uint64, error) { + + ops, err := d.OptimisticProofsSnapshotArray(d.store) + if err != nil { + return 0, err + } + + return ops.Length(), nil + +} + +func (p *partition11) AllSectors() (bitfield.BitField, error) { + return p.Partition.Sectors, nil +} + +func (p *partition11) FaultySectors() (bitfield.BitField, error) { + return p.Partition.Faults, nil +} + +func (p *partition11) RecoveringSectors() (bitfield.BitField, error) { + return p.Partition.Recoveries, nil +} + +func (p *partition11) UnprovenSectors() (bitfield.BitField, error) { + return p.Partition.Unproven, nil +} + +func fromV11SectorOnChainInfo(v11 miner11.SectorOnChainInfo) SectorOnChainInfo { + info := SectorOnChainInfo{ + SectorNumber: v11.SectorNumber, + SealProof: v11.SealProof, + SealedCID: v11.SealedCID, + DealIDs: v11.DealIDs, + Activation: v11.Activation, + Expiration: v11.Expiration, + DealWeight: v11.DealWeight, + VerifiedDealWeight: v11.VerifiedDealWeight, + InitialPledge: v11.InitialPledge, + ExpectedDayReward: v11.ExpectedDayReward, + ExpectedStoragePledge: v11.ExpectedStoragePledge, + + SectorKeyCID: v11.SectorKeyCID, + } + return info +} + +func fromV11SectorPreCommitOnChainInfo(v11 miner11.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v11.Info.SealProof, + SectorNumber: v11.Info.SectorNumber, + SealedCID: v11.Info.SealedCID, + SealRandEpoch: v11.Info.SealRandEpoch, + DealIDs: v11.Info.DealIDs, + Expiration: v11.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v11.PreCommitDeposit, + PreCommitEpoch: v11.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v11.Info.UnsealedCid + + return ret +} + +func (s *state11) GetState() interface{} { + return &s.State +} + +func (s *state11) SectorsAmtBitwidth() int { + return miner11.SectorsAmtBitwidth +} + +func (s *state11) ActorKey() string { + return actors.MinerKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/multisig/multisig.go b/chain/actors/builtin/multisig/multisig.go index 246831ffd..961be66f2 100644 --- a/chain/actors/builtin/multisig/multisig.go +++ b/chain/actors/builtin/multisig/multisig.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" - msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + msig11 "github.com/filecoin-project/go-state-types/builtin/v11/multisig" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -53,6 +53,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -107,19 +110,19 @@ type State interface { decodeTransaction(val *cbg.Deferred) (Transaction, error) } -type Transaction = msig10.Transaction +type Transaction = msig11.Transaction var Methods = builtintypes.MethodsMultisig // these types are the same between v0 and v6 -type ProposalHashData = msig10.ProposalHashData -type ProposeReturn = msig10.ProposeReturn -type ProposeParams = msig10.ProposeParams -type ApproveReturn = msig10.ApproveReturn -type TxnIDParams = msig10.TxnIDParams +type ProposalHashData = msig11.ProposalHashData +type ProposeReturn = msig11.ProposeReturn +type ProposeParams = msig11.ProposeParams +type ApproveReturn = msig11.ApproveReturn +type TxnIDParams = msig11.TxnIDParams func txnParams(id uint64, data *ProposalHashData) ([]byte, error) { - params := msig10.TxnIDParams{ID: msig10.TxnID(id)} + params := msig11.TxnIDParams{ID: msig11.TxnID(id)} if data != nil { if data.Requester.Protocol() != address.ID { return nil, fmt.Errorf("proposer address must be an ID address, was %s", data.Requester) @@ -153,6 +156,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -168,5 +172,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/multisig/v11.go b/chain/actors/builtin/multisig/v11.go new file mode 100644 index 000000000..3a02f65ce --- /dev/null +++ b/chain/actors/builtin/multisig/v11.go @@ -0,0 +1,130 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package multisig + +import ( + "bytes" + "encoding/binary" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin11 "github.com/filecoin-project/go-state-types/builtin" + msig11 "github.com/filecoin-project/go-state-types/builtin/v11/multisig" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state11 struct { + msig11.State + store adt.Store +} + +func (s *state11) LockedBalance(currEpoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.State.AmountLocked(currEpoch - s.State.StartEpoch), nil +} + +func (s *state11) StartEpoch() (abi.ChainEpoch, error) { + return s.State.StartEpoch, nil +} + +func (s *state11) UnlockDuration() (abi.ChainEpoch, error) { + return s.State.UnlockDuration, nil +} + +func (s *state11) InitialBalance() (abi.TokenAmount, error) { + return s.State.InitialBalance, nil +} + +func (s *state11) Threshold() (uint64, error) { + return s.State.NumApprovalsThreshold, nil +} + +func (s *state11) Signers() ([]address.Address, error) { + return s.State.Signers, nil +} + +func (s *state11) ForEachPendingTxn(cb func(id int64, txn Transaction) error) error { + arr, err := adt11.AsMap(s.store, s.State.PendingTxns, builtin11.DefaultHamtBitwidth) + if err != nil { + return err + } + var out msig11.Transaction + return arr.ForEach(&out, func(key string) error { + txid, n := binary.Varint([]byte(key)) + if n <= 0 { + return fmt.Errorf("invalid pending transaction key: %v", key) + } + return cb(txid, (Transaction)(out)) //nolint:unconvert + }) +} + +func (s *state11) PendingTxnChanged(other State) (bool, error) { + other11, ok := other.(*state11) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.PendingTxns.Equals(other11.PendingTxns), nil +} + +func (s *state11) PendingTransactionsMap() (adt.Map, error) { + return adt11.AsMap(s.store, s.PendingTxns, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) PendingTransactionsMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) PendingTransactionsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) decodeTransaction(val *cbg.Deferred) (Transaction, error) { + var tx msig11.Transaction + if err := tx.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Transaction{}, err + } + return Transaction(tx), nil +} + +func (s *state11) ActorKey() string { + return actors.MultisigKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index a8f2bdf63..704e304a6 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -32,14 +32,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin10 "github.com/filecoin-project/go-state-types/builtin" + builtin11 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin10.StoragePowerActorAddr - Methods = builtin10.MethodsPower + Address = builtin11.StoragePowerActorAddr + Methods = builtin11.MethodsPower ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -59,6 +59,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -145,6 +148,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -160,5 +164,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/power/v11.go b/chain/actors/builtin/power/v11.go new file mode 100644 index 000000000..76df961c8 --- /dev/null +++ b/chain/actors/builtin/power/v11.go @@ -0,0 +1,186 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package power + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + "crypto/sha256" + + builtin11 "github.com/filecoin-project/go-state-types/builtin" + power11 "github.com/filecoin-project/go-state-types/builtin/v11/power" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state11 struct { + power11.State + store adt.Store +} + +func (s *state11) TotalLocked() (abi.TokenAmount, error) { + return s.TotalPledgeCollateral, nil +} + +func (s *state11) TotalPower() (Claim, error) { + return Claim{ + RawBytePower: s.TotalRawBytePower, + QualityAdjPower: s.TotalQualityAdjPower, + }, nil +} + +// Committed power to the network. Includes miners below the minimum threshold. +func (s *state11) TotalCommitted() (Claim, error) { + return Claim{ + RawBytePower: s.TotalBytesCommitted, + QualityAdjPower: s.TotalQABytesCommitted, + }, nil +} + +func (s *state11) MinerPower(addr address.Address) (Claim, bool, error) { + claims, err := s.ClaimsMap() + if err != nil { + return Claim{}, false, err + } + var claim power11.Claim + ok, err := claims.Get(abi.AddrKey(addr), &claim) + if err != nil { + return Claim{}, false, err + } + return Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }, ok, nil +} + +func (s *state11) MinerNominalPowerMeetsConsensusMinimum(a address.Address) (bool, error) { + return s.State.MinerNominalPowerMeetsConsensusMinimum(s.store, a) +} + +func (s *state11) TotalPowerSmoothed() (builtin.FilterEstimate, error) { + return builtin.FilterEstimate(s.State.ThisEpochQAPowerSmoothed), nil +} + +func (s *state11) MinerCounts() (uint64, uint64, error) { + return uint64(s.State.MinerAboveMinPowerCount), uint64(s.State.MinerCount), nil +} + +func (s *state11) ListAllMiners() ([]address.Address, error) { + claims, err := s.ClaimsMap() + if err != nil { + return nil, err + } + + var miners []address.Address + err = claims.ForEach(nil, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + miners = append(miners, a) + return nil + }) + if err != nil { + return nil, err + } + + return miners, nil +} + +func (s *state11) ForEachClaim(cb func(miner address.Address, claim Claim) error) error { + claims, err := s.ClaimsMap() + if err != nil { + return err + } + + var claim power11.Claim + return claims.ForEach(&claim, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + return cb(a, Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }) + }) +} + +func (s *state11) ClaimsChanged(other State) (bool, error) { + other11, ok := other.(*state11) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Claims.Equals(other11.State.Claims), nil +} + +func (s *state11) ClaimsMap() (adt.Map, error) { + return adt11.AsMap(s.store, s.Claims, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) ClaimsMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) ClaimsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) decodeClaim(val *cbg.Deferred) (Claim, error) { + var ci power11.Claim + if err := ci.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Claim{}, err + } + return fromV11Claim(ci), nil +} + +func fromV11Claim(v11 power11.Claim) Claim { + return Claim{ + RawBytePower: v11.RawBytePower, + QualityAdjPower: v11.QualityAdjPower, + } +} + +func (s *state11) ActorKey() string { + return actors.PowerKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/reward/reward.go b/chain/actors/builtin/reward/reward.go index 2e80f6390..43ee33de1 100644 --- a/chain/actors/builtin/reward/reward.go +++ b/chain/actors/builtin/reward/reward.go @@ -23,7 +23,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin10 "github.com/filecoin-project/go-state-types/builtin" + builtin11 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lotus/chain/types" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin10.RewardActorAddr - Methods = builtin10.MethodsReward + Address = builtin11.RewardActorAddr + Methods = builtin11.MethodsReward ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -56,6 +56,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -124,6 +127,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -139,5 +143,6 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/actors/builtin/reward/v11.go b/chain/actors/builtin/reward/v11.go new file mode 100644 index 000000000..fca15ac4d --- /dev/null +++ b/chain/actors/builtin/reward/v11.go @@ -0,0 +1,109 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package reward + +import ( + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" + reward11 "github.com/filecoin-project/go-state-types/builtin/v11/reward" + smoothing11 "github.com/filecoin-project/go-state-types/builtin/v11/util/smoothing" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state11 struct { + reward11.State + store adt.Store +} + +func (s *state11) ThisEpochReward() (abi.TokenAmount, error) { + return s.State.ThisEpochReward, nil +} + +func (s *state11) ThisEpochRewardSmoothed() (builtin.FilterEstimate, error) { + + return builtin.FilterEstimate{ + PositionEstimate: s.State.ThisEpochRewardSmoothed.PositionEstimate, + VelocityEstimate: s.State.ThisEpochRewardSmoothed.VelocityEstimate, + }, nil + +} + +func (s *state11) ThisEpochBaselinePower() (abi.StoragePower, error) { + return s.State.ThisEpochBaselinePower, nil +} + +func (s *state11) TotalStoragePowerReward() (abi.TokenAmount, error) { + return s.State.TotalStoragePowerReward, nil +} + +func (s *state11) EffectiveBaselinePower() (abi.StoragePower, error) { + return s.State.EffectiveBaselinePower, nil +} + +func (s *state11) EffectiveNetworkTime() (abi.ChainEpoch, error) { + return s.State.EffectiveNetworkTime, nil +} + +func (s *state11) CumsumBaseline() (reward11.Spacetime, error) { + return s.State.CumsumBaseline, nil +} + +func (s *state11) CumsumRealized() (reward11.Spacetime, error) { + return s.State.CumsumRealized, nil +} + +func (s *state11) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { + return miner11.InitialPledgeForPower( + qaPower, + s.State.ThisEpochBaselinePower, + s.State.ThisEpochRewardSmoothed, + smoothing11.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + circSupply, + ), nil +} + +func (s *state11) PreCommitDepositForPower(networkQAPower builtin.FilterEstimate, sectorWeight abi.StoragePower) (abi.TokenAmount, error) { + return miner11.PreCommitDepositForPower(s.State.ThisEpochRewardSmoothed, + smoothing11.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + sectorWeight), nil +} + +func (s *state11) ActorKey() string { + return actors.RewardKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/verifreg/v11.go b/chain/actors/builtin/verifreg/v11.go new file mode 100644 index 000000000..42677d01f --- /dev/null +++ b/chain/actors/builtin/verifreg/v11.go @@ -0,0 +1,172 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package verifreg + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin11 "github.com/filecoin-project/go-state-types/builtin" + adt11 "github.com/filecoin-project/go-state-types/builtin/v11/util/adt" + verifreg11 "github.com/filecoin-project/go-state-types/builtin/v11/verifreg" + + "github.com/filecoin-project/go-state-types/big" + + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lily/chain/actors" +) + +var _ State = (*state11)(nil) + +func load11(store adt.Store, root cid.Cid) (State, error) { + out := state11{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state11 struct { + verifreg11.State + store adt.Store +} + +func (s *state11) ActorKey() string { + return actors.VerifregKey +} + +func (s *state11) ActorVersion() actors.Version { + return actors.Version11 +} + +func (s *state11) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func (s *state11) VerifiedClientsMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) VerifiedClientsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) VerifiedClientsMap() (adt.Map, error) { + + return nil, fmt.Errorf("unsupported in actors v11") + +} + +func (s *state11) VerifiersMap() (adt.Map, error) { + return adt11.AsMap(s.store, s.Verifiers, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) VerifiersMapBitWidth() int { + + return builtin11.DefaultHamtBitwidth + +} + +func (s *state11) VerifiersMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state11) RootKey() (address.Address, error) { + return s.State.RootKey, nil +} + +func (s *state11) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + + return false, big.Zero(), fmt.Errorf("unsupported in actors v11") + +} + +func (s *state11) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version11, s.VerifiersMap, addr) +} + +func (s *state11) RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) { + return getRemoveDataCapProposalID(s.store, actors.Version11, s.removeDataCapProposalIDs, verifier, client) +} + +func (s *state11) ForEachVerifier(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachCap(s.store, actors.Version11, s.VerifiersMap, cb) +} + +func (s *state11) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + + return fmt.Errorf("unsupported in actors v11") + +} + +func (s *state11) removeDataCapProposalIDs() (adt.Map, error) { + return adt11.AsMap(s.store, s.RemoveDataCapProposalIDs, builtin11.DefaultHamtBitwidth) +} + +func (s *state11) GetState() interface{} { + return &s.State +} + +func (s *state11) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg11.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state11) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v11Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v11Map)) + for k, v := range v11Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err + +} + +func (s *state11) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { + + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg11.ClaimId(claimId)) + return (*Claim)(claim), ok, err + +} + +func (s *state11) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v11Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v11Map)) + for k, v := range v11Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + +} diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index e380a9a51..e7c961c2a 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -24,7 +24,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin10 "github.com/filecoin-project/go-state-types/builtin" + builtin11 "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" lotusactors "github.com/filecoin-project/lotus/chain/actors" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin10.VerifiedRegistryActorAddr - Methods = builtin10.MethodsVerifiedRegistry + Address = builtin11.VerifiedRegistryActorAddr + Methods = builtin11.MethodsVerifiedRegistry ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -56,6 +56,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version10: return load10(store, act.Head) + case actors.Version11: + return load11(store, act.Head) + } } @@ -143,6 +146,7 @@ func AllCodes() []cid.Cid { (&state8{}).Code(), (&state9{}).Code(), (&state10{}).Code(), + (&state11{}).Code(), } } @@ -158,6 +162,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version8: (&state8{}).Code(), actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), + actors.Version11: (&state11{}).Code(), } } diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index b0136710a..b4fd6fd01 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -416,6 +416,7 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces map[cid.Cid][]actorstate.ActorStateExtractor{ mineractors.VersionCodes()[actors.Version9]: {minertask.BeneficiaryExtractor{}}, mineractors.VersionCodes()[actors.Version10]: {minertask.BeneficiaryExtractor{}}, + mineractors.VersionCodes()[actors.Version11]: {minertask.BeneficiaryExtractor{}}, }, )) case tasktype.MinerCurrentDeadlineInfo: @@ -449,6 +450,7 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces // updated extractor for onchain types mineractors.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, mineractors.VersionCodes()[actors.Version10]: {minertask.PreCommitInfoExtractorV9{}}, + mineractors.VersionCodes()[actors.Version11]: {minertask.PreCommitInfoExtractorV9{}}, }, )) case tasktype.MinerSectorDeal: @@ -481,6 +483,7 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces mineractors.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, mineractors.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, mineractors.VersionCodes()[actors.Version10]: {minertask.V7SectorInfoExtractor{}}, + mineractors.VersionCodes()[actors.Version11]: {minertask.V7SectorInfoExtractor{}}, }, )) @@ -557,7 +560,8 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces verifregactors.VersionCodes()[actors.Version5]: {verifregtask.ClientExtractor{}}, verifregactors.VersionCodes()[actors.Version6]: {verifregtask.ClientExtractor{}}, verifregactors.VersionCodes()[actors.Version7]: {verifregtask.ClientExtractor{}}, - verifregactors.VersionCodes()[actors.Version8]: {verifregtask.ClientExtractor{}}, + // hyperspace bug + //verifregactors.VersionCodes()[actors.Version8]: {verifregtask.ClientExtractor{}}, // version 9 no longer track clients and has been migrated to the datacap actor }, )) diff --git a/lens/util/repo.go b/lens/util/repo.go index d55a40230..5a47a92fb 100644 --- a/lens/util/repo.go +++ b/lens/util/repo.go @@ -11,7 +11,6 @@ import ( "time" "github.com/filecoin-project/go-bitfield" - builtin2 "github.com/filecoin-project/go-state-types/builtin" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" cbg "github.com/whyrusleeping/cbor-gen" @@ -49,13 +48,20 @@ func ParseParams(params []byte, method abi.MethodNum, actCode cid.Cid) (_ string return "", m.Name, nil } - if method == builtin2.MustGenerateFRCMethodNum("Receive") { - b, err := json.Marshal(m.Params) - if err != nil { - return "", "", err + // NB: "parameters of EVM messages are byte arrays" - Raul + // you'll need to look at the first 4 bytes of the + // t4/f4 is a delegated address type: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0048.md + // https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0055.md + /* + if method == builtin2.MustGenerateFRCMethodNum("Receive") { + b, err := json.Marshal(m.Params) + if err != nil { + return "", "", err + } + return string(b), m.Name, nil } - return string(b), m.Name, nil - } + + */ defer func() { if r := recover(); r != nil { diff --git a/tasks/actorstate/task.go b/tasks/actorstate/task.go index 6169839c7..242b05fed 100644 --- a/tasks/actorstate/task.go +++ b/tasks/actorstate/task.go @@ -253,8 +253,9 @@ func NewCustomTypedActorExtractorMap(extractors map[cid.Cid][]ActorStateExtracto codes: cid.NewSet(), extractors: extractors, } - for c := range extractors { + for c, e := range extractors { t.codes.Add(c) + log.Infow("CustomeTypedActorExtractor", "code", c.String(), "extractor", e) } return t } diff --git a/tasks/messages/parsedmessage/task.go b/tasks/messages/parsedmessage/task.go index 8bb49d879..b6f838d3e 100644 --- a/tasks/messages/parsedmessage/task.go +++ b/tasks/messages/parsedmessage/task.go @@ -136,6 +136,7 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut Cid: m.Cid(), Error: errStr, }) + continue } pm := &messagemodel.ParsedMessage{ Height: int64(msgrec.Block.Height), From f6b510c43afaedcb7baa47deb33258b1186b816a Mon Sep 17 00:00:00 2001 From: Steph Samson Date: Fri, 27 Jan 2023 20:35:34 +0800 Subject: [PATCH 05/20] chore: pull in v1.20.0-hyperpsace-0119 --- extern/filecoin-ffi | 2 +- go.mod | 2 +- go.sum | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index d2e527cf6..20f104e88 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit d2e527cf6881fd4f8a9547f15ffa1674a8004ea3 +Subproject commit 20f104e88065aae59fd212d64be5bed108604e78 diff --git a/go.mod b/go.mod index c634c2cd2..c42a423d6 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.1.9 github.com/filecoin-project/go-paramfetch v0.0.4 github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 - github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19 + github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 diff --git a/go.sum b/go.sum index b984f2b49..820ae088d 100644 --- a/go.sum +++ b/go.sum @@ -346,8 +346,6 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.10.0-alpha-10 h1:QUpSayVFUADlrtzCh7SDNlbuaNSlYPBR46Nt7WpFl9I= -github.com/filecoin-project/go-state-types v0.10.0-alpha-10/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 h1:gT+IBH1eTLqiC+2c1TZjF5QliI20bcn/+3B/fuzio0s= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= @@ -360,10 +358,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19 h1:8thGBIFXoLHT8WmZ2tk42XAc7H66WsfqczVrS2VODyE= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv19/go.mod h1:61ZGQoiDUAWjgI2ahc7AKC92yJsTm5steyWbkn0jkZE= -github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887 h1:uJ9wDdkPZ026muNv3IZGOHU5pPVfdmbW0DMozwCDSDs= -github.com/filecoin-project/lotus v1.20.0-pre-rc.0.20230116063450-c4ec4066a887/go.mod h1:Lzz0lq20H+5z2RKaKvrYQK04hpr5Sd7DlFkRwvrSmWQ= +github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119 h1:i9DBFp+Wd+q7lvKsiEb0X6LyIZiSXJem5oZIViLhHfg= +github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119/go.mod h1:61ZGQoiDUAWjgI2ahc7AKC92yJsTm5steyWbkn0jkZE= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= From eccb1e94fc34bf8f3f053acb6d2498a44613ca5b Mon Sep 17 00:00:00 2001 From: frrist Date: Fri, 27 Jan 2023 08:33:42 -0800 Subject: [PATCH 06/20] deps: update ffi --- extern/filecoin-ffi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 20f104e88..d2e527cf6 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 20f104e88065aae59fd212d64be5bed108604e78 +Subproject commit d2e527cf6881fd4f8a9547f15ffa1674a8004ea3 From 4ba6a3a19d53b9f990e8744ab89f5b840dc70806 Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 9 Feb 2023 10:19:23 -0800 Subject: [PATCH 07/20] update to latest version of lotus ntwk/hyperspace --- go.mod | 6 +++--- go.sum | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index c42a423d6..b6ad1665e 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/filecoin-project/go-amt-ipld/v3 v3.1.1 // indirect github.com/filecoin-project/go-bitfield v0.2.4 github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec - github.com/filecoin-project/go-jsonrpc v0.1.9 + github.com/filecoin-project/go-jsonrpc v0.2.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 - github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119 + github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297 + github.com/filecoin-project/lotus v1.20.0-hyperspace-0201 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 diff --git a/go.sum b/go.sum index 820ae088d..2c4e86044 100644 --- a/go.sum +++ b/go.sum @@ -332,6 +332,8 @@ github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec/go.mod h1:LNNMpJFvDONV8ZMjKAgwjpYMQiINukJHshJJBgeBt3M= github.com/filecoin-project/go-jsonrpc v0.1.9 h1:HRWLxo7HAWzI3xZGeFG4LZJoYpms+Q+8kwmMTLnyS3A= github.com/filecoin-project/go-jsonrpc v0.1.9/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= +github.com/filecoin-project/go-jsonrpc v0.2.1 h1:xfxkfIAO300sPiV59DnxnCb4sdTtWYlRz/TsP+ByT2E= +github.com/filecoin-project/go-jsonrpc v0.2.1/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/filecoin-project/go-legs v0.4.4 h1:mpMmAOOnamaz0CV9rgeKhEWA8j9kMC+f+UGCGrxKaZo= github.com/filecoin-project/go-legs v0.4.4/go.mod h1:JQ3hA6xpJdbR8euZ2rO0jkxaMxeidXf0LDnVuqPAe9s= github.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak= @@ -348,6 +350,8 @@ github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/ github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 h1:gT+IBH1eTLqiC+2c1TZjF5QliI20bcn/+3B/fuzio0s= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= +github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297 h1:EsCsQ/hpz0GhTH7cJ+4PI+3FTFCG+cfKu/mICpfUd2A= +github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -360,6 +364,8 @@ github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9 github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119 h1:i9DBFp+Wd+q7lvKsiEb0X6LyIZiSXJem5oZIViLhHfg= github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119/go.mod h1:61ZGQoiDUAWjgI2ahc7AKC92yJsTm5steyWbkn0jkZE= +github.com/filecoin-project/lotus v1.20.0-hyperspace-0201 h1:CN2RMROwpplWrYR8+9H3GfdV1VBuAb48RCTcEJWRnO0= +github.com/filecoin-project/lotus v1.20.0-hyperspace-0201/go.mod h1:doaEybZjzSYH02TxQfqvqvTzF6LnEYHM8ttY2nGek54= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= From 397fd1890e7c342de8e66e467b37d5d40ef72fdb Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 13 Feb 2023 12:30:28 -0800 Subject: [PATCH 08/20] go mod tidy --- go.sum | 7 ------- 1 file changed, 7 deletions(-) diff --git a/go.sum b/go.sum index 2c4e86044..1a8293ff4 100644 --- a/go.sum +++ b/go.sum @@ -330,8 +330,6 @@ github.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGy github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec h1:v+qI303NEoIxZMAsK6Ry4twUm4fFdDilY6x7RJRFdJo= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec/go.mod h1:LNNMpJFvDONV8ZMjKAgwjpYMQiINukJHshJJBgeBt3M= -github.com/filecoin-project/go-jsonrpc v0.1.9 h1:HRWLxo7HAWzI3xZGeFG4LZJoYpms+Q+8kwmMTLnyS3A= -github.com/filecoin-project/go-jsonrpc v0.1.9/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-jsonrpc v0.2.1 h1:xfxkfIAO300sPiV59DnxnCb4sdTtWYlRz/TsP+ByT2E= github.com/filecoin-project/go-jsonrpc v0.2.1/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= github.com/filecoin-project/go-legs v0.4.4 h1:mpMmAOOnamaz0CV9rgeKhEWA8j9kMC+f+UGCGrxKaZo= @@ -348,8 +346,6 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456 h1:gT+IBH1eTLqiC+2c1TZjF5QliI20bcn/+3B/fuzio0s= -github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230118014411-cf80be872456/go.mod h1:FPgQE05BFwZxKw/vCuIaIrzfJKo4RPQQMMPGd43dAFI= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297 h1:EsCsQ/hpz0GhTH7cJ+4PI+3FTFCG+cfKu/mICpfUd2A= github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= @@ -362,8 +358,6 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= -github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119 h1:i9DBFp+Wd+q7lvKsiEb0X6LyIZiSXJem5oZIViLhHfg= -github.com/filecoin-project/lotus v1.20.0-hyperpsace-0119/go.mod h1:61ZGQoiDUAWjgI2ahc7AKC92yJsTm5steyWbkn0jkZE= github.com/filecoin-project/lotus v1.20.0-hyperspace-0201 h1:CN2RMROwpplWrYR8+9H3GfdV1VBuAb48RCTcEJWRnO0= github.com/filecoin-project/lotus v1.20.0-hyperspace-0201/go.mod h1:doaEybZjzSYH02TxQfqvqvTzF6LnEYHM8ttY2nGek54= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= @@ -814,7 +808,6 @@ github.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBW github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= github.com/ipfs/go-log/v2 v2.1.2/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= From d2a0948a7c41c2ff205dc670ab8a240dc7010a59 Mon Sep 17 00:00:00 2001 From: frrist Date: Mon, 13 Feb 2023 12:39:42 -0800 Subject: [PATCH 09/20] fix tests --- chain/actors/builtin/miner/mocks/state.go | 26 +++++++++-------- chain/indexer/integrated/processor/state.go | 3 +- .../processor/state_internal_test.go | 28 +++++++++++-------- .../integrated/processor/state_test.go | 28 +++++++++++-------- 4 files changed, 47 insertions(+), 38 deletions(-) diff --git a/chain/actors/builtin/miner/mocks/state.go b/chain/actors/builtin/miner/mocks/state.go index 0a83c0589..66370e042 100644 --- a/chain/actors/builtin/miner/mocks/state.go +++ b/chain/actors/builtin/miner/mocks/state.go @@ -24,6 +24,8 @@ import ( typegen "github.com/whyrusleeping/cbor-gen" + v11miner "github.com/filecoin-project/go-state-types/builtin/v11/miner" + v8miner "github.com/filecoin-project/go-state-types/builtin/v8/miner" v9miner "github.com/filecoin-project/go-state-types/builtin/v9/miner" @@ -163,14 +165,14 @@ func (_m *State) DeadlinesChanged(_a0 miner.State) (bool, error) { } // DecodeSectorOnChainInfo provides a mock function with given fields: _a0 -func (_m *State) DecodeSectorOnChainInfo(_a0 *typegen.Deferred) (v9miner.SectorOnChainInfo, error) { +func (_m *State) DecodeSectorOnChainInfo(_a0 *typegen.Deferred) (v11miner.SectorOnChainInfo, error) { ret := _m.Called(_a0) - var r0 v9miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(*typegen.Deferred) v9miner.SectorOnChainInfo); ok { + var r0 v11miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(*typegen.Deferred) v11miner.SectorOnChainInfo); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(v9miner.SectorOnChainInfo) + r0 = ret.Get(0).(v11miner.SectorOnChainInfo) } var r1 error @@ -393,15 +395,15 @@ func (_m *State) GetProvingPeriodStart() (abi.ChainEpoch, error) { } // GetSector provides a mock function with given fields: _a0 -func (_m *State) GetSector(_a0 abi.SectorNumber) (*v9miner.SectorOnChainInfo, error) { +func (_m *State) GetSector(_a0 abi.SectorNumber) (*v11miner.SectorOnChainInfo, error) { ret := _m.Called(_a0) - var r0 *v9miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(abi.SectorNumber) *v9miner.SectorOnChainInfo); ok { + var r0 *v11miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(abi.SectorNumber) *v11miner.SectorOnChainInfo); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v9miner.SectorOnChainInfo) + r0 = ret.Get(0).(*v11miner.SectorOnChainInfo) } } @@ -520,15 +522,15 @@ func (_m *State) LoadDeadline(idx uint64) (miner.Deadline, error) { } // LoadSectors provides a mock function with given fields: sectorNos -func (_m *State) LoadSectors(sectorNos *bitfield.BitField) ([]*v9miner.SectorOnChainInfo, error) { +func (_m *State) LoadSectors(sectorNos *bitfield.BitField) ([]*v11miner.SectorOnChainInfo, error) { ret := _m.Called(sectorNos) - var r0 []*v9miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(*bitfield.BitField) []*v9miner.SectorOnChainInfo); ok { + var r0 []*v11miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(*bitfield.BitField) []*v11miner.SectorOnChainInfo); ok { r0 = rf(sectorNos) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v9miner.SectorOnChainInfo) + r0 = ret.Get(0).([]*v11miner.SectorOnChainInfo) } } diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index b4fd6fd01..e7be9ba95 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -560,8 +560,7 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces verifregactors.VersionCodes()[actors.Version5]: {verifregtask.ClientExtractor{}}, verifregactors.VersionCodes()[actors.Version6]: {verifregtask.ClientExtractor{}}, verifregactors.VersionCodes()[actors.Version7]: {verifregtask.ClientExtractor{}}, - // hyperspace bug - //verifregactors.VersionCodes()[actors.Version8]: {verifregtask.ClientExtractor{}}, + verifregactors.VersionCodes()[actors.Version8]: {verifregtask.ClientExtractor{}}, // version 9 no longer track clients and has been migrated to the datacap actor }, )) diff --git a/chain/indexer/integrated/processor/state_internal_test.go b/chain/indexer/integrated/processor/state_internal_test.go index 5c5883a9c..a175c7f72 100644 --- a/chain/indexer/integrated/processor/state_internal_test.go +++ b/chain/indexer/integrated/processor/state_internal_test.go @@ -90,9 +90,11 @@ func TestNewProcessor(t *testing.T) { )), proc.actorProcessors[tasktype.MinerSectorInfoV1_6]) require.Equal(t, actorstate.NewTask(nil, actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - miner.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, - miner.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, - miner.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version10]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version11]: {minertask.V7SectorInfoExtractor{}}, }, )), proc.actorProcessors[tasktype.MinerSectorInfoV7]) require.Equal(t, actorstate.NewTask(nil, actorstate.NewTypedActorExtractorMap(power.AllCodes(), powertask.ClaimedPowerExtractor{})), proc.actorProcessors[tasktype.PowerActorClaim]) @@ -106,15 +108,17 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, actorstate.NewTask(nil, actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - miner.VersionCodes()[actors.Version0]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version2]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version3]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version4]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version5]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version6]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version7]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version8]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version0]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version2]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version3]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version4]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version5]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version6]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version7]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version8]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version10]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version11]: {minertask.PreCommitInfoExtractorV9{}}, }, )), proc.actorProcessors[tasktype.MinerPreCommitInfo]) diff --git a/chain/indexer/integrated/processor/state_test.go b/chain/indexer/integrated/processor/state_test.go index 6e990dd5c..3a212f303 100644 --- a/chain/indexer/integrated/processor/state_test.go +++ b/chain/indexer/integrated/processor/state_test.go @@ -70,15 +70,17 @@ func TestMakeProcessorsActors(t *testing.T) { taskName: tasktype.MinerPreCommitInfo, extractor: actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - miner.VersionCodes()[actors.Version0]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version2]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version3]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version4]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version5]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version6]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version7]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version8]: {minertask.PreCommitInfoExtractorV8{}}, - miner.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version0]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version2]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version3]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version4]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version5]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version6]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version7]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version8]: {minertask.PreCommitInfoExtractorV8{}}, + miner.VersionCodes()[actors.Version9]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version10]: {minertask.PreCommitInfoExtractorV9{}}, + miner.VersionCodes()[actors.Version11]: {minertask.PreCommitInfoExtractorV9{}}, }, ), }, @@ -111,9 +113,11 @@ func TestMakeProcessorsActors(t *testing.T) { taskName: tasktype.MinerSectorInfoV7, extractor: actorstate.NewCustomTypedActorExtractorMap( map[cid.Cid][]actorstate.ActorStateExtractor{ - miner.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, - miner.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, - miner.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version7]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version8]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version9]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version10]: {minertask.V7SectorInfoExtractor{}}, + miner.VersionCodes()[actors.Version11]: {minertask.V7SectorInfoExtractor{}}, }, ), }, From b8965b925e597f6bf19f16444b9455c4ab7c2a35 Mon Sep 17 00:00:00 2001 From: Steph Samson Date: Wed, 15 Feb 2023 01:27:17 -0800 Subject: [PATCH 10/20] chore: upgrade to mandatory release v1.20.0-hyperspace-nv20 --- go.mod | 8 ++++---- go.sum | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index b6ad1665e..d577194c2 100644 --- a/go.mod +++ b/go.mod @@ -13,8 +13,8 @@ require ( github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec github.com/filecoin-project/go-jsonrpc v0.2.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297 - github.com/filecoin-project/lotus v1.20.0-hyperspace-0201 + github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 + github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 @@ -218,7 +218,7 @@ require ( github.com/ipld/go-car/v2 v2.5.0 // indirect github.com/ipld/go-codec-dagpb v1.5.0 // indirect github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 // indirect - github.com/ipld/go-ipld-prime v0.18.0 // indirect + github.com/ipld/go-ipld-prime v0.20.0 // indirect github.com/ipld/go-ipld-selector-text-lite v0.0.1 // indirect github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect @@ -279,7 +279,7 @@ require ( github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multibase v0.1.1 // indirect - github.com/multiformats/go-multicodec v0.6.0 // indirect + github.com/multiformats/go-multicodec v0.8.0 // indirect github.com/multiformats/go-multistream v0.3.3 // indirect github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c // indirect github.com/nkovacs/streamquote v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1a8293ff4..7631d6042 100644 --- a/go.sum +++ b/go.sum @@ -346,8 +346,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297 h1:EsCsQ/hpz0GhTH7cJ+4PI+3FTFCG+cfKu/mICpfUd2A= -github.com/filecoin-project/go-state-types v0.10.0-alpha-9.0.20230127204632-9a067d394297/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= +github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 h1:gqKaMwXp8mrvf1Zj+l8mXUPTC2HYf+TG7rcSivO0nDI= +github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -358,8 +358,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= -github.com/filecoin-project/lotus v1.20.0-hyperspace-0201 h1:CN2RMROwpplWrYR8+9H3GfdV1VBuAb48RCTcEJWRnO0= -github.com/filecoin-project/lotus v1.20.0-hyperspace-0201/go.mod h1:doaEybZjzSYH02TxQfqvqvTzF6LnEYHM8ttY2nGek54= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 h1:nVEXARksqtebKmD2XVFxVmh3sta+AJp5hF3uk/Ohoug= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= @@ -393,8 +393,8 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -871,8 +871,8 @@ github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHt github.com/ipld/go-ipld-prime v0.14.0/go.mod h1:9ASQLwUFLptCov6lIYc70GRB4V7UTyLD0IJtrDJe6ZM= github.com/ipld/go-ipld-prime v0.16.0/go.mod h1:axSCuOCBPqrH+gvXr2w9uAOulJqBPhHPT2PjoiiU1qA= github.com/ipld/go-ipld-prime v0.17.0/go.mod h1:aYcKm5TIvGfY8P3QBKz/2gKcLxzJ1zDaD+o0bOowhgs= -github.com/ipld/go-ipld-prime v0.18.0 h1:xUk7NUBSWHEXdjiOu2sLXouFJOMs0yoYzeI5RAqhYQo= -github.com/ipld/go-ipld-prime v0.18.0/go.mod h1:735yXW548CKrLwVCYXzqx90p5deRJMVVxM9eJ4Qe+qE= +github.com/ipld/go-ipld-prime v0.20.0 h1:Ud3VwE9ClxpO2LkCYP7vWPc0Fo+dYdYzgxUJZ3uRG4g= +github.com/ipld/go-ipld-prime v0.20.0/go.mod h1:PzqZ/ZR981eKbgdr3y2DJYeD/8bgMawdGVlJDE8kK+M= github.com/ipld/go-ipld-prime-proto v0.0.0-20191113031812-e32bd156a1e5/go.mod h1:gcvzoEDBjwycpXt3LBE061wT9f46szXGHAmj9uoP6fU= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73 h1:TsyATB2ZRRQGTwafJdgEUQkmjOExRV0DNokcihZxbnQ= github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73/go.mod h1:2PJ0JgxyB08t0b2WKrcuqI3di0V+5n6RS/LTUJhkoxY= @@ -965,8 +965,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -1442,8 +1442,8 @@ github.com/multiformats/go-multicodec v0.3.1-0.20210902112759-1539a079fd61/go.mo github.com/multiformats/go-multicodec v0.3.1-0.20211210143421-a526f306ed2c/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.4.1/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multicodec v0.5.0/go.mod h1:DiY2HFaEp5EhEXb/iYzVAunmyX/aSFMxq2KMKfWEues= -github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE= -github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= +github.com/multiformats/go-multicodec v0.8.0 h1:evBmgkbSQux+Ds2IgfhkO38Dl2GDtRW8/Rp6YiSHX/Q= +github.com/multiformats/go-multicodec v0.8.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= @@ -1631,7 +1631,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -1778,8 +1778,8 @@ github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgq github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= -github.com/warpfork/go-testmark v0.10.0 h1:E86YlUMYfwIacEsQGlnTvjk1IgYkyTGjPhF0RnwTCmw= github.com/warpfork/go-testmark v0.10.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= +github.com/warpfork/go-testmark v0.11.0 h1:J6LnV8KpceDvo7spaNU4+DauH2n1x+6RaO2rJrmpQ9U= github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= From 2fc58101b60c5b54932428126d67f31c7ea7ea97 Mon Sep 17 00:00:00 2001 From: Steph Samson Date: Wed, 15 Feb 2023 07:49:11 -0800 Subject: [PATCH 11/20] chore: merge nv20 patches --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d577194c2..216063a25 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.2.1 github.com/filecoin-project/go-paramfetch v0.0.4 github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 - github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 + github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 diff --git a/go.sum b/go.sum index 7631d6042..6c62c41b0 100644 --- a/go.sum +++ b/go.sum @@ -358,8 +358,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 h1:nVEXARksqtebKmD2XVFxVmh3sta+AJp5hF3uk/Ohoug= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup h1:ryYFVTHIxEM/JMzdEwdved4UbYsIn+QSuJ5CfA9X7Hc= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= From 0360b2562f533490c3187f4e7203c6a50eb39a9f Mon Sep 17 00:00:00 2001 From: frrist Date: Wed, 15 Feb 2023 11:34:36 -0800 Subject: [PATCH 12/20] new hyperspace commit update lotus --- extern/filecoin-ffi | 2 +- go.mod | 2 +- go.sum | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index d2e527cf6..fead3c628 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit d2e527cf6881fd4f8a9547f15ffa1674a8004ea3 +Subproject commit fead3c628794a332ebc2ef0a153885bfab87a901 diff --git a/go.mod b/go.mod index 216063a25..d577194c2 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.2.1 github.com/filecoin-project/go-paramfetch v0.0.4 github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 - github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup + github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 diff --git a/go.sum b/go.sum index 6c62c41b0..f1acabccb 100644 --- a/go.sum +++ b/go.sum @@ -358,6 +358,8 @@ github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5 github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 h1:nVEXARksqtebKmD2XVFxVmh3sta+AJp5hF3uk/Ohoug= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup h1:ryYFVTHIxEM/JMzdEwdved4UbYsIn+QSuJ5CfA9X7Hc= github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= From e0a762f7dc685695ddc4644496a95de10c155c0c Mon Sep 17 00:00:00 2001 From: frrist Date: Wed, 15 Feb 2023 11:37:39 -0800 Subject: [PATCH 13/20] go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index f1acabccb..7631d6042 100644 --- a/go.sum +++ b/go.sum @@ -360,8 +360,6 @@ github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9 github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 h1:nVEXARksqtebKmD2XVFxVmh3sta+AJp5hF3uk/Ohoug= github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup h1:ryYFVTHIxEM/JMzdEwdved4UbYsIn+QSuJ5CfA9X7Hc= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20-event-migration-speedup/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= From bd07222d3d644c9d55f234464e04f66cf97e37ea Mon Sep 17 00:00:00 2001 From: frrist Date: Wed, 15 Feb 2023 12:29:47 -0800 Subject: [PATCH 14/20] fix regression in actor state diffing --- chain/datasource/datasource.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chain/datasource/datasource.go b/chain/datasource/datasource.go index bee45ddd6..6de776b7d 100644 --- a/chain/datasource/datasource.go +++ b/chain/datasource/datasource.go @@ -20,6 +20,7 @@ import ( "github.com/filecoin-project/lotus/chain/vm" states0 "github.com/filecoin-project/specs-actors/actors/states" states2 "github.com/filecoin-project/specs-actors/v2/actors/states" + states3 "github.com/filecoin-project/specs-actors/v3/actors/states" states4 "github.com/filecoin-project/specs-actors/v4/actors/states" states5 "github.com/filecoin-project/specs-actors/v5/actors/states" lru "github.com/hashicorp/golang-lru" @@ -445,8 +446,8 @@ func getStateTreeHamtRootCIDAndVersion(ctx context.Context, store adt.Store, c c } return tree.Map, root.Version, nil case types.StateTreeVersion2: - var tree *states2.Tree - tree, err := states2.LoadTree(store, root.Actors) + var tree *states3.Tree + tree, err := states3.LoadTree(store, root.Actors) if err != nil { return nil, 0, err } From f14a24e405dab8eb53e08362242382c25a21deed Mon Sep 17 00:00:00 2001 From: Frrist Date: Wed, 15 Feb 2023 13:12:17 -0800 Subject: [PATCH 15/20] Frrist/receipt events schema (#1132) * feat: implement actor event task and schema - track the value of EventRoots contained in message receipts. --- Makefile | 2 +- chain/indexer/integrated/processor/state.go | 3 + .../processor/state_internal_test.go | 4 +- .../integrated/processor/state_test.go | 2 +- chain/indexer/tasktype/table_tasks.go | 5 + chain/indexer/tasktype/tasks.go | 1 + chain/indexer/tasktype/tasks_test.go | 4 +- model/messages/actorevent.go | 47 ++++++ schemas/v1/13_actor_events.go | 22 +++ storage/sql.go | 1 + tasks/messages/actorevent/task.go | 142 ++++++++++++++++++ 11 files changed, 228 insertions(+), 5 deletions(-) create mode 100644 model/messages/actorevent.go create mode 100644 schemas/v1/13_actor_events.go create mode 100644 tasks/messages/actorevent/task.go diff --git a/Makefile b/Makefile index 8b1454af0..9a3fb20fb 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ testfull: build # testshort runs tests that don't require external dependencies such as postgres or redis .PHONY: testshort testshort: - go test -short ./... -v + go test -short ./... .PHONY: lily diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index e7be9ba95..494a72a0c 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -24,6 +24,7 @@ import ( rewardactors "github.com/filecoin-project/lily/chain/actors/builtin/reward" verifregactors "github.com/filecoin-project/lily/chain/actors/builtin/verifreg" "github.com/filecoin-project/lily/tasks/messageexecutions/vm" + "github.com/filecoin-project/lily/tasks/messages/actorevent" "github.com/filecoin-project/lily/tasks" // actor tasks @@ -601,6 +602,8 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces out.TipsetsProcessors[t] = msapprovaltask.NewTask(api) case tasktype.VMMessage: out.TipsetsProcessors[t] = vm.NewTask(api) + case tasktype.ActorEvent: + out.TipsetsProcessors[t] = actorevent.NewTask(api) // // Blocks diff --git a/chain/indexer/integrated/processor/state_internal_test.go b/chain/indexer/integrated/processor/state_internal_test.go index a175c7f72..e50bea0e0 100644 --- a/chain/indexer/integrated/processor/state_internal_test.go +++ b/chain/indexer/integrated/processor/state_internal_test.go @@ -18,6 +18,7 @@ import ( "github.com/filecoin-project/lily/chain/indexer/tasktype" datacaptask "github.com/filecoin-project/lily/tasks/actorstate/datacap" "github.com/filecoin-project/lily/tasks/messageexecutions/vm" + "github.com/filecoin-project/lily/tasks/messages/actorevent" "github.com/filecoin-project/lily/tasks/messages/blockmessage" "github.com/filecoin-project/lily/tasks/messages/gaseconomy" "github.com/filecoin-project/lily/tasks/messages/message" @@ -51,7 +52,7 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, t.Name(), proc.name) require.Len(t, proc.actorProcessors, 23) require.Len(t, proc.tipsetProcessors, 8) - require.Len(t, proc.tipsetsProcessors, 7) + require.Len(t, proc.tipsetsProcessors, 8) require.Len(t, proc.builtinProcessors, 1) require.Equal(t, gasoutput.NewTask(nil), proc.tipsetsProcessors[tasktype.GasOutputs]) @@ -61,6 +62,7 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, internalparsedmessage.NewTask(nil), proc.tipsetsProcessors[tasktype.InternalParsedMessage]) require.Equal(t, msapprovals.NewTask(nil), proc.tipsetsProcessors[tasktype.MultisigApproval]) require.Equal(t, vm.NewTask(nil), proc.tipsetsProcessors[tasktype.VMMessage]) + require.Equal(t, actorevent.NewTask(nil), proc.tipsetsProcessors[tasktype.ActorEvent]) require.Equal(t, message.NewTask(nil), proc.tipsetProcessors[tasktype.Message]) require.Equal(t, blockmessage.NewTask(nil), proc.tipsetProcessors[tasktype.BlockMessage]) diff --git a/chain/indexer/integrated/processor/state_test.go b/chain/indexer/integrated/processor/state_test.go index 3a212f303..5557c9ed1 100644 --- a/chain/indexer/integrated/processor/state_test.go +++ b/chain/indexer/integrated/processor/state_test.go @@ -397,6 +397,6 @@ func TestMakeProcessorsAllTasks(t *testing.T) { require.NoError(t, err) require.Len(t, proc.ActorProcessors, 23) require.Len(t, proc.TipsetProcessors, 8) - require.Len(t, proc.TipsetsProcessors, 7) + require.Len(t, proc.TipsetsProcessors, 8) require.Len(t, proc.ReportProcessors, 1) } diff --git a/chain/indexer/tasktype/table_tasks.go b/chain/indexer/tasktype/table_tasks.go index 309dfe341..78dc1bdb9 100644 --- a/chain/indexer/tasktype/table_tasks.go +++ b/chain/indexer/tasktype/table_tasks.go @@ -27,6 +27,7 @@ const ( InternalMessage = "internal_messages" InternalParsedMessage = "internal_parsed_messages" VMMessage = "vm_messages" + ActorEvent = "actor_events" MultisigTransaction = "multisig_transaction" ChainPower = "chain_power" PowerActorClaim = "power_actor_claim" @@ -68,6 +69,7 @@ var AllTableTasks = []string{ InternalMessage, InternalParsedMessage, VMMessage, + ActorEvent, MultisigTransaction, ChainPower, PowerActorClaim, @@ -109,6 +111,7 @@ var TableLookup = map[string]struct{}{ InternalMessage: {}, InternalParsedMessage: {}, VMMessage: {}, + ActorEvent: {}, MultisigTransaction: {}, ChainPower: {}, PowerActorClaim: {}, @@ -150,6 +153,7 @@ var TableComment = map[string]string{ InternalMessage: ``, InternalParsedMessage: ``, VMMessage: ``, + ActorEvent: ``, MultisigTransaction: ``, ChainPower: ``, PowerActorClaim: ``, @@ -227,6 +231,7 @@ var TableFieldComments = map[string]map[string]string{ "To": "To receiver of message.", "Value": "Value attoFIL contained in message.", }, + ActorEvent: {}, MultisigTransaction: { "To": "Transaction State", }, diff --git a/chain/indexer/tasktype/tasks.go b/chain/indexer/tasktype/tasks.go index 9228d6b24..eb5b1fd56 100644 --- a/chain/indexer/tasktype/tasks.go +++ b/chain/indexer/tasktype/tasks.go @@ -71,6 +71,7 @@ var TaskLookup = map[string][]string{ GasOutputs, MessageGasEconomy, BlockMessage, + ActorEvent, }, ChainEconomicsTask: { ChainEconomics, diff --git a/chain/indexer/tasktype/tasks_test.go b/chain/indexer/tasktype/tasks_test.go index ea868b033..969d7ff95 100644 --- a/chain/indexer/tasktype/tasks_test.go +++ b/chain/indexer/tasktype/tasks_test.go @@ -55,7 +55,7 @@ func TestMakeTaskNamesAlias(t *testing.T) { }, { taskAlias: tasktype.MessagesTask, - tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage}, + tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage, tasktype.ActorEvent}, }, { taskAlias: tasktype.ChainEconomicsTask, @@ -101,7 +101,7 @@ func TestMakeAllTaskAliasNames(t *testing.T) { } func TestMakeAllTaskNames(t *testing.T) { - const TotalTableTasks = 38 + const TotalTableTasks = 39 actual, err := tasktype.MakeTaskNames(tasktype.AllTableTasks) require.NoError(t, err) // if this test fails it means a new task name was added, update the above test diff --git a/model/messages/actorevent.go b/model/messages/actorevent.go new file mode 100644 index 000000000..41e2261d1 --- /dev/null +++ b/model/messages/actorevent.go @@ -0,0 +1,47 @@ +package messages + +import ( + "context" + + "go.opencensus.io/tag" + + "github.com/filecoin-project/lily/metrics" + "github.com/filecoin-project/lily/model" +) + +type ActorEvent struct { + tableName struct{} `pg:"actor_events"` + + Height int64 `pg:",pk,notnull,use_zero"` + StateRoot string `pg:",pk,notnull"` + MessageCid string `pg:",pk,notnull"` + EventIndex int64 `pg:",pk,notnull,use_zero"` + + Emitter string `pg:",notnull"` + Flags []byte `pg:",notnull"` + Key string `pg:",notnull"` + Value []byte `pg:",notnull"` +} + +func (a *ActorEvent) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "actor_events")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, 1) + return s.PersistModel(ctx, a) +} + +type ActorEventList []*ActorEvent + +func (al ActorEventList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + if len(al) == 0 { + return nil + } + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "actor_events")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, len(al)) + return s.PersistModel(ctx, al) +} diff --git a/schemas/v1/13_actor_events.go b/schemas/v1/13_actor_events.go new file mode 100644 index 000000000..a734ad79e --- /dev/null +++ b/schemas/v1/13_actor_events.go @@ -0,0 +1,22 @@ +package v1 + +func init() { + patches.Register( + 13, + ` + CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.actor_events ( + height bigint NOT NULL, + state_root text NOT NULL, + event_index bigint NOT NULL, + message_cid text NOT NULL, + + emitter text NOT NULL, + flags bytea NOT NULL, + key text NOT NULL, + value bytea NOT NULL, + + PRIMARY KEY ("height", "state_root", "event_index", "message_cid") + ); +`, + ) +} diff --git a/storage/sql.go b/storage/sql.go index 163acee67..00f821ca5 100644 --- a/storage/sql.go +++ b/storage/sql.go @@ -65,6 +65,7 @@ var Models = []interface{}{ (*messages.InternalMessage)(nil), (*messages.InternalParsedMessage)(nil), (*messages.VMMessage)(nil), + (*messages.ActorEvent)(nil), (*multisig.MultisigTransaction)(nil), diff --git a/tasks/messages/actorevent/task.go b/tasks/messages/actorevent/task.go new file mode 100644 index 000000000..21062bbb4 --- /dev/null +++ b/tasks/messages/actorevent/task.go @@ -0,0 +1,142 @@ +package actorevent + +import ( + "bytes" + "context" + "fmt" + "math" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-amt-ipld/v4" + "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lily/model" + messagemodel "github.com/filecoin-project/lily/model/messages" + visormodel "github.com/filecoin-project/lily/model/visor" + "github.com/filecoin-project/lily/tasks" + "github.com/filecoin-project/lily/tasks/messages" +) + +type Task struct { + node tasks.DataSource +} + +func NewTask(node tasks.DataSource) *Task { + return &Task{ + node: node, + } +} + +func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, executed *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) { + ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets") + if span.IsRecording() { + span.SetAttributes( + attribute.String("current", current.String()), + attribute.Int64("current_height", int64(current.Height())), + attribute.String("executed", executed.String()), + attribute.Int64("executed_height", int64(executed.Height())), + attribute.String("processor", "actor_events"), + ) + } + defer span.End() + + report := &visormodel.ProcessingReport{ + Height: int64(current.Height()), + StateRoot: current.ParentState().String(), + } + + blkMsgRect, err := t.node.TipSetMessageReceipts(ctx, current, executed) + if err != nil { + report.ErrorsDetected = fmt.Errorf("getting tipset message receipet: %w", err) + return nil, report, nil + } + + var ( + out = make(messagemodel.ActorEventList, 0, len(blkMsgRect)) + errorsDetected = make([]*messages.MessageError, 0, len(blkMsgRect)) + msgsSeen = make(map[cid.Cid]bool, len(blkMsgRect)) + ) + + for _, m := range blkMsgRect { + select { + case <-ctx.Done(): + return nil, nil, fmt.Errorf("context done: %w", ctx.Err()) + default: + } + + itr, err := m.Iterator() + if err != nil { + return nil, nil, err + } + + for itr.HasNext() { + msg, _, rec := itr.Next() + if msgsSeen[msg.Cid()] { + continue + } + msgsSeen[msg.Cid()] = true + + if rec.EventsRoot == nil { + continue + } + + evtArr, err := amt.LoadAMT(ctx, t.node.Store(), *rec.EventsRoot, amt.UseTreeBitWidth(types.EventAMTBitwidth)) + if err != nil { + report.ErrorsDetected = fmt.Errorf("loading actor events amt (%s): %w", *rec.EventsRoot, err) + return nil, report, nil + } + var evt types.Event + err = evtArr.ForEach(ctx, func(evtIdx uint64, deferred *cbg.Deferred) error { + if evtIdx > math.MaxInt { + return xerrors.Errorf("too many events") + } + if err := evt.UnmarshalCBOR(bytes.NewReader(deferred.Raw)); err != nil { + return err + } + + emitter, err := address.NewIDAddress(uint64(evt.Emitter)) + if err != nil { + errorsDetected = append(errorsDetected, &messages.MessageError{ + Cid: msg.Cid(), + Error: fmt.Sprintf("failed to make ID address from event emitter (%s): %s", evt.Emitter, err), + }) + return err + } + for _, e := range evt.Entries { + out = append(out, &messagemodel.ActorEvent{ + Height: int64(current.Height()), + StateRoot: current.ParentState().String(), + MessageCid: msg.Cid().String(), + EventIndex: int64(evtIdx), + Emitter: emitter.String(), + Flags: []byte{e.Flags}, + Key: e.Key, + Value: e.Value, + }) + } + return nil + }) + + if err != nil { + errorsDetected = append(errorsDetected, &messages.MessageError{ + Cid: msg.Cid(), + Error: fmt.Sprintf("loading actor events amt (%s): %s", *rec.EventsRoot, err), + }) + continue + } + } + } + + if len(errorsDetected) != 0 { + report.ErrorsDetected = errorsDetected + } + + return model.PersistableList{ + out, + }, report, nil +} From 6bd01e97844aeae3289142deec6f6c9fd10bef6e Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 9 Feb 2023 12:55:12 -0800 Subject: [PATCH 16/20] feat: implement message param schema and task - create a table that records raw message parameters --- Makefile | 2 +- chain/indexer/integrated/processor/state.go | 5 +- .../processor/state_internal_test.go | 4 +- .../integrated/processor/state_test.go | 2 +- chain/indexer/tasktype/table_tasks.go | 7 +- chain/indexer/tasktype/tasks.go | 1 + chain/indexer/tasktype/tasks_test.go | 4 +- model/messages/messageparams.go | 39 +++++++ schemas/v1/14_message_params.go | 20 ++++ storage/sql.go | 1 + tasks/messages/messageparam/task.go | 106 ++++++++++++++++++ 11 files changed, 184 insertions(+), 7 deletions(-) create mode 100644 model/messages/messageparams.go create mode 100644 schemas/v1/14_message_params.go create mode 100644 tasks/messages/messageparam/task.go diff --git a/Makefile b/Makefile index 9a3fb20fb..aa3c358a5 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ testfull: build # testshort runs tests that don't require external dependencies such as postgres or redis .PHONY: testshort testshort: - go test -short ./... + go test -short ./... .PHONY: lily diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index 494a72a0c..de84099f7 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -23,10 +23,11 @@ import ( poweractors "github.com/filecoin-project/lily/chain/actors/builtin/power" rewardactors "github.com/filecoin-project/lily/chain/actors/builtin/reward" verifregactors "github.com/filecoin-project/lily/chain/actors/builtin/verifreg" + "github.com/filecoin-project/lily/tasks" "github.com/filecoin-project/lily/tasks/messageexecutions/vm" "github.com/filecoin-project/lily/tasks/messages/actorevent" + "github.com/filecoin-project/lily/tasks/messages/messageparam" - "github.com/filecoin-project/lily/tasks" // actor tasks "github.com/filecoin-project/lily/tasks/actorstate" datacaptask "github.com/filecoin-project/lily/tasks/actorstate/datacap" @@ -587,6 +588,8 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces out.TipsetProcessors[t] = bmtask.NewTask(api) case tasktype.MessageGasEconomy: out.TipsetProcessors[t] = gasecontask.NewTask(api) + case tasktype.MessageParam: + out.TipsetProcessors[t] = messageparam.NewTask(api) case tasktype.GasOutputs: out.TipsetsProcessors[t] = gasouttask.NewTask(api) diff --git a/chain/indexer/integrated/processor/state_internal_test.go b/chain/indexer/integrated/processor/state_internal_test.go index e50bea0e0..427e8f0a1 100644 --- a/chain/indexer/integrated/processor/state_internal_test.go +++ b/chain/indexer/integrated/processor/state_internal_test.go @@ -22,6 +22,7 @@ import ( "github.com/filecoin-project/lily/tasks/messages/blockmessage" "github.com/filecoin-project/lily/tasks/messages/gaseconomy" "github.com/filecoin-project/lily/tasks/messages/message" + "github.com/filecoin-project/lily/tasks/messages/messageparam" "github.com/filecoin-project/lily/tasks/actorstate" inittask "github.com/filecoin-project/lily/tasks/actorstate/init_" @@ -51,7 +52,7 @@ func TestNewProcessor(t *testing.T) { require.NoError(t, err) require.Equal(t, t.Name(), proc.name) require.Len(t, proc.actorProcessors, 23) - require.Len(t, proc.tipsetProcessors, 8) + require.Len(t, proc.tipsetProcessors, 9) require.Len(t, proc.tipsetsProcessors, 8) require.Len(t, proc.builtinProcessors, 1) @@ -72,6 +73,7 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, chaineconomics.NewTask(nil), proc.tipsetProcessors[tasktype.ChainEconomics]) require.Equal(t, consensus.NewTask(nil), proc.tipsetProcessors[tasktype.ChainConsensus]) require.Equal(t, gaseconomy.NewTask(nil), proc.tipsetProcessors[tasktype.MessageGasEconomy]) + require.Equal(t, messageparam.NewTask(nil), proc.tipsetProcessors[tasktype.MessageParam]) require.Equal(t, actorstate.NewTask(nil, actorstate.NewTypedActorExtractorMap(miner.AllCodes(), minertask.DeadlineInfoExtractor{})), proc.actorProcessors[tasktype.MinerCurrentDeadlineInfo]) require.Equal(t, actorstate.NewTask(nil, actorstate.NewTypedActorExtractorMap(miner.AllCodes(), minertask.FeeDebtExtractor{})), proc.actorProcessors[tasktype.MinerFeeDebt]) diff --git a/chain/indexer/integrated/processor/state_test.go b/chain/indexer/integrated/processor/state_test.go index 5557c9ed1..e243fef7a 100644 --- a/chain/indexer/integrated/processor/state_test.go +++ b/chain/indexer/integrated/processor/state_test.go @@ -396,7 +396,7 @@ func TestMakeProcessorsAllTasks(t *testing.T) { proc, err := processor.MakeProcessors(nil, append(tasktype.AllTableTasks, processor.BuiltinTaskName)) require.NoError(t, err) require.Len(t, proc.ActorProcessors, 23) - require.Len(t, proc.TipsetProcessors, 8) + require.Len(t, proc.TipsetProcessors, 9) require.Len(t, proc.TipsetsProcessors, 8) require.Len(t, proc.ReportProcessors, 1) } diff --git a/chain/indexer/tasktype/table_tasks.go b/chain/indexer/tasktype/table_tasks.go index 78dc1bdb9..be98a68c4 100644 --- a/chain/indexer/tasktype/table_tasks.go +++ b/chain/indexer/tasktype/table_tasks.go @@ -28,6 +28,7 @@ const ( InternalParsedMessage = "internal_parsed_messages" VMMessage = "vm_messages" ActorEvent = "actor_events" + MessageParam = "message_params" MultisigTransaction = "multisig_transaction" ChainPower = "chain_power" PowerActorClaim = "power_actor_claim" @@ -70,6 +71,7 @@ var AllTableTasks = []string{ InternalParsedMessage, VMMessage, ActorEvent, + MessageParam, MultisigTransaction, ChainPower, PowerActorClaim, @@ -112,6 +114,7 @@ var TableLookup = map[string]struct{}{ InternalParsedMessage: {}, VMMessage: {}, ActorEvent: {}, + MessageParam: {}, MultisigTransaction: {}, ChainPower: {}, PowerActorClaim: {}, @@ -154,6 +157,7 @@ var TableComment = map[string]string{ InternalParsedMessage: ``, VMMessage: ``, ActorEvent: ``, + MessageParam: ``, MultisigTransaction: ``, ChainPower: ``, PowerActorClaim: ``, @@ -231,7 +235,8 @@ var TableFieldComments = map[string]map[string]string{ "To": "To receiver of message.", "Value": "Value attoFIL contained in message.", }, - ActorEvent: {}, + ActorEvent: {}, + MessageParam: {}, MultisigTransaction: { "To": "Transaction State", }, diff --git a/chain/indexer/tasktype/tasks.go b/chain/indexer/tasktype/tasks.go index eb5b1fd56..5b2409d79 100644 --- a/chain/indexer/tasktype/tasks.go +++ b/chain/indexer/tasktype/tasks.go @@ -72,6 +72,7 @@ var TaskLookup = map[string][]string{ MessageGasEconomy, BlockMessage, ActorEvent, + MessageParam, }, ChainEconomicsTask: { ChainEconomics, diff --git a/chain/indexer/tasktype/tasks_test.go b/chain/indexer/tasktype/tasks_test.go index 969d7ff95..6d4cdedfd 100644 --- a/chain/indexer/tasktype/tasks_test.go +++ b/chain/indexer/tasktype/tasks_test.go @@ -55,7 +55,7 @@ func TestMakeTaskNamesAlias(t *testing.T) { }, { taskAlias: tasktype.MessagesTask, - tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage, tasktype.ActorEvent}, + tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage, tasktype.ActorEvent, tasktype.MessageParam}, }, { taskAlias: tasktype.ChainEconomicsTask, @@ -101,7 +101,7 @@ func TestMakeAllTaskAliasNames(t *testing.T) { } func TestMakeAllTaskNames(t *testing.T) { - const TotalTableTasks = 39 + const TotalTableTasks = 40 actual, err := tasktype.MakeTaskNames(tasktype.AllTableTasks) require.NoError(t, err) // if this test fails it means a new task name was added, update the above test diff --git a/model/messages/messageparams.go b/model/messages/messageparams.go new file mode 100644 index 000000000..1e9cddca8 --- /dev/null +++ b/model/messages/messageparams.go @@ -0,0 +1,39 @@ +package messages + +import ( + "context" + + "go.opencensus.io/tag" + + "github.com/filecoin-project/lily/metrics" + "github.com/filecoin-project/lily/model" +) + +type MessageParam struct { + tableName struct{} `pg:"message_params"` // nolint: structcheck + Cid string `pg:",pk,notnull"` + Params []byte +} + +func (m *MessageParam) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "message_params")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, 1) + return s.PersistModel(ctx, m) +} + +type MessageParamList []*MessageParam + +func (ml MessageParamList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + if len(ml) == 0 { + return nil + } + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "message_params")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, len(ml)) + return s.PersistModel(ctx, ml) +} diff --git a/schemas/v1/14_message_params.go b/schemas/v1/14_message_params.go new file mode 100644 index 000000000..57667f35f --- /dev/null +++ b/schemas/v1/14_message_params.go @@ -0,0 +1,20 @@ +package v1 + +// Schema version 13 adds message params tracking + +func init() { + patches.Register( + 14, + ` + CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.message_params ( + cid text NOT NULL, + params bytea, + + PRIMARY KEY (cid) + ); + COMMENT ON TABLE {{ .SchemaName | default "public"}}.message_params IS 'Raw parameters of on chain messages.'; + COMMENT ON column {{ .SchemaName | default "public"}}.message_params.cid IS 'The CID of a message.'; + COMMENT ON COLUMN {{ .SchemaName | default "public"}}.message_params.params IS 'The parameters of the message as bytes.'; +`, + ) +} diff --git a/storage/sql.go b/storage/sql.go index 00f821ca5..2485da2e3 100644 --- a/storage/sql.go +++ b/storage/sql.go @@ -66,6 +66,7 @@ var Models = []interface{}{ (*messages.InternalParsedMessage)(nil), (*messages.VMMessage)(nil), (*messages.ActorEvent)(nil), + (*messages.MessageParam)(nil), (*multisig.MultisigTransaction)(nil), diff --git a/tasks/messages/messageparam/task.go b/tasks/messages/messageparam/task.go new file mode 100644 index 000000000..b731ba59b --- /dev/null +++ b/tasks/messages/messageparam/task.go @@ -0,0 +1,106 @@ +package messageparam + +import ( + "context" + "fmt" + + "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + + "github.com/filecoin-project/lily/model" + messagemodel "github.com/filecoin-project/lily/model/messages" + visormodel "github.com/filecoin-project/lily/model/visor" + "github.com/filecoin-project/lily/tasks" + "github.com/filecoin-project/lily/tasks/messages" +) + +type Task struct { + node tasks.DataSource +} + +func NewTask(node tasks.DataSource) *Task { + return &Task{ + node: node, + } +} + +func (t *Task) ProcessTipSet(ctx context.Context, current *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) { + ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets") + if span.IsRecording() { + span.SetAttributes( + attribute.String("current", current.String()), + attribute.Int64("current_height", int64(current.Height())), + attribute.String("processor", "messages"), + ) + } + defer span.End() + + report := &visormodel.ProcessingReport{ + Height: int64(current.Height()), + StateRoot: current.ParentState().String(), + } + + blksMsgs, err := t.node.TipSetBlockMessages(ctx, current) + if err != nil { + report.ErrorsDetected = fmt.Errorf("getting messages for tipset: %w", err) + return nil, report, nil + } + + var ( + messageResults = make(messagemodel.MessageParamList, 0) + errorsDetected = make([]*messages.MessageError, 0) + blkMsgSeen = make(map[cid.Cid]bool) + ) + + // record all unique messages in current + for _, blkMsgs := range blksMsgs { + select { + case <-ctx.Done(): + return nil, nil, fmt.Errorf("context done: %w", ctx.Err()) + default: + } + for _, msg := range blkMsgs.BlsMessages { + if blkMsgSeen[msg.Cid()] { + continue + } + blkMsgSeen[msg.Cid()] = true + + // record all unique messages with params + if len(msg.Params) == 0 { + continue + } + messageResults = append(messageResults, &messagemodel.MessageParam{ + Cid: msg.Cid().String(), + Params: msg.Params, + }) + } + for _, msg := range blkMsgs.SecpMessages { + if blkMsgSeen[msg.Cid()] { + continue + } + blkMsgSeen[msg.Cid()] = true + + if len(msg.Message.Params) == 0 { + continue + } + + // record all unique messages + messageResults = append(messageResults, &messagemodel.MessageParam{ + Cid: msg.Cid().String(), + Params: msg.Message.Params, + }) + + } + + } + + if len(errorsDetected) != 0 { + report.ErrorsDetected = errorsDetected + } + + return model.PersistableList{ + messageResults, + }, report, nil +} From bf45275f40985bf8bfbcaffd87dd336ed4d61f1c Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 9 Feb 2023 13:04:12 -0800 Subject: [PATCH 17/20] feat: track raw receipt return value --- chain/indexer/integrated/processor/state.go | 3 + .../processor/state_internal_test.go | 4 +- .../integrated/processor/state_test.go | 2 +- chain/indexer/tasktype/table_tasks.go | 9 +- chain/indexer/tasktype/tasks.go | 1 + chain/indexer/tasktype/tasks_test.go | 4 +- model/messages/receiptparams.go | 36 +++++++ schemas/v1/15_receipt_returns.go | 20 ++++ storage/sql.go | 1 + tasks/messages/receiptreturn/task.go | 97 +++++++++++++++++++ 10 files changed, 171 insertions(+), 6 deletions(-) create mode 100644 model/messages/receiptparams.go create mode 100644 schemas/v1/15_receipt_returns.go create mode 100644 tasks/messages/receiptreturn/task.go diff --git a/chain/indexer/integrated/processor/state.go b/chain/indexer/integrated/processor/state.go index de84099f7..068f91eb7 100644 --- a/chain/indexer/integrated/processor/state.go +++ b/chain/indexer/integrated/processor/state.go @@ -27,6 +27,7 @@ import ( "github.com/filecoin-project/lily/tasks/messageexecutions/vm" "github.com/filecoin-project/lily/tasks/messages/actorevent" "github.com/filecoin-project/lily/tasks/messages/messageparam" + "github.com/filecoin-project/lily/tasks/messages/receiptreturn" // actor tasks "github.com/filecoin-project/lily/tasks/actorstate" @@ -607,6 +608,8 @@ func MakeProcessors(api tasks.DataSource, indexerTasks []string) (*IndexerProces out.TipsetsProcessors[t] = vm.NewTask(api) case tasktype.ActorEvent: out.TipsetsProcessors[t] = actorevent.NewTask(api) + case tasktype.ReceiptReturn: + out.TipsetsProcessors[t] = receiptreturn.NewTask(api) // // Blocks diff --git a/chain/indexer/integrated/processor/state_internal_test.go b/chain/indexer/integrated/processor/state_internal_test.go index 427e8f0a1..fb4405ed5 100644 --- a/chain/indexer/integrated/processor/state_internal_test.go +++ b/chain/indexer/integrated/processor/state_internal_test.go @@ -23,6 +23,7 @@ import ( "github.com/filecoin-project/lily/tasks/messages/gaseconomy" "github.com/filecoin-project/lily/tasks/messages/message" "github.com/filecoin-project/lily/tasks/messages/messageparam" + "github.com/filecoin-project/lily/tasks/messages/receiptreturn" "github.com/filecoin-project/lily/tasks/actorstate" inittask "github.com/filecoin-project/lily/tasks/actorstate/init_" @@ -53,7 +54,7 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, t.Name(), proc.name) require.Len(t, proc.actorProcessors, 23) require.Len(t, proc.tipsetProcessors, 9) - require.Len(t, proc.tipsetsProcessors, 8) + require.Len(t, proc.tipsetsProcessors, 9) require.Len(t, proc.builtinProcessors, 1) require.Equal(t, gasoutput.NewTask(nil), proc.tipsetsProcessors[tasktype.GasOutputs]) @@ -64,6 +65,7 @@ func TestNewProcessor(t *testing.T) { require.Equal(t, msapprovals.NewTask(nil), proc.tipsetsProcessors[tasktype.MultisigApproval]) require.Equal(t, vm.NewTask(nil), proc.tipsetsProcessors[tasktype.VMMessage]) require.Equal(t, actorevent.NewTask(nil), proc.tipsetsProcessors[tasktype.ActorEvent]) + require.Equal(t, receiptreturn.NewTask(nil), proc.tipsetsProcessors[tasktype.ReceiptReturn]) require.Equal(t, message.NewTask(nil), proc.tipsetProcessors[tasktype.Message]) require.Equal(t, blockmessage.NewTask(nil), proc.tipsetProcessors[tasktype.BlockMessage]) diff --git a/chain/indexer/integrated/processor/state_test.go b/chain/indexer/integrated/processor/state_test.go index e243fef7a..8f5cb6f0b 100644 --- a/chain/indexer/integrated/processor/state_test.go +++ b/chain/indexer/integrated/processor/state_test.go @@ -397,6 +397,6 @@ func TestMakeProcessorsAllTasks(t *testing.T) { require.NoError(t, err) require.Len(t, proc.ActorProcessors, 23) require.Len(t, proc.TipsetProcessors, 9) - require.Len(t, proc.TipsetsProcessors, 8) + require.Len(t, proc.TipsetsProcessors, 9) require.Len(t, proc.ReportProcessors, 1) } diff --git a/chain/indexer/tasktype/table_tasks.go b/chain/indexer/tasktype/table_tasks.go index be98a68c4..389fc77bf 100644 --- a/chain/indexer/tasktype/table_tasks.go +++ b/chain/indexer/tasktype/table_tasks.go @@ -29,6 +29,7 @@ const ( VMMessage = "vm_messages" ActorEvent = "actor_events" MessageParam = "message_params" + ReceiptReturn = "receipt_returns" MultisigTransaction = "multisig_transaction" ChainPower = "chain_power" PowerActorClaim = "power_actor_claim" @@ -72,6 +73,7 @@ var AllTableTasks = []string{ VMMessage, ActorEvent, MessageParam, + ReceiptReturn, MultisigTransaction, ChainPower, PowerActorClaim, @@ -115,6 +117,7 @@ var TableLookup = map[string]struct{}{ VMMessage: {}, ActorEvent: {}, MessageParam: {}, + ReceiptReturn: {}, MultisigTransaction: {}, ChainPower: {}, PowerActorClaim: {}, @@ -158,6 +161,7 @@ var TableComment = map[string]string{ VMMessage: ``, ActorEvent: ``, MessageParam: ``, + ReceiptReturn: ``, MultisigTransaction: ``, ChainPower: ``, PowerActorClaim: ``, @@ -235,8 +239,9 @@ var TableFieldComments = map[string]map[string]string{ "To": "To receiver of message.", "Value": "Value attoFIL contained in message.", }, - ActorEvent: {}, - MessageParam: {}, + ActorEvent: {}, + MessageParam: {}, + ReceiptReturn: {}, MultisigTransaction: { "To": "Transaction State", }, diff --git a/chain/indexer/tasktype/tasks.go b/chain/indexer/tasktype/tasks.go index 5b2409d79..df27f7791 100644 --- a/chain/indexer/tasktype/tasks.go +++ b/chain/indexer/tasktype/tasks.go @@ -73,6 +73,7 @@ var TaskLookup = map[string][]string{ BlockMessage, ActorEvent, MessageParam, + ReceiptReturn, }, ChainEconomicsTask: { ChainEconomics, diff --git a/chain/indexer/tasktype/tasks_test.go b/chain/indexer/tasktype/tasks_test.go index 6d4cdedfd..c9afa7a0a 100644 --- a/chain/indexer/tasktype/tasks_test.go +++ b/chain/indexer/tasktype/tasks_test.go @@ -55,7 +55,7 @@ func TestMakeTaskNamesAlias(t *testing.T) { }, { taskAlias: tasktype.MessagesTask, - tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage, tasktype.ActorEvent, tasktype.MessageParam}, + tasks: []string{tasktype.Message, tasktype.ParsedMessage, tasktype.Receipt, tasktype.GasOutputs, tasktype.MessageGasEconomy, tasktype.BlockMessage, tasktype.ActorEvent, tasktype.MessageParam, tasktype.ReceiptReturn}, }, { taskAlias: tasktype.ChainEconomicsTask, @@ -101,7 +101,7 @@ func TestMakeAllTaskAliasNames(t *testing.T) { } func TestMakeAllTaskNames(t *testing.T) { - const TotalTableTasks = 40 + const TotalTableTasks = 41 actual, err := tasktype.MakeTaskNames(tasktype.AllTableTasks) require.NoError(t, err) // if this test fails it means a new task name was added, update the above test diff --git a/model/messages/receiptparams.go b/model/messages/receiptparams.go new file mode 100644 index 000000000..64f80c622 --- /dev/null +++ b/model/messages/receiptparams.go @@ -0,0 +1,36 @@ +package messages + +import ( + "context" + + "go.opencensus.io/tag" + + "github.com/filecoin-project/lily/metrics" + "github.com/filecoin-project/lily/model" +) + +type ReceiptReturn struct { + tableName struct{} `pg:"receipt_returns"` // nolint: structcheck + Message string `pg:",pk,notnull"` + Return []byte +} + +func (m *ReceiptReturn) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "receipt_return")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, 1) + return s.PersistModel(ctx, m) +} + +type ReceiptReturnList []*ReceiptReturn + +func (rl ReceiptReturnList) Persist(ctx context.Context, s model.StorageBatch, version model.Version) error { + ctx, _ = tag.New(ctx, tag.Upsert(metrics.Table, "receipt_return")) + stop := metrics.Timer(ctx, metrics.PersistDuration) + defer stop() + + metrics.RecordCount(ctx, metrics.PersistModel, len(rl)) + return s.PersistModel(ctx, rl) +} diff --git a/schemas/v1/15_receipt_returns.go b/schemas/v1/15_receipt_returns.go new file mode 100644 index 000000000..13600599d --- /dev/null +++ b/schemas/v1/15_receipt_returns.go @@ -0,0 +1,20 @@ +package v1 + +// Schema version 14 adds receipt return tracking + +func init() { + patches.Register( + 15, + ` + CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.receipt_returns ( + message text NOT NULL, + "return" bytea, + + PRIMARY KEY (message) + ); + COMMENT ON TABLE {{ .SchemaName | default "public"}}.receipt_returns IS 'Raw parameters of on chain receipt.'; + COMMENT ON column {{ .SchemaName | default "public"}}.receipt_returns.message IS 'The CID of the message that produced in this receipt.'; + COMMENT ON COLUMN {{ .SchemaName | default "public"}}.receipt_returns.return IS 'The return of the receipt as bytes.'; +`, + ) +} diff --git a/storage/sql.go b/storage/sql.go index 2485da2e3..c0aa1b5dc 100644 --- a/storage/sql.go +++ b/storage/sql.go @@ -67,6 +67,7 @@ var Models = []interface{}{ (*messages.VMMessage)(nil), (*messages.ActorEvent)(nil), (*messages.MessageParam)(nil), + (*messages.ReceiptReturn)(nil), (*multisig.MultisigTransaction)(nil), diff --git a/tasks/messages/receiptreturn/task.go b/tasks/messages/receiptreturn/task.go new file mode 100644 index 000000000..a1b3ce166 --- /dev/null +++ b/tasks/messages/receiptreturn/task.go @@ -0,0 +1,97 @@ +package receiptreturn + +import ( + "context" + "fmt" + + "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + + "github.com/filecoin-project/lily/model" + messagemodel "github.com/filecoin-project/lily/model/messages" + visormodel "github.com/filecoin-project/lily/model/visor" + "github.com/filecoin-project/lily/tasks" + "github.com/filecoin-project/lily/tasks/messages" +) + +type Task struct { + node tasks.DataSource +} + +func NewTask(node tasks.DataSource) *Task { + return &Task{ + node: node, + } +} + +func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, executed *types.TipSet) (model.Persistable, *visormodel.ProcessingReport, error) { + ctx, span := otel.Tracer("").Start(ctx, "ProcessTipSets") + if span.IsRecording() { + span.SetAttributes( + attribute.String("current", current.String()), + attribute.Int64("current_height", int64(current.Height())), + attribute.String("executed", executed.String()), + attribute.Int64("executed_height", int64(executed.Height())), + attribute.String("processor", "receipt_returns"), + ) + } + defer span.End() + + report := &visormodel.ProcessingReport{ + Height: int64(current.Height()), + StateRoot: current.ParentState().String(), + } + + blkMsgRect, err := t.node.TipSetMessageReceipts(ctx, current, executed) + if err != nil { + report.ErrorsDetected = fmt.Errorf("getting tipset message receipet: %w", err) + return nil, report, nil + } + + var ( + receiptResults = make(messagemodel.ReceiptReturnList, 0, len(blkMsgRect)) + errorsDetected = make([]*messages.MessageError, 0, len(blkMsgRect)) + msgsSeen = make(map[cid.Cid]bool, len(blkMsgRect)) + ) + + for _, m := range blkMsgRect { + select { + case <-ctx.Done(): + return nil, nil, fmt.Errorf("context done: %w", ctx.Err()) + default: + } + + itr, err := m.Iterator() + if err != nil { + return nil, nil, err + } + + for itr.HasNext() { + msg, _, rec := itr.Next() + if msgsSeen[msg.Cid()] { + continue + } + msgsSeen[msg.Cid()] = true + + if len(rec.Return) == 0 { + continue + } + rcpt := &messagemodel.ReceiptReturn{ + Message: msg.Cid().String(), + Return: rec.Return, + } + receiptResults = append(receiptResults, rcpt) + } + + } + + if len(errorsDetected) != 0 { + report.ErrorsDetected = errorsDetected + } + + return model.PersistableList{ + receiptResults, + }, report, nil +} From 8830f484d433e24c48735d8259172fdeaef0492d Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 16 Feb 2023 11:56:48 -0800 Subject: [PATCH 18/20] fix schema index's after rebase on master --- schemas/v1/{13_actor_events.go => 14_actor_events.go} | 2 +- schemas/v1/{14_message_params.go => 15_message_params.go} | 4 ++-- schemas/v1/{15_receipt_returns.go => 16_receipt_returns.go} | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename schemas/v1/{13_actor_events.go => 14_actor_events.go} (98%) rename schemas/v1/{14_message_params.go => 15_message_params.go} (90%) rename schemas/v1/{15_receipt_returns.go => 16_receipt_returns.go} (91%) diff --git a/schemas/v1/13_actor_events.go b/schemas/v1/14_actor_events.go similarity index 98% rename from schemas/v1/13_actor_events.go rename to schemas/v1/14_actor_events.go index a734ad79e..46079b0fd 100644 --- a/schemas/v1/13_actor_events.go +++ b/schemas/v1/14_actor_events.go @@ -2,7 +2,7 @@ package v1 func init() { patches.Register( - 13, + 14, ` CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.actor_events ( height bigint NOT NULL, diff --git a/schemas/v1/14_message_params.go b/schemas/v1/15_message_params.go similarity index 90% rename from schemas/v1/14_message_params.go rename to schemas/v1/15_message_params.go index 57667f35f..4ebda3065 100644 --- a/schemas/v1/14_message_params.go +++ b/schemas/v1/15_message_params.go @@ -1,10 +1,10 @@ package v1 -// Schema version 13 adds message params tracking +// Schema version 15 adds message params tracking func init() { patches.Register( - 14, + 15, ` CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.message_params ( cid text NOT NULL, diff --git a/schemas/v1/15_receipt_returns.go b/schemas/v1/16_receipt_returns.go similarity index 91% rename from schemas/v1/15_receipt_returns.go rename to schemas/v1/16_receipt_returns.go index 13600599d..e8516f325 100644 --- a/schemas/v1/15_receipt_returns.go +++ b/schemas/v1/16_receipt_returns.go @@ -1,10 +1,10 @@ package v1 -// Schema version 14 adds receipt return tracking +// Schema version 16 adds receipt return tracking func init() { patches.Register( - 15, + 16, ` CREATE TABLE IF NOT EXISTS {{ .SchemaName | default "public"}}.receipt_returns ( message text NOT NULL, From 21cb85032cdbfdd8778c2598be87dbfb4edb8aac Mon Sep 17 00:00:00 2001 From: frrist Date: Thu, 16 Feb 2023 18:50:44 -0800 Subject: [PATCH 19/20] fix: use builtin lotus method to get events - it handles the case of legacy events --- chain/datasource/datasource.go | 4 +++ lens/interface.go | 3 ++ tasks/api.go | 2 ++ tasks/messages/actorevent/task.go | 51 ++++++++++--------------------- 4 files changed, 25 insertions(+), 35 deletions(-) diff --git a/chain/datasource/datasource.go b/chain/datasource/datasource.go index 6de776b7d..7c91c10ab 100644 --- a/chain/datasource/datasource.go +++ b/chain/datasource/datasource.go @@ -139,6 +139,10 @@ type DataSource struct { diffPreCommitGroup singleflight.Group } +func (t *DataSource) MessageReceiptEvents(ctx context.Context, root cid.Cid) ([]types.Event, error) { + return t.node.ChainGetEvents(ctx, root) +} + func (t *DataSource) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error) { return t.node.ComputeBaseFee(ctx, ts) } diff --git a/lens/interface.go b/lens/interface.go index f6f267bb9..0342aa3a8 100644 --- a/lens/interface.go +++ b/lens/interface.go @@ -48,6 +48,9 @@ type ChainAPI interface { MessagesForTipSetBlocks(ctx context.Context, ts *types.TipSet) ([]*BlockMessages, error) TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*BlockMessageReceipts, error) + + // added during hyperspace + ChainGetEvents(ctx context.Context, root cid.Cid) ([]types.Event, error) } type StateAPI interface { diff --git a/tasks/api.go b/tasks/api.go index a0f78c956..d4148b938 100644 --- a/tasks/api.go +++ b/tasks/api.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" + "github.com/ipfs/go-cid" "github.com/filecoin-project/lily/chain/actors/adt" "github.com/filecoin-project/lily/chain/actors/builtin/miner" @@ -58,6 +59,7 @@ type DataSource interface { TipSetBlockMessages(ctx context.Context, ts *types.TipSet) ([]*lens.BlockMessages, error) TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*lens.BlockMessageReceipts, error) + MessageReceiptEvents(ctx context.Context, root cid.Cid) ([]types.Event, error) DiffSectors(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.SectorChanges, error) DiffPreCommits(ctx context.Context, addr address.Address, ts, pts *types.TipSet, pre, cur miner.State) (*miner.PreCommitChanges, error) diff --git a/tasks/messages/actorevent/task.go b/tasks/messages/actorevent/task.go index 21062bbb4..46df4ecce 100644 --- a/tasks/messages/actorevent/task.go +++ b/tasks/messages/actorevent/task.go @@ -1,19 +1,14 @@ package actorevent import ( - "bytes" "context" "fmt" - "math" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-amt-ipld/v4" "github.com/filecoin-project/lotus/chain/types" "github.com/ipfs/go-cid" - cbg "github.com/whyrusleeping/cbor-gen" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - "golang.org/x/xerrors" "github.com/filecoin-project/lily/model" messagemodel "github.com/filecoin-project/lily/model/messages" @@ -85,29 +80,25 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut continue } - evtArr, err := amt.LoadAMT(ctx, t.node.Store(), *rec.EventsRoot, amt.UseTreeBitWidth(types.EventAMTBitwidth)) + events, err := t.node.MessageReceiptEvents(ctx, *rec.EventsRoot) if err != nil { - report.ErrorsDetected = fmt.Errorf("loading actor events amt (%s): %w", *rec.EventsRoot, err) - return nil, report, nil + errorsDetected = append(errorsDetected, &messages.MessageError{ + Cid: msg.Cid(), + Error: fmt.Sprintf("failed to get receipt events: %s", err), + }) + continue } - var evt types.Event - err = evtArr.ForEach(ctx, func(evtIdx uint64, deferred *cbg.Deferred) error { - if evtIdx > math.MaxInt { - return xerrors.Errorf("too many events") - } - if err := evt.UnmarshalCBOR(bytes.NewReader(deferred.Raw)); err != nil { - return err - } - emitter, err := address.NewIDAddress(uint64(evt.Emitter)) - if err != nil { - errorsDetected = append(errorsDetected, &messages.MessageError{ - Cid: msg.Cid(), - Error: fmt.Sprintf("failed to make ID address from event emitter (%s): %s", evt.Emitter, err), - }) - return err - } - for _, e := range evt.Entries { + for evtIdx, event := range events { + for _, e := range event.Entries { + emitter, err := address.NewIDAddress(uint64(event.Emitter)) + if err != nil { + errorsDetected = append(errorsDetected, &messages.MessageError{ + Cid: msg.Cid(), + Error: fmt.Sprintf("failed to make ID address from event emitter (%s): %s", event.Emitter, err), + }) + continue + } out = append(out, &messagemodel.ActorEvent{ Height: int64(current.Height()), StateRoot: current.ParentState().String(), @@ -119,19 +110,9 @@ func (t *Task) ProcessTipSets(ctx context.Context, current *types.TipSet, execut Value: e.Value, }) } - return nil - }) - - if err != nil { - errorsDetected = append(errorsDetected, &messages.MessageError{ - Cid: msg.Cid(), - Error: fmt.Sprintf("loading actor events amt (%s): %s", *rec.EventsRoot, err), - }) - continue } } } - if len(errorsDetected) != 0 { report.ErrorsDetected = errorsDetected } From 5086d9569f60bb28ee245feac0f2e21e993a36f3 Mon Sep 17 00:00:00 2001 From: Steph Samson Date: Mon, 27 Feb 2023 18:38:14 -0800 Subject: [PATCH 20/20] chore: add actors v13 --- chain/actors/actors.go | 4 +- chain/actors/builtin/datacap/datacap.go | 22 +- chain/actors/builtin/datacap/v12.go | 92 +++ chain/actors/builtin/datacap/v13.go | 92 +++ chain/actors/builtin/init/init.go | 22 +- chain/actors/builtin/init/v12.go | 151 +++++ chain/actors/builtin/init/v13.go | 151 +++++ chain/actors/builtin/market/market.go | 10 + chain/actors/builtin/market/v12.go | 256 +++++++ chain/actors/builtin/market/v13.go | 256 +++++++ chain/actors/builtin/miner/miner.go | 20 +- chain/actors/builtin/miner/mocks/state.go | 26 +- chain/actors/builtin/miner/v12.go | 623 ++++++++++++++++++ chain/actors/builtin/miner/v13.go | 623 ++++++++++++++++++ chain/actors/builtin/multisig/multisig.go | 26 +- chain/actors/builtin/multisig/v12.go | 130 ++++ chain/actors/builtin/multisig/v13.go | 130 ++++ chain/actors/builtin/power/power.go | 16 +- chain/actors/builtin/power/v12.go | 186 ++++++ chain/actors/builtin/power/v13.go | 186 ++++++ chain/actors/builtin/reward/reward.go | 16 +- chain/actors/builtin/reward/v12.go | 109 +++ chain/actors/builtin/reward/v13.go | 109 +++ chain/actors/builtin/verifreg/v12.go | 172 +++++ chain/actors/builtin/verifreg/v13.go | 172 +++++ chain/actors/builtin/verifreg/verifreg.go | 16 +- go.mod | 28 +- go.sum | 50 +- lens/util/store.go | 4 +- .../miner/extraction/mocks/state.go | 2 +- 30 files changed, 3622 insertions(+), 78 deletions(-) create mode 100644 chain/actors/builtin/datacap/v12.go create mode 100644 chain/actors/builtin/datacap/v13.go create mode 100644 chain/actors/builtin/init/v12.go create mode 100644 chain/actors/builtin/init/v13.go create mode 100644 chain/actors/builtin/market/v12.go create mode 100644 chain/actors/builtin/market/v13.go create mode 100644 chain/actors/builtin/miner/v12.go create mode 100644 chain/actors/builtin/miner/v13.go create mode 100644 chain/actors/builtin/multisig/v12.go create mode 100644 chain/actors/builtin/multisig/v13.go create mode 100644 chain/actors/builtin/power/v12.go create mode 100644 chain/actors/builtin/power/v13.go create mode 100644 chain/actors/builtin/reward/v12.go create mode 100644 chain/actors/builtin/reward/v13.go create mode 100644 chain/actors/builtin/verifreg/v12.go create mode 100644 chain/actors/builtin/verifreg/v13.go diff --git a/chain/actors/actors.go b/chain/actors/actors.go index 1ef261601..e9a8d69dd 100644 --- a/chain/actors/actors.go +++ b/chain/actors/actors.go @@ -10,7 +10,7 @@ import ( builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - "github.com/ipfs/go-cid" + cid "github.com/ipfs/go-cid" ) type Version int @@ -27,6 +27,8 @@ const ( Version9 Version = 9 Version10 Version = 10 Version11 Version = 11 + Version12 Version = 12 + Version13 Version = 13 ) const ( AccountKey = "account" diff --git a/chain/actors/builtin/datacap/datacap.go b/chain/actors/builtin/datacap/datacap.go index 6ad0df6e3..5e0bd55f7 100644 --- a/chain/actors/builtin/datacap/datacap.go +++ b/chain/actors/builtin/datacap/datacap.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin11 "github.com/filecoin-project/go-state-types/builtin" + builtin13 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" @@ -17,8 +17,8 @@ import ( ) var ( - Address = builtin11.DatacapActorAddr - Methods = builtin11.MethodsDatacap + Address = builtin13.DatacapActorAddr + Methods = builtin13.MethodsDatacap ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -38,6 +38,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version11: return load11(store, act.Head) + case actorstypes.Version12: + return load12(store, act.Head) + + case actorstypes.Version13: + return load13(store, act.Head) + } } @@ -56,6 +62,12 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address case actorstypes.Version11: return make11(store, governor, bitwidth) + case actorstypes.Version12: + return make12(store, governor, bitwidth) + + case actorstypes.Version13: + return make13(store, governor, bitwidth) + default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) } @@ -83,6 +95,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -91,5 +105,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/datacap/v12.go b/chain/actors/builtin/datacap/v12.go new file mode 100644 index 000000000..f02f1bc1b --- /dev/null +++ b/chain/actors/builtin/datacap/v12.go @@ -0,0 +1,92 @@ +package datacap + +import ( + "crypto/sha256" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + + datacap12 "github.com/filecoin-project/go-state-types/builtin/v12/datacap" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make12(store adt.Store, governor address.Address, bitwidth uint64) (State, error) { + out := state12{store: store} + s, err := datacap12.ConstructState(store, governor, bitwidth) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state12 struct { + datacap12.State + store adt.Store +} + +func (s *state12) Governor() (address.Address, error) { + return s.State.Governor, nil +} + +func (s *state12) GetState() interface{} { + return &s.State +} + +func (s *state12) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachClient(s.store, actors.Version12, s.VerifiedClients, cb) +} + +func (s *state12) VerifiedClients() (adt.Map, error) { + return adt12.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth)) +} + +func (s *state12) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version12, s.VerifiedClients, addr) +} + +func (s *state12) VerifiedClientsMapBitWidth() int { + return int(s.Token.HamtBitWidth) +} + +func (s *state12) VerifiedClientsMapHashFunction() func(input []byte) []byte { + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } +} + +func (s *state12) ActorKey() string { + return actors.DatacapKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/datacap/v13.go b/chain/actors/builtin/datacap/v13.go new file mode 100644 index 000000000..d1171cb1e --- /dev/null +++ b/chain/actors/builtin/datacap/v13.go @@ -0,0 +1,92 @@ +package datacap + +import ( + "crypto/sha256" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + + datacap13 "github.com/filecoin-project/go-state-types/builtin/v13/datacap" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make13(store adt.Store, governor address.Address, bitwidth uint64) (State, error) { + out := state13{store: store} + s, err := datacap13.ConstructState(store, governor, bitwidth) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state13 struct { + datacap13.State + store adt.Store +} + +func (s *state13) Governor() (address.Address, error) { + return s.State.Governor, nil +} + +func (s *state13) GetState() interface{} { + return &s.State +} + +func (s *state13) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachClient(s.store, actors.Version13, s.VerifiedClients, cb) +} + +func (s *state13) VerifiedClients() (adt.Map, error) { + return adt13.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth)) +} + +func (s *state13) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version13, s.VerifiedClients, addr) +} + +func (s *state13) VerifiedClientsMapBitWidth() int { + return int(s.Token.HamtBitWidth) +} + +func (s *state13) VerifiedClientsMapHashFunction() func(input []byte) []byte { + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } +} + +func (s *state13) ActorKey() string { + return actors.DatacapKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/init/init.go b/chain/actors/builtin/init/init.go index e922a40ae..103b90971 100644 --- a/chain/actors/builtin/init/init.go +++ b/chain/actors/builtin/init/init.go @@ -28,14 +28,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin11 "github.com/filecoin-project/go-state-types/builtin" + builtin13 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin11.InitActorAddr - Methods = builtin11.MethodsInit + Address = builtin13.InitActorAddr + Methods = builtin13.MethodsInit ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -58,6 +58,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -125,6 +131,12 @@ func MakeState(store adt.Store, av actors.Version, networkName string) (State, e case actors.Version11: return make11(store, networkName) + case actors.Version12: + return make12(store, networkName) + + case actors.Version13: + return make13(store, networkName) + } return nil, fmt.Errorf("unknown actor version %d", av) } @@ -176,6 +188,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -192,5 +206,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/init/v12.go b/chain/actors/builtin/init/v12.go new file mode 100644 index 000000000..ed787f6f6 --- /dev/null +++ b/chain/actors/builtin/init/v12.go @@ -0,0 +1,151 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package init + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/node/modules/dtypes" + + "crypto/sha256" + + builtin12 "github.com/filecoin-project/go-state-types/builtin" + init12 "github.com/filecoin-project/go-state-types/builtin/v12/init" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make12(store adt.Store, networkName string) (State, error) { + out := state12{store: store} + + s, err := init12.ConstructState(store, networkName) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state12 struct { + init12.State + store adt.Store +} + +func (s *state12) ResolveAddress(address address.Address) (address.Address, bool, error) { + return s.State.ResolveAddress(s.store, address) +} + +func (s *state12) MapAddressToNewID(address address.Address) (address.Address, error) { + return s.State.MapAddressToNewID(s.store, address) +} + +func (s *state12) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error { + addrs, err := adt12.AsMap(s.store, s.State.AddressMap, builtin12.DefaultHamtBitwidth) + if err != nil { + return err + } + var actorID cbg.CborInt + return addrs.ForEach(&actorID, func(key string) error { + addr, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(abi.ActorID(actorID), addr) + }) +} + +func (s *state12) NetworkName() (dtypes.NetworkName, error) { + return dtypes.NetworkName(s.State.NetworkName), nil +} + +func (s *state12) SetNetworkName(name string) error { + s.State.NetworkName = name + return nil +} + +func (s *state12) SetNextID(id abi.ActorID) error { + s.State.NextID = id + return nil +} + +func (s *state12) Remove(addrs ...address.Address) (err error) { + m, err := adt12.AsMap(s.store, s.State.AddressMap, builtin12.DefaultHamtBitwidth) + if err != nil { + return err + } + for _, addr := range addrs { + if err = m.Delete(abi.AddrKey(addr)); err != nil { + return fmt.Errorf("failed to delete entry for address: %s; err: %w", addr, err) + } + } + amr, err := m.Root() + if err != nil { + return fmt.Errorf("failed to get address map root: %w", err) + } + s.State.AddressMap = amr + return nil +} + +func (s *state12) SetAddressMap(mcid cid.Cid) error { + s.State.AddressMap = mcid + return nil +} + +func (s *state12) AddressMap() (adt.Map, error) { + return adt12.AsMap(s.store, s.State.AddressMap, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) AddressMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) AddressMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) GetState() interface{} { + return &s.State +} + +func (s *state12) ActorKey() string { + return actors.InitKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/init/v13.go b/chain/actors/builtin/init/v13.go new file mode 100644 index 000000000..69a7c8ebd --- /dev/null +++ b/chain/actors/builtin/init/v13.go @@ -0,0 +1,151 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package init + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/node/modules/dtypes" + + "crypto/sha256" + + builtin13 "github.com/filecoin-project/go-state-types/builtin" + init13 "github.com/filecoin-project/go-state-types/builtin/v13/init" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make13(store adt.Store, networkName string) (State, error) { + out := state13{store: store} + + s, err := init13.ConstructState(store, networkName) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state13 struct { + init13.State + store adt.Store +} + +func (s *state13) ResolveAddress(address address.Address) (address.Address, bool, error) { + return s.State.ResolveAddress(s.store, address) +} + +func (s *state13) MapAddressToNewID(address address.Address) (address.Address, error) { + return s.State.MapAddressToNewID(s.store, address) +} + +func (s *state13) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error { + addrs, err := adt13.AsMap(s.store, s.State.AddressMap, builtin13.DefaultHamtBitwidth) + if err != nil { + return err + } + var actorID cbg.CborInt + return addrs.ForEach(&actorID, func(key string) error { + addr, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(abi.ActorID(actorID), addr) + }) +} + +func (s *state13) NetworkName() (dtypes.NetworkName, error) { + return dtypes.NetworkName(s.State.NetworkName), nil +} + +func (s *state13) SetNetworkName(name string) error { + s.State.NetworkName = name + return nil +} + +func (s *state13) SetNextID(id abi.ActorID) error { + s.State.NextID = id + return nil +} + +func (s *state13) Remove(addrs ...address.Address) (err error) { + m, err := adt13.AsMap(s.store, s.State.AddressMap, builtin13.DefaultHamtBitwidth) + if err != nil { + return err + } + for _, addr := range addrs { + if err = m.Delete(abi.AddrKey(addr)); err != nil { + return fmt.Errorf("failed to delete entry for address: %s; err: %w", addr, err) + } + } + amr, err := m.Root() + if err != nil { + return fmt.Errorf("failed to get address map root: %w", err) + } + s.State.AddressMap = amr + return nil +} + +func (s *state13) SetAddressMap(mcid cid.Cid) error { + s.State.AddressMap = mcid + return nil +} + +func (s *state13) AddressMap() (adt.Map, error) { + return adt13.AsMap(s.store, s.State.AddressMap, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) AddressMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) AddressMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) GetState() interface{} { + return &s.State +} + +func (s *state13) ActorKey() string { + return actors.InitKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index 9123ec11b..1658a20cf 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -60,6 +60,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -177,6 +183,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -193,5 +201,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/market/v12.go b/chain/actors/builtin/market/v12.go new file mode 100644 index 000000000..ffdbb88ee --- /dev/null +++ b/chain/actors/builtin/market/v12.go @@ -0,0 +1,256 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package market + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lotus/chain/actors/adt" + + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + market12 "github.com/filecoin-project/go-state-types/builtin/v12/market" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" + markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make12(store adt.Store) (State, error) { + out := state12{store: store} + + s, err := market12.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state12 struct { + market12.State + store adt.Store +} + +func (s *state12) StatesChanged(otherState State) (bool, error) { + otherState12, ok := otherState.(*state12) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.States.Equals(otherState12.State.States), nil +} + +func (s *state12) States() (DealStates, error) { + stateArray, err := adt12.AsArray(s.store, s.State.States, market12.StatesAmtBitwidth) + if err != nil { + return nil, err + } + return &dealStates12{stateArray}, nil +} + +func (s *state12) ProposalsChanged(otherState State) (bool, error) { + otherState12, ok := otherState.(*state12) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.Proposals.Equals(otherState12.State.Proposals), nil +} + +func (s *state12) Proposals() (DealProposals, error) { + proposalArray, err := adt12.AsArray(s.store, s.State.Proposals, market12.ProposalsAmtBitwidth) + if err != nil { + return nil, err + } + return &dealProposals12{proposalArray}, nil +} + +type dealStates12 struct { + adt.Array +} + +func (s *dealStates12) Get(dealID abi.DealID) (*DealState, bool, error) { + var deal12 market12.DealState + found, err := s.Array.Get(uint64(dealID), &deal12) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + deal := fromV12DealState(deal12) + return &deal, true, nil +} + +func (s *dealStates12) ForEach(cb func(dealID abi.DealID, ds DealState) error) error { + var ds12 market12.DealState + return s.Array.ForEach(&ds12, func(idx int64) error { + return cb(abi.DealID(idx), fromV12DealState(ds12)) + }) +} + +func (s *dealStates12) decode(val *cbg.Deferred) (*DealState, error) { + var ds12 market12.DealState + if err := ds12.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + ds := fromV12DealState(ds12) + return &ds, nil +} + +func (s *dealStates12) array() adt.Array { + return s.Array +} + +func fromV12DealState(v12 market12.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v12.SectorStartEpoch, + LastUpdatedEpoch: v12.LastUpdatedEpoch, + SlashEpoch: v12.SlashEpoch, + VerifiedClaim: 0, + } + + ret.VerifiedClaim = verifregtypes.AllocationId(v12.VerifiedClaim) + + return ret +} + +type dealProposals12 struct { + adt.Array +} + +func (s *dealProposals12) Get(dealID abi.DealID) (*DealProposal, bool, error) { + var proposal12 market12.DealProposal + found, err := s.Array.Get(uint64(dealID), &proposal12) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + + proposal, err := fromV12DealProposal(proposal12) + if err != nil { + return nil, true, xerrors.Errorf("decoding proposal: %w", err) + } + + return &proposal, true, nil +} + +func (s *dealProposals12) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error { + var dp12 market12.DealProposal + return s.Array.ForEach(&dp12, func(idx int64) error { + dp, err := fromV12DealProposal(dp12) + if err != nil { + return xerrors.Errorf("decoding proposal: %w", err) + } + + return cb(abi.DealID(idx), dp) + }) +} + +func (s *dealProposals12) decode(val *cbg.Deferred) (*DealProposal, error) { + var dp12 market12.DealProposal + if err := dp12.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + + dp, err := fromV12DealProposal(dp12) + if err != nil { + return nil, err + } + + return &dp, nil +} + +func (s *dealProposals12) array() adt.Array { + return s.Array +} + +func fromV12DealProposal(v12 market12.DealProposal) (DealProposal, error) { + + label, err := fromV12Label(v12.Label) + + if err != nil { + return DealProposal{}, xerrors.Errorf("error setting deal label: %w", err) + } + + return DealProposal{ + PieceCID: v12.PieceCID, + PieceSize: v12.PieceSize, + VerifiedDeal: v12.VerifiedDeal, + Client: v12.Client, + Provider: v12.Provider, + + Label: label, + + StartEpoch: v12.StartEpoch, + EndEpoch: v12.EndEpoch, + StoragePricePerEpoch: v12.StoragePricePerEpoch, + + ProviderCollateral: v12.ProviderCollateral, + ClientCollateral: v12.ClientCollateral, + }, nil +} + +func (s *state12) DealProposalsAmtBitwidth() int { + return market12.ProposalsAmtBitwidth +} + +func (s *state12) DealStatesAmtBitwidth() int { + return market12.StatesAmtBitwidth +} + +func (s *state12) ActorKey() string { + return actors.MarketKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func fromV12Label(v12 market12.DealLabel) (DealLabel, error) { + if v12.IsString() { + str, err := v12.ToString() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert string label to string: %w", err) + } + return markettypes.NewLabelFromString(str) + } + + bs, err := v12.ToBytes() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert bytes label to bytes: %w", err) + } + return markettypes.NewLabelFromBytes(bs) +} diff --git a/chain/actors/builtin/market/v13.go b/chain/actors/builtin/market/v13.go new file mode 100644 index 000000000..5924e1746 --- /dev/null +++ b/chain/actors/builtin/market/v13.go @@ -0,0 +1,256 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. + +package market + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/lotus/chain/actors/adt" + + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + market13 "github.com/filecoin-project/go-state-types/builtin/v13/market" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" + markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make13(store adt.Store) (State, error) { + out := state13{store: store} + + s, err := market13.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state13 struct { + market13.State + store adt.Store +} + +func (s *state13) StatesChanged(otherState State) (bool, error) { + otherState13, ok := otherState.(*state13) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.States.Equals(otherState13.State.States), nil +} + +func (s *state13) States() (DealStates, error) { + stateArray, err := adt13.AsArray(s.store, s.State.States, market13.StatesAmtBitwidth) + if err != nil { + return nil, err + } + return &dealStates13{stateArray}, nil +} + +func (s *state13) ProposalsChanged(otherState State) (bool, error) { + otherState13, ok := otherState.(*state13) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.Proposals.Equals(otherState13.State.Proposals), nil +} + +func (s *state13) Proposals() (DealProposals, error) { + proposalArray, err := adt13.AsArray(s.store, s.State.Proposals, market13.ProposalsAmtBitwidth) + if err != nil { + return nil, err + } + return &dealProposals13{proposalArray}, nil +} + +type dealStates13 struct { + adt.Array +} + +func (s *dealStates13) Get(dealID abi.DealID) (*DealState, bool, error) { + var deal13 market13.DealState + found, err := s.Array.Get(uint64(dealID), &deal13) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + deal := fromV13DealState(deal13) + return &deal, true, nil +} + +func (s *dealStates13) ForEach(cb func(dealID abi.DealID, ds DealState) error) error { + var ds13 market13.DealState + return s.Array.ForEach(&ds13, func(idx int64) error { + return cb(abi.DealID(idx), fromV13DealState(ds13)) + }) +} + +func (s *dealStates13) decode(val *cbg.Deferred) (*DealState, error) { + var ds13 market13.DealState + if err := ds13.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + ds := fromV13DealState(ds13) + return &ds, nil +} + +func (s *dealStates13) array() adt.Array { + return s.Array +} + +func fromV13DealState(v13 market13.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v13.SectorStartEpoch, + LastUpdatedEpoch: v13.LastUpdatedEpoch, + SlashEpoch: v13.SlashEpoch, + VerifiedClaim: 0, + } + + ret.VerifiedClaim = verifregtypes.AllocationId(v13.VerifiedClaim) + + return ret +} + +type dealProposals13 struct { + adt.Array +} + +func (s *dealProposals13) Get(dealID abi.DealID) (*DealProposal, bool, error) { + var proposal13 market13.DealProposal + found, err := s.Array.Get(uint64(dealID), &proposal13) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + + proposal, err := fromV13DealProposal(proposal13) + if err != nil { + return nil, true, xerrors.Errorf("decoding proposal: %w", err) + } + + return &proposal, true, nil +} + +func (s *dealProposals13) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error { + var dp13 market13.DealProposal + return s.Array.ForEach(&dp13, func(idx int64) error { + dp, err := fromV13DealProposal(dp13) + if err != nil { + return xerrors.Errorf("decoding proposal: %w", err) + } + + return cb(abi.DealID(idx), dp) + }) +} + +func (s *dealProposals13) decode(val *cbg.Deferred) (*DealProposal, error) { + var dp13 market13.DealProposal + if err := dp13.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + + dp, err := fromV13DealProposal(dp13) + if err != nil { + return nil, err + } + + return &dp, nil +} + +func (s *dealProposals13) array() adt.Array { + return s.Array +} + +func fromV13DealProposal(v13 market13.DealProposal) (DealProposal, error) { + + label, err := fromV13Label(v13.Label) + + if err != nil { + return DealProposal{}, xerrors.Errorf("error setting deal label: %w", err) + } + + return DealProposal{ + PieceCID: v13.PieceCID, + PieceSize: v13.PieceSize, + VerifiedDeal: v13.VerifiedDeal, + Client: v13.Client, + Provider: v13.Provider, + + Label: label, + + StartEpoch: v13.StartEpoch, + EndEpoch: v13.EndEpoch, + StoragePricePerEpoch: v13.StoragePricePerEpoch, + + ProviderCollateral: v13.ProviderCollateral, + ClientCollateral: v13.ClientCollateral, + }, nil +} + +func (s *state13) DealProposalsAmtBitwidth() int { + return market13.ProposalsAmtBitwidth +} + +func (s *state13) DealStatesAmtBitwidth() int { + return market13.StatesAmtBitwidth +} + +func (s *state13) ActorKey() string { + return actors.MarketKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func fromV13Label(v13 market13.DealLabel) (DealLabel, error) { + if v13.IsString() { + str, err := v13.ToString() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert string label to string: %w", err) + } + return markettypes.NewLabelFromString(str) + } + + bs, err := v13.ToBytes() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert bytes label to bytes: %w", err) + } + return markettypes.NewLabelFromBytes(bs) +} diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index 6f5b388ec..4e77ce183 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -16,7 +16,7 @@ import ( "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/proof" - miner11 "github.com/filecoin-project/go-state-types/builtin/v11/miner" + miner13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -57,6 +57,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -124,6 +130,12 @@ func MakeState(store adt.Store, av actors.Version) (State, error) { case actors.Version11: return make11(store) + case actors.Version12: + return make12(store) + + case actors.Version13: + return make13(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -221,7 +233,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = miner11.SectorOnChainInfo +type SectorOnChainInfo = miner13.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -342,6 +354,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -358,5 +372,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/miner/mocks/state.go b/chain/actors/builtin/miner/mocks/state.go index 66370e042..ce352f7d1 100644 --- a/chain/actors/builtin/miner/mocks/state.go +++ b/chain/actors/builtin/miner/mocks/state.go @@ -24,7 +24,7 @@ import ( typegen "github.com/whyrusleeping/cbor-gen" - v11miner "github.com/filecoin-project/go-state-types/builtin/v11/miner" + v13miner "github.com/filecoin-project/go-state-types/builtin/v13/miner" v8miner "github.com/filecoin-project/go-state-types/builtin/v8/miner" @@ -165,14 +165,14 @@ func (_m *State) DeadlinesChanged(_a0 miner.State) (bool, error) { } // DecodeSectorOnChainInfo provides a mock function with given fields: _a0 -func (_m *State) DecodeSectorOnChainInfo(_a0 *typegen.Deferred) (v11miner.SectorOnChainInfo, error) { +func (_m *State) DecodeSectorOnChainInfo(_a0 *typegen.Deferred) (v13miner.SectorOnChainInfo, error) { ret := _m.Called(_a0) - var r0 v11miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(*typegen.Deferred) v11miner.SectorOnChainInfo); ok { + var r0 v13miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(*typegen.Deferred) v13miner.SectorOnChainInfo); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(v11miner.SectorOnChainInfo) + r0 = ret.Get(0).(v13miner.SectorOnChainInfo) } var r1 error @@ -395,15 +395,15 @@ func (_m *State) GetProvingPeriodStart() (abi.ChainEpoch, error) { } // GetSector provides a mock function with given fields: _a0 -func (_m *State) GetSector(_a0 abi.SectorNumber) (*v11miner.SectorOnChainInfo, error) { +func (_m *State) GetSector(_a0 abi.SectorNumber) (*v13miner.SectorOnChainInfo, error) { ret := _m.Called(_a0) - var r0 *v11miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(abi.SectorNumber) *v11miner.SectorOnChainInfo); ok { + var r0 *v13miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(abi.SectorNumber) *v13miner.SectorOnChainInfo); ok { r0 = rf(_a0) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*v11miner.SectorOnChainInfo) + r0 = ret.Get(0).(*v13miner.SectorOnChainInfo) } } @@ -522,15 +522,15 @@ func (_m *State) LoadDeadline(idx uint64) (miner.Deadline, error) { } // LoadSectors provides a mock function with given fields: sectorNos -func (_m *State) LoadSectors(sectorNos *bitfield.BitField) ([]*v11miner.SectorOnChainInfo, error) { +func (_m *State) LoadSectors(sectorNos *bitfield.BitField) ([]*v13miner.SectorOnChainInfo, error) { ret := _m.Called(sectorNos) - var r0 []*v11miner.SectorOnChainInfo - if rf, ok := ret.Get(0).(func(*bitfield.BitField) []*v11miner.SectorOnChainInfo); ok { + var r0 []*v13miner.SectorOnChainInfo + if rf, ok := ret.Get(0).(func(*bitfield.BitField) []*v13miner.SectorOnChainInfo); ok { r0 = rf(sectorNos) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).([]*v11miner.SectorOnChainInfo) + r0 = ret.Get(0).([]*v13miner.SectorOnChainInfo) } } diff --git a/chain/actors/builtin/miner/v12.go b/chain/actors/builtin/miner/v12.go new file mode 100644 index 000000000..9c09a422b --- /dev/null +++ b/chain/actors/builtin/miner/v12.go @@ -0,0 +1,623 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package miner + +import ( + "bytes" + "errors" + "fmt" + + "github.com/filecoin-project/go-bitfield" + rle "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + "github.com/filecoin-project/lotus/chain/actors/adt" + + "crypto/sha256" + + builtin12 "github.com/filecoin-project/go-state-types/builtin" + miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make12(store adt.Store) (State, error) { + out := state12{store: store} + out.State = miner12.State{} + return &out, nil +} + +type state12 struct { + miner12.State + store adt.Store +} + +type deadline12 struct { + miner12.Deadline + store adt.Store +} + +type partition12 struct { + miner12.Partition + store adt.Store +} + +func (s *state12) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmount, err error) { + defer func() { + if r := recover(); r != nil { + err = xerrors.Errorf("failed to get available balance: %w", r) + available = abi.NewTokenAmount(0) + } + }() + // this panics if the miner doesnt have enough funds to cover their locked pledge + available, err = s.GetAvailableBalance(bal) + return available, err +} + +func (s *state12) VestedFunds(epoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.CheckVestedFunds(s.store, epoch) +} + +func (s *state12) LockedFunds() (LockedFunds, error) { + return LockedFunds{ + VestingFunds: s.State.LockedFunds, + InitialPledgeRequirement: s.State.InitialPledge, + PreCommitDeposits: s.State.PreCommitDeposits, + }, nil +} + +func (s *state12) FeeDebt() (abi.TokenAmount, error) { + return s.State.FeeDebt, nil +} + +func (s *state12) InitialPledge() (abi.TokenAmount, error) { + return s.State.InitialPledge, nil +} + +func (s *state12) PreCommitDeposits() (abi.TokenAmount, error) { + return s.State.PreCommitDeposits, nil +} + +func (s *state12) GetSector(num abi.SectorNumber) (*SectorOnChainInfo, error) { + info, ok, err := s.State.GetSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV12SectorOnChainInfo(*info) + return &ret, nil +} + +func (s *state12) FindSector(num abi.SectorNumber) (*SectorLocation, error) { + dlIdx, partIdx, err := s.State.FindSector(s.store, num) + if err != nil { + return nil, err + } + return &SectorLocation{ + Deadline: dlIdx, + Partition: partIdx, + }, nil +} + +func (s *state12) NumLiveSectors() (uint64, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return 0, err + } + var total uint64 + if err := dls.ForEach(s.store, func(dlIdx uint64, dl *miner12.Deadline) error { + total += dl.LiveSectors + return nil + }); err != nil { + return 0, err + } + return total, nil +} + +// GetSectorExpiration returns the effective expiration of the given sector. +// +// If the sector does not expire early, the Early expiration field is 0. +func (s *state12) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + // NOTE: this can be optimized significantly. + // 1. If the sector is non-faulty, it will expire on-time (can be + // learned from the sector info). + // 2. If it's faulty, it will expire early within the first 42 entries + // of the expiration queue. + + stopErr := errors.New("stop") + out := SectorExpiration{} + err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner12.Deadline) error { + partitions, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + quant := s.State.QuantSpecForDeadline(dlIdx) + var part miner12.Partition + return partitions.ForEach(&part, func(partIdx int64) error { + if found, err := part.Sectors.IsSet(uint64(num)); err != nil { + return err + } else if !found { + return nil + } + if found, err := part.Terminated.IsSet(uint64(num)); err != nil { + return err + } else if found { + // already terminated + return stopErr + } + + q, err := miner12.LoadExpirationQueue(s.store, part.ExpirationsEpochs, quant, miner12.PartitionExpirationAmtBitwidth) + if err != nil { + return err + } + var exp miner12.ExpirationSet + return q.ForEach(&exp, func(epoch int64) error { + if early, err := exp.EarlySectors.IsSet(uint64(num)); err != nil { + return err + } else if early { + out.Early = abi.ChainEpoch(epoch) + return nil + } + if onTime, err := exp.OnTimeSectors.IsSet(uint64(num)); err != nil { + return err + } else if onTime { + out.OnTime = abi.ChainEpoch(epoch) + return stopErr + } + return nil + }) + }) + }) + if err == stopErr { + err = nil + } + if err != nil { + return nil, err + } + if out.Early == 0 && out.OnTime == 0 { + return nil, xerrors.Errorf("failed to find sector %d", num) + } + return &out, nil +} + +func (s *state12) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { + info, ok, err := s.State.GetPrecommittedSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV12SectorPreCommitOnChainInfo(*info) + + return &ret, nil +} + +func (s *state12) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { + precommitted, err := adt12.AsMap(s.store, s.State.PreCommittedSectors, builtin12.DefaultHamtBitwidth) + if err != nil { + return err + } + + var info miner12.SectorPreCommitOnChainInfo + if err := precommitted.ForEach(&info, func(_ string) error { + return cb(fromV12SectorPreCommitOnChainInfo(info)) + }); err != nil { + return err + } + + return nil +} + +func (s *state12) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) { + sectors, err := miner12.LoadSectors(s.store, s.State.Sectors) + if err != nil { + return nil, err + } + + // If no sector numbers are specified, load all. + if snos == nil { + infos := make([]*SectorOnChainInfo, 0, sectors.Length()) + var info12 miner12.SectorOnChainInfo + if err := sectors.ForEach(&info12, func(_ int64) error { + info := fromV12SectorOnChainInfo(info12) + infos = append(infos, &info) + return nil + }); err != nil { + return nil, err + } + return infos, nil + } + + // Otherwise, load selected. + infos12, err := sectors.Load(*snos) + if err != nil { + return nil, err + } + infos := make([]*SectorOnChainInfo, len(infos12)) + for i, info12 := range infos12 { + info := fromV12SectorOnChainInfo(*info12) + infos[i] = &info + } + return infos, nil +} + +func (s *state12) loadAllocatedSectorNumbers() (bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors) + return allocatedSectors, err +} + +func (s *state12) IsAllocated(num abi.SectorNumber) (bool, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return false, err + } + + return allocatedSectors.IsSet(uint64(num)) +} + +func (s *state12) GetProvingPeriodStart() (abi.ChainEpoch, error) { + return s.State.ProvingPeriodStart, nil +} + +func (s *state12) UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return nil, err + } + + allocatedRuns, err := allocatedSectors.RunIterator() + if err != nil { + return nil, err + } + + unallocatedRuns, err := rle.Subtract( + &rle.RunSliceIterator{Runs: []rle.Run{{Val: true, Len: abi.MaxSectorNumber}}}, + allocatedRuns, + ) + if err != nil { + return nil, err + } + + iter, err := rle.BitsFromRuns(unallocatedRuns) + if err != nil { + return nil, err + } + + sectors := make([]abi.SectorNumber, 0, count) + for iter.HasNext() && len(sectors) < count { + nextNo, err := iter.Next() + if err != nil { + return nil, err + } + sectors = append(sectors, abi.SectorNumber(nextNo)) + } + + return sectors, nil +} + +func (s *state12) GetAllocatedSectors() (*bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + if err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors); err != nil { + return nil, err + } + + return &allocatedSectors, nil +} + +func (s *state12) LoadDeadline(idx uint64) (Deadline, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + dl, err := dls.LoadDeadline(s.store, idx) + if err != nil { + return nil, err + } + return &deadline12{*dl, s.store}, nil +} + +func (s *state12) ForEachDeadline(cb func(uint64, Deadline) error) error { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + return dls.ForEach(s.store, func(i uint64, dl *miner12.Deadline) error { + return cb(i, &deadline12{*dl, s.store}) + }) +} + +func (s *state12) NumDeadlines() (uint64, error) { + return miner12.WPoStPeriodDeadlines, nil +} + +func (s *state12) DeadlinesChanged(other State) (bool, error) { + other12, ok := other.(*state12) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !s.State.Deadlines.Equals(other12.Deadlines), nil +} + +func (s *state12) MinerInfoChanged(other State) (bool, error) { + other0, ok := other.(*state12) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Info.Equals(other0.State.Info), nil +} + +func (s *state12) Info() (MinerInfo, error) { + info, err := s.State.GetInfo(s.store) + if err != nil { + return MinerInfo{}, err + } + + mi := MinerInfo{ + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: info.WindowPoStProofType, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + } + + return mi, nil +} + +func (s *state12) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { + return s.State.RecordedDeadlineInfo(epoch), nil +} + +func (s *state12) DeadlineCronActive() (bool, error) { + return s.State.DeadlineCronActive, nil +} + +func (s *state12) SectorsArray() (adt.Array, error) { + return adt12.AsArray(s.store, s.Sectors, miner12.SectorsAmtBitwidth) +} + +func (s *state12) DecodeSectorOnChainInfo(val *cbg.Deferred) (SectorOnChainInfo, error) { + var si miner12.SectorOnChainInfo + err := si.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorOnChainInfo{}, err + } + + return fromV12SectorOnChainInfo(si), nil +} + +func (s *state12) PrecommitsMap() (adt.Map, error) { + return adt12.AsMap(s.store, s.PreCommittedSectors, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) PrecommitsMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) PrecommitsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { + var sp miner12.SectorPreCommitOnChainInfo + err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorPreCommitOnChainInfo{}, err + } + + return fromV12SectorPreCommitOnChainInfo(sp), nil +} + +func (s *state12) DecodeSectorPreCommitOnChainInfoToV8(val *cbg.Deferred) (minertypesv8.SectorPreCommitOnChainInfo, error) { + + return minertypesv8.SectorPreCommitOnChainInfo{}, fmt.Errorf("unsupported in actors v9") + +} + +func (s *state12) ForEachPrecommittedSectorV8(cb func(minertypesv8.SectorPreCommitOnChainInfo) error) error { + + return fmt.Errorf("unsupported for actors v9") + +} + +func (s *state12) EraseAllUnproven() error { + + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + + err = dls.ForEach(s.store, func(dindx uint64, dl *miner12.Deadline) error { + ps, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + + var part miner12.Partition + err = ps.ForEach(&part, func(pindx int64) error { + _ = part.ActivateUnproven() + err = ps.Set(uint64(pindx), &part) + return nil + }) + + if err != nil { + return err + } + + dl.Partitions, err = ps.Root() + if err != nil { + return err + } + + return dls.UpdateDeadline(s.store, dindx, dl) + }) + if err != nil { + return err + } + + return s.State.SaveDeadlines(s.store, dls) + +} + +func (d *deadline12) LoadPartition(idx uint64) (Partition, error) { + p, err := d.Deadline.LoadPartition(d.store, idx) + if err != nil { + return nil, err + } + return &partition12{*p, d.store}, nil +} + +func (d *deadline12) ForEachPartition(cb func(uint64, Partition) error) error { + ps, err := d.Deadline.PartitionsArray(d.store) + if err != nil { + return err + } + var part miner12.Partition + return ps.ForEach(&part, func(i int64) error { + return cb(uint64(i), &partition12{part, d.store}) + }) +} + +func (d *deadline12) PartitionsChanged(other Deadline) (bool, error) { + other12, ok := other.(*deadline12) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !d.Deadline.Partitions.Equals(other12.Deadline.Partitions), nil +} + +func (d *deadline12) PartitionsPoSted() (bitfield.BitField, error) { + return d.Deadline.PartitionsPoSted, nil +} + +func (d *deadline12) DisputableProofCount() (uint64, error) { + + ops, err := d.OptimisticProofsSnapshotArray(d.store) + if err != nil { + return 0, err + } + + return ops.Length(), nil + +} + +func (p *partition12) AllSectors() (bitfield.BitField, error) { + return p.Partition.Sectors, nil +} + +func (p *partition12) FaultySectors() (bitfield.BitField, error) { + return p.Partition.Faults, nil +} + +func (p *partition12) RecoveringSectors() (bitfield.BitField, error) { + return p.Partition.Recoveries, nil +} + +func (p *partition12) UnprovenSectors() (bitfield.BitField, error) { + return p.Partition.Unproven, nil +} + +func fromV12SectorOnChainInfo(v12 miner12.SectorOnChainInfo) SectorOnChainInfo { + info := SectorOnChainInfo{ + SectorNumber: v12.SectorNumber, + SealProof: v12.SealProof, + SealedCID: v12.SealedCID, + DealIDs: v12.DealIDs, + Activation: v12.Activation, + Expiration: v12.Expiration, + DealWeight: v12.DealWeight, + VerifiedDealWeight: v12.VerifiedDealWeight, + InitialPledge: v12.InitialPledge, + ExpectedDayReward: v12.ExpectedDayReward, + ExpectedStoragePledge: v12.ExpectedStoragePledge, + + SectorKeyCID: v12.SectorKeyCID, + } + return info +} + +func fromV12SectorPreCommitOnChainInfo(v12 miner12.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v12.Info.SealProof, + SectorNumber: v12.Info.SectorNumber, + SealedCID: v12.Info.SealedCID, + SealRandEpoch: v12.Info.SealRandEpoch, + DealIDs: v12.Info.DealIDs, + Expiration: v12.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v12.PreCommitDeposit, + PreCommitEpoch: v12.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v12.Info.UnsealedCid + + return ret +} + +func (s *state12) GetState() interface{} { + return &s.State +} + +func (s *state12) SectorsAmtBitwidth() int { + return miner12.SectorsAmtBitwidth +} + +func (s *state12) ActorKey() string { + return actors.MinerKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/miner/v13.go b/chain/actors/builtin/miner/v13.go new file mode 100644 index 000000000..62822d8ab --- /dev/null +++ b/chain/actors/builtin/miner/v13.go @@ -0,0 +1,623 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package miner + +import ( + "bytes" + "errors" + "fmt" + + "github.com/filecoin-project/go-bitfield" + rle "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + minertypesv8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + "github.com/filecoin-project/lotus/chain/actors/adt" + + "crypto/sha256" + + builtin13 "github.com/filecoin-project/go-state-types/builtin" + miner13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make13(store adt.Store) (State, error) { + out := state13{store: store} + out.State = miner13.State{} + return &out, nil +} + +type state13 struct { + miner13.State + store adt.Store +} + +type deadline13 struct { + miner13.Deadline + store adt.Store +} + +type partition13 struct { + miner13.Partition + store adt.Store +} + +func (s *state13) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmount, err error) { + defer func() { + if r := recover(); r != nil { + err = xerrors.Errorf("failed to get available balance: %w", r) + available = abi.NewTokenAmount(0) + } + }() + // this panics if the miner doesnt have enough funds to cover their locked pledge + available, err = s.GetAvailableBalance(bal) + return available, err +} + +func (s *state13) VestedFunds(epoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.CheckVestedFunds(s.store, epoch) +} + +func (s *state13) LockedFunds() (LockedFunds, error) { + return LockedFunds{ + VestingFunds: s.State.LockedFunds, + InitialPledgeRequirement: s.State.InitialPledge, + PreCommitDeposits: s.State.PreCommitDeposits, + }, nil +} + +func (s *state13) FeeDebt() (abi.TokenAmount, error) { + return s.State.FeeDebt, nil +} + +func (s *state13) InitialPledge() (abi.TokenAmount, error) { + return s.State.InitialPledge, nil +} + +func (s *state13) PreCommitDeposits() (abi.TokenAmount, error) { + return s.State.PreCommitDeposits, nil +} + +func (s *state13) GetSector(num abi.SectorNumber) (*SectorOnChainInfo, error) { + info, ok, err := s.State.GetSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV13SectorOnChainInfo(*info) + return &ret, nil +} + +func (s *state13) FindSector(num abi.SectorNumber) (*SectorLocation, error) { + dlIdx, partIdx, err := s.State.FindSector(s.store, num) + if err != nil { + return nil, err + } + return &SectorLocation{ + Deadline: dlIdx, + Partition: partIdx, + }, nil +} + +func (s *state13) NumLiveSectors() (uint64, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return 0, err + } + var total uint64 + if err := dls.ForEach(s.store, func(dlIdx uint64, dl *miner13.Deadline) error { + total += dl.LiveSectors + return nil + }); err != nil { + return 0, err + } + return total, nil +} + +// GetSectorExpiration returns the effective expiration of the given sector. +// +// If the sector does not expire early, the Early expiration field is 0. +func (s *state13) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + // NOTE: this can be optimized significantly. + // 1. If the sector is non-faulty, it will expire on-time (can be + // learned from the sector info). + // 2. If it's faulty, it will expire early within the first 42 entries + // of the expiration queue. + + stopErr := errors.New("stop") + out := SectorExpiration{} + err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner13.Deadline) error { + partitions, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + quant := s.State.QuantSpecForDeadline(dlIdx) + var part miner13.Partition + return partitions.ForEach(&part, func(partIdx int64) error { + if found, err := part.Sectors.IsSet(uint64(num)); err != nil { + return err + } else if !found { + return nil + } + if found, err := part.Terminated.IsSet(uint64(num)); err != nil { + return err + } else if found { + // already terminated + return stopErr + } + + q, err := miner13.LoadExpirationQueue(s.store, part.ExpirationsEpochs, quant, miner13.PartitionExpirationAmtBitwidth) + if err != nil { + return err + } + var exp miner13.ExpirationSet + return q.ForEach(&exp, func(epoch int64) error { + if early, err := exp.EarlySectors.IsSet(uint64(num)); err != nil { + return err + } else if early { + out.Early = abi.ChainEpoch(epoch) + return nil + } + if onTime, err := exp.OnTimeSectors.IsSet(uint64(num)); err != nil { + return err + } else if onTime { + out.OnTime = abi.ChainEpoch(epoch) + return stopErr + } + return nil + }) + }) + }) + if err == stopErr { + err = nil + } + if err != nil { + return nil, err + } + if out.Early == 0 && out.OnTime == 0 { + return nil, xerrors.Errorf("failed to find sector %d", num) + } + return &out, nil +} + +func (s *state13) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { + info, ok, err := s.State.GetPrecommittedSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV13SectorPreCommitOnChainInfo(*info) + + return &ret, nil +} + +func (s *state13) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { + precommitted, err := adt13.AsMap(s.store, s.State.PreCommittedSectors, builtin13.DefaultHamtBitwidth) + if err != nil { + return err + } + + var info miner13.SectorPreCommitOnChainInfo + if err := precommitted.ForEach(&info, func(_ string) error { + return cb(fromV13SectorPreCommitOnChainInfo(info)) + }); err != nil { + return err + } + + return nil +} + +func (s *state13) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) { + sectors, err := miner13.LoadSectors(s.store, s.State.Sectors) + if err != nil { + return nil, err + } + + // If no sector numbers are specified, load all. + if snos == nil { + infos := make([]*SectorOnChainInfo, 0, sectors.Length()) + var info13 miner13.SectorOnChainInfo + if err := sectors.ForEach(&info13, func(_ int64) error { + info := fromV13SectorOnChainInfo(info13) + infos = append(infos, &info) + return nil + }); err != nil { + return nil, err + } + return infos, nil + } + + // Otherwise, load selected. + infos13, err := sectors.Load(*snos) + if err != nil { + return nil, err + } + infos := make([]*SectorOnChainInfo, len(infos13)) + for i, info13 := range infos13 { + info := fromV13SectorOnChainInfo(*info13) + infos[i] = &info + } + return infos, nil +} + +func (s *state13) loadAllocatedSectorNumbers() (bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors) + return allocatedSectors, err +} + +func (s *state13) IsAllocated(num abi.SectorNumber) (bool, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return false, err + } + + return allocatedSectors.IsSet(uint64(num)) +} + +func (s *state13) GetProvingPeriodStart() (abi.ChainEpoch, error) { + return s.State.ProvingPeriodStart, nil +} + +func (s *state13) UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return nil, err + } + + allocatedRuns, err := allocatedSectors.RunIterator() + if err != nil { + return nil, err + } + + unallocatedRuns, err := rle.Subtract( + &rle.RunSliceIterator{Runs: []rle.Run{{Val: true, Len: abi.MaxSectorNumber}}}, + allocatedRuns, + ) + if err != nil { + return nil, err + } + + iter, err := rle.BitsFromRuns(unallocatedRuns) + if err != nil { + return nil, err + } + + sectors := make([]abi.SectorNumber, 0, count) + for iter.HasNext() && len(sectors) < count { + nextNo, err := iter.Next() + if err != nil { + return nil, err + } + sectors = append(sectors, abi.SectorNumber(nextNo)) + } + + return sectors, nil +} + +func (s *state13) GetAllocatedSectors() (*bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + if err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors); err != nil { + return nil, err + } + + return &allocatedSectors, nil +} + +func (s *state13) LoadDeadline(idx uint64) (Deadline, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + dl, err := dls.LoadDeadline(s.store, idx) + if err != nil { + return nil, err + } + return &deadline13{*dl, s.store}, nil +} + +func (s *state13) ForEachDeadline(cb func(uint64, Deadline) error) error { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + return dls.ForEach(s.store, func(i uint64, dl *miner13.Deadline) error { + return cb(i, &deadline13{*dl, s.store}) + }) +} + +func (s *state13) NumDeadlines() (uint64, error) { + return miner13.WPoStPeriodDeadlines, nil +} + +func (s *state13) DeadlinesChanged(other State) (bool, error) { + other13, ok := other.(*state13) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !s.State.Deadlines.Equals(other13.Deadlines), nil +} + +func (s *state13) MinerInfoChanged(other State) (bool, error) { + other0, ok := other.(*state13) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Info.Equals(other0.State.Info), nil +} + +func (s *state13) Info() (MinerInfo, error) { + info, err := s.State.GetInfo(s.store) + if err != nil { + return MinerInfo{}, err + } + + mi := MinerInfo{ + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: info.WindowPoStProofType, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + } + + return mi, nil +} + +func (s *state13) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { + return s.State.RecordedDeadlineInfo(epoch), nil +} + +func (s *state13) DeadlineCronActive() (bool, error) { + return s.State.DeadlineCronActive, nil +} + +func (s *state13) SectorsArray() (adt.Array, error) { + return adt13.AsArray(s.store, s.Sectors, miner13.SectorsAmtBitwidth) +} + +func (s *state13) DecodeSectorOnChainInfo(val *cbg.Deferred) (SectorOnChainInfo, error) { + var si miner13.SectorOnChainInfo + err := si.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorOnChainInfo{}, err + } + + return fromV13SectorOnChainInfo(si), nil +} + +func (s *state13) PrecommitsMap() (adt.Map, error) { + return adt13.AsMap(s.store, s.PreCommittedSectors, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) PrecommitsMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) PrecommitsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) DecodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { + var sp miner13.SectorPreCommitOnChainInfo + err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorPreCommitOnChainInfo{}, err + } + + return fromV13SectorPreCommitOnChainInfo(sp), nil +} + +func (s *state13) DecodeSectorPreCommitOnChainInfoToV8(val *cbg.Deferred) (minertypesv8.SectorPreCommitOnChainInfo, error) { + + return minertypesv8.SectorPreCommitOnChainInfo{}, fmt.Errorf("unsupported in actors v9") + +} + +func (s *state13) ForEachPrecommittedSectorV8(cb func(minertypesv8.SectorPreCommitOnChainInfo) error) error { + + return fmt.Errorf("unsupported for actors v9") + +} + +func (s *state13) EraseAllUnproven() error { + + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + + err = dls.ForEach(s.store, func(dindx uint64, dl *miner13.Deadline) error { + ps, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + + var part miner13.Partition + err = ps.ForEach(&part, func(pindx int64) error { + _ = part.ActivateUnproven() + err = ps.Set(uint64(pindx), &part) + return nil + }) + + if err != nil { + return err + } + + dl.Partitions, err = ps.Root() + if err != nil { + return err + } + + return dls.UpdateDeadline(s.store, dindx, dl) + }) + if err != nil { + return err + } + + return s.State.SaveDeadlines(s.store, dls) + +} + +func (d *deadline13) LoadPartition(idx uint64) (Partition, error) { + p, err := d.Deadline.LoadPartition(d.store, idx) + if err != nil { + return nil, err + } + return &partition13{*p, d.store}, nil +} + +func (d *deadline13) ForEachPartition(cb func(uint64, Partition) error) error { + ps, err := d.Deadline.PartitionsArray(d.store) + if err != nil { + return err + } + var part miner13.Partition + return ps.ForEach(&part, func(i int64) error { + return cb(uint64(i), &partition13{part, d.store}) + }) +} + +func (d *deadline13) PartitionsChanged(other Deadline) (bool, error) { + other13, ok := other.(*deadline13) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !d.Deadline.Partitions.Equals(other13.Deadline.Partitions), nil +} + +func (d *deadline13) PartitionsPoSted() (bitfield.BitField, error) { + return d.Deadline.PartitionsPoSted, nil +} + +func (d *deadline13) DisputableProofCount() (uint64, error) { + + ops, err := d.OptimisticProofsSnapshotArray(d.store) + if err != nil { + return 0, err + } + + return ops.Length(), nil + +} + +func (p *partition13) AllSectors() (bitfield.BitField, error) { + return p.Partition.Sectors, nil +} + +func (p *partition13) FaultySectors() (bitfield.BitField, error) { + return p.Partition.Faults, nil +} + +func (p *partition13) RecoveringSectors() (bitfield.BitField, error) { + return p.Partition.Recoveries, nil +} + +func (p *partition13) UnprovenSectors() (bitfield.BitField, error) { + return p.Partition.Unproven, nil +} + +func fromV13SectorOnChainInfo(v13 miner13.SectorOnChainInfo) SectorOnChainInfo { + info := SectorOnChainInfo{ + SectorNumber: v13.SectorNumber, + SealProof: v13.SealProof, + SealedCID: v13.SealedCID, + DealIDs: v13.DealIDs, + Activation: v13.Activation, + Expiration: v13.Expiration, + DealWeight: v13.DealWeight, + VerifiedDealWeight: v13.VerifiedDealWeight, + InitialPledge: v13.InitialPledge, + ExpectedDayReward: v13.ExpectedDayReward, + ExpectedStoragePledge: v13.ExpectedStoragePledge, + + SectorKeyCID: v13.SectorKeyCID, + } + return info +} + +func fromV13SectorPreCommitOnChainInfo(v13 miner13.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v13.Info.SealProof, + SectorNumber: v13.Info.SectorNumber, + SealedCID: v13.Info.SealedCID, + SealRandEpoch: v13.Info.SealRandEpoch, + DealIDs: v13.Info.DealIDs, + Expiration: v13.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v13.PreCommitDeposit, + PreCommitEpoch: v13.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v13.Info.UnsealedCid + + return ret +} + +func (s *state13) GetState() interface{} { + return &s.State +} + +func (s *state13) SectorsAmtBitwidth() int { + return miner13.SectorsAmtBitwidth +} + +func (s *state13) ActorKey() string { + return actors.MinerKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/multisig/multisig.go b/chain/actors/builtin/multisig/multisig.go index 961be66f2..52d1d82ff 100644 --- a/chain/actors/builtin/multisig/multisig.go +++ b/chain/actors/builtin/multisig/multisig.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/cbor" "github.com/ipfs/go-cid" - msig11 "github.com/filecoin-project/go-state-types/builtin/v11/multisig" + msig13 "github.com/filecoin-project/go-state-types/builtin/v13/multisig" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -56,6 +56,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -110,19 +116,19 @@ type State interface { decodeTransaction(val *cbg.Deferred) (Transaction, error) } -type Transaction = msig11.Transaction +type Transaction = msig13.Transaction var Methods = builtintypes.MethodsMultisig // these types are the same between v0 and v6 -type ProposalHashData = msig11.ProposalHashData -type ProposeReturn = msig11.ProposeReturn -type ProposeParams = msig11.ProposeParams -type ApproveReturn = msig11.ApproveReturn -type TxnIDParams = msig11.TxnIDParams +type ProposalHashData = msig13.ProposalHashData +type ProposeReturn = msig13.ProposeReturn +type ProposeParams = msig13.ProposeParams +type ApproveReturn = msig13.ApproveReturn +type TxnIDParams = msig13.TxnIDParams func txnParams(id uint64, data *ProposalHashData) ([]byte, error) { - params := msig11.TxnIDParams{ID: msig11.TxnID(id)} + params := msig13.TxnIDParams{ID: msig13.TxnID(id)} if data != nil { if data.Requester.Protocol() != address.ID { return nil, fmt.Errorf("proposer address must be an ID address, was %s", data.Requester) @@ -157,6 +163,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -173,5 +181,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/multisig/v12.go b/chain/actors/builtin/multisig/v12.go new file mode 100644 index 000000000..ecc3825d1 --- /dev/null +++ b/chain/actors/builtin/multisig/v12.go @@ -0,0 +1,130 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package multisig + +import ( + "bytes" + "encoding/binary" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin12 "github.com/filecoin-project/go-state-types/builtin" + msig12 "github.com/filecoin-project/go-state-types/builtin/v12/multisig" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state12 struct { + msig12.State + store adt.Store +} + +func (s *state12) LockedBalance(currEpoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.State.AmountLocked(currEpoch - s.State.StartEpoch), nil +} + +func (s *state12) StartEpoch() (abi.ChainEpoch, error) { + return s.State.StartEpoch, nil +} + +func (s *state12) UnlockDuration() (abi.ChainEpoch, error) { + return s.State.UnlockDuration, nil +} + +func (s *state12) InitialBalance() (abi.TokenAmount, error) { + return s.State.InitialBalance, nil +} + +func (s *state12) Threshold() (uint64, error) { + return s.State.NumApprovalsThreshold, nil +} + +func (s *state12) Signers() ([]address.Address, error) { + return s.State.Signers, nil +} + +func (s *state12) ForEachPendingTxn(cb func(id int64, txn Transaction) error) error { + arr, err := adt12.AsMap(s.store, s.State.PendingTxns, builtin12.DefaultHamtBitwidth) + if err != nil { + return err + } + var out msig12.Transaction + return arr.ForEach(&out, func(key string) error { + txid, n := binary.Varint([]byte(key)) + if n <= 0 { + return fmt.Errorf("invalid pending transaction key: %v", key) + } + return cb(txid, (Transaction)(out)) //nolint:unconvert + }) +} + +func (s *state12) PendingTxnChanged(other State) (bool, error) { + other12, ok := other.(*state12) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.PendingTxns.Equals(other12.PendingTxns), nil +} + +func (s *state12) PendingTransactionsMap() (adt.Map, error) { + return adt12.AsMap(s.store, s.PendingTxns, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) PendingTransactionsMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) PendingTransactionsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) decodeTransaction(val *cbg.Deferred) (Transaction, error) { + var tx msig12.Transaction + if err := tx.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Transaction{}, err + } + return Transaction(tx), nil +} + +func (s *state12) ActorKey() string { + return actors.MultisigKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/multisig/v13.go b/chain/actors/builtin/multisig/v13.go new file mode 100644 index 000000000..5d70401ce --- /dev/null +++ b/chain/actors/builtin/multisig/v13.go @@ -0,0 +1,130 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package multisig + +import ( + "bytes" + "encoding/binary" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin13 "github.com/filecoin-project/go-state-types/builtin" + msig13 "github.com/filecoin-project/go-state-types/builtin/v13/multisig" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state13 struct { + msig13.State + store adt.Store +} + +func (s *state13) LockedBalance(currEpoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.State.AmountLocked(currEpoch - s.State.StartEpoch), nil +} + +func (s *state13) StartEpoch() (abi.ChainEpoch, error) { + return s.State.StartEpoch, nil +} + +func (s *state13) UnlockDuration() (abi.ChainEpoch, error) { + return s.State.UnlockDuration, nil +} + +func (s *state13) InitialBalance() (abi.TokenAmount, error) { + return s.State.InitialBalance, nil +} + +func (s *state13) Threshold() (uint64, error) { + return s.State.NumApprovalsThreshold, nil +} + +func (s *state13) Signers() ([]address.Address, error) { + return s.State.Signers, nil +} + +func (s *state13) ForEachPendingTxn(cb func(id int64, txn Transaction) error) error { + arr, err := adt13.AsMap(s.store, s.State.PendingTxns, builtin13.DefaultHamtBitwidth) + if err != nil { + return err + } + var out msig13.Transaction + return arr.ForEach(&out, func(key string) error { + txid, n := binary.Varint([]byte(key)) + if n <= 0 { + return fmt.Errorf("invalid pending transaction key: %v", key) + } + return cb(txid, (Transaction)(out)) //nolint:unconvert + }) +} + +func (s *state13) PendingTxnChanged(other State) (bool, error) { + other13, ok := other.(*state13) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.PendingTxns.Equals(other13.PendingTxns), nil +} + +func (s *state13) PendingTransactionsMap() (adt.Map, error) { + return adt13.AsMap(s.store, s.PendingTxns, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) PendingTransactionsMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) PendingTransactionsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) decodeTransaction(val *cbg.Deferred) (Transaction, error) { + var tx msig13.Transaction + if err := tx.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Transaction{}, err + } + return Transaction(tx), nil +} + +func (s *state13) ActorKey() string { + return actors.MultisigKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index 704e304a6..02c4dc265 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -32,14 +32,14 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin11 "github.com/filecoin-project/go-state-types/builtin" + builtin13 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lily/chain/actors" ) var ( - Address = builtin11.StoragePowerActorAddr - Methods = builtin11.MethodsPower + Address = builtin13.StoragePowerActorAddr + Methods = builtin13.MethodsPower ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -62,6 +62,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -149,6 +155,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -165,5 +173,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/power/v12.go b/chain/actors/builtin/power/v12.go new file mode 100644 index 000000000..9a1264f57 --- /dev/null +++ b/chain/actors/builtin/power/v12.go @@ -0,0 +1,186 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package power + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + "crypto/sha256" + + builtin12 "github.com/filecoin-project/go-state-types/builtin" + power12 "github.com/filecoin-project/go-state-types/builtin/v12/power" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state12 struct { + power12.State + store adt.Store +} + +func (s *state12) TotalLocked() (abi.TokenAmount, error) { + return s.TotalPledgeCollateral, nil +} + +func (s *state12) TotalPower() (Claim, error) { + return Claim{ + RawBytePower: s.TotalRawBytePower, + QualityAdjPower: s.TotalQualityAdjPower, + }, nil +} + +// Committed power to the network. Includes miners below the minimum threshold. +func (s *state12) TotalCommitted() (Claim, error) { + return Claim{ + RawBytePower: s.TotalBytesCommitted, + QualityAdjPower: s.TotalQABytesCommitted, + }, nil +} + +func (s *state12) MinerPower(addr address.Address) (Claim, bool, error) { + claims, err := s.ClaimsMap() + if err != nil { + return Claim{}, false, err + } + var claim power12.Claim + ok, err := claims.Get(abi.AddrKey(addr), &claim) + if err != nil { + return Claim{}, false, err + } + return Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }, ok, nil +} + +func (s *state12) MinerNominalPowerMeetsConsensusMinimum(a address.Address) (bool, error) { + return s.State.MinerNominalPowerMeetsConsensusMinimum(s.store, a) +} + +func (s *state12) TotalPowerSmoothed() (builtin.FilterEstimate, error) { + return builtin.FilterEstimate(s.State.ThisEpochQAPowerSmoothed), nil +} + +func (s *state12) MinerCounts() (uint64, uint64, error) { + return uint64(s.State.MinerAboveMinPowerCount), uint64(s.State.MinerCount), nil +} + +func (s *state12) ListAllMiners() ([]address.Address, error) { + claims, err := s.ClaimsMap() + if err != nil { + return nil, err + } + + var miners []address.Address + err = claims.ForEach(nil, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + miners = append(miners, a) + return nil + }) + if err != nil { + return nil, err + } + + return miners, nil +} + +func (s *state12) ForEachClaim(cb func(miner address.Address, claim Claim) error) error { + claims, err := s.ClaimsMap() + if err != nil { + return err + } + + var claim power12.Claim + return claims.ForEach(&claim, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + return cb(a, Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }) + }) +} + +func (s *state12) ClaimsChanged(other State) (bool, error) { + other12, ok := other.(*state12) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Claims.Equals(other12.State.Claims), nil +} + +func (s *state12) ClaimsMap() (adt.Map, error) { + return adt12.AsMap(s.store, s.Claims, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) ClaimsMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) ClaimsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) decodeClaim(val *cbg.Deferred) (Claim, error) { + var ci power12.Claim + if err := ci.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Claim{}, err + } + return fromV12Claim(ci), nil +} + +func fromV12Claim(v12 power12.Claim) Claim { + return Claim{ + RawBytePower: v12.RawBytePower, + QualityAdjPower: v12.QualityAdjPower, + } +} + +func (s *state12) ActorKey() string { + return actors.PowerKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/power/v13.go b/chain/actors/builtin/power/v13.go new file mode 100644 index 000000000..c8620a3d8 --- /dev/null +++ b/chain/actors/builtin/power/v13.go @@ -0,0 +1,186 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package power + +import ( + "bytes" + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/lily/chain/actors" + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + "crypto/sha256" + + builtin13 "github.com/filecoin-project/go-state-types/builtin" + power13 "github.com/filecoin-project/go-state-types/builtin/v13/power" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state13 struct { + power13.State + store adt.Store +} + +func (s *state13) TotalLocked() (abi.TokenAmount, error) { + return s.TotalPledgeCollateral, nil +} + +func (s *state13) TotalPower() (Claim, error) { + return Claim{ + RawBytePower: s.TotalRawBytePower, + QualityAdjPower: s.TotalQualityAdjPower, + }, nil +} + +// Committed power to the network. Includes miners below the minimum threshold. +func (s *state13) TotalCommitted() (Claim, error) { + return Claim{ + RawBytePower: s.TotalBytesCommitted, + QualityAdjPower: s.TotalQABytesCommitted, + }, nil +} + +func (s *state13) MinerPower(addr address.Address) (Claim, bool, error) { + claims, err := s.ClaimsMap() + if err != nil { + return Claim{}, false, err + } + var claim power13.Claim + ok, err := claims.Get(abi.AddrKey(addr), &claim) + if err != nil { + return Claim{}, false, err + } + return Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }, ok, nil +} + +func (s *state13) MinerNominalPowerMeetsConsensusMinimum(a address.Address) (bool, error) { + return s.State.MinerNominalPowerMeetsConsensusMinimum(s.store, a) +} + +func (s *state13) TotalPowerSmoothed() (builtin.FilterEstimate, error) { + return builtin.FilterEstimate(s.State.ThisEpochQAPowerSmoothed), nil +} + +func (s *state13) MinerCounts() (uint64, uint64, error) { + return uint64(s.State.MinerAboveMinPowerCount), uint64(s.State.MinerCount), nil +} + +func (s *state13) ListAllMiners() ([]address.Address, error) { + claims, err := s.ClaimsMap() + if err != nil { + return nil, err + } + + var miners []address.Address + err = claims.ForEach(nil, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + miners = append(miners, a) + return nil + }) + if err != nil { + return nil, err + } + + return miners, nil +} + +func (s *state13) ForEachClaim(cb func(miner address.Address, claim Claim) error) error { + claims, err := s.ClaimsMap() + if err != nil { + return err + } + + var claim power13.Claim + return claims.ForEach(&claim, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + return cb(a, Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }) + }) +} + +func (s *state13) ClaimsChanged(other State) (bool, error) { + other13, ok := other.(*state13) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Claims.Equals(other13.State.Claims), nil +} + +func (s *state13) ClaimsMap() (adt.Map, error) { + return adt13.AsMap(s.store, s.Claims, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) ClaimsMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) ClaimsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) decodeClaim(val *cbg.Deferred) (Claim, error) { + var ci power13.Claim + if err := ci.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Claim{}, err + } + return fromV13Claim(ci), nil +} + +func fromV13Claim(v13 power13.Claim) Claim { + return Claim{ + RawBytePower: v13.RawBytePower, + QualityAdjPower: v13.QualityAdjPower, + } +} + +func (s *state13) ActorKey() string { + return actors.PowerKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/reward/reward.go b/chain/actors/builtin/reward/reward.go index 43ee33de1..846ec764d 100644 --- a/chain/actors/builtin/reward/reward.go +++ b/chain/actors/builtin/reward/reward.go @@ -23,7 +23,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin11 "github.com/filecoin-project/go-state-types/builtin" + builtin13 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/lotus/chain/types" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin11.RewardActorAddr - Methods = builtin11.MethodsReward + Address = builtin13.RewardActorAddr + Methods = builtin13.MethodsReward ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -59,6 +59,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -128,6 +134,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -144,5 +152,7 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/chain/actors/builtin/reward/v12.go b/chain/actors/builtin/reward/v12.go new file mode 100644 index 000000000..479976e34 --- /dev/null +++ b/chain/actors/builtin/reward/v12.go @@ -0,0 +1,109 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package reward + +import ( + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner" + reward12 "github.com/filecoin-project/go-state-types/builtin/v12/reward" + smoothing12 "github.com/filecoin-project/go-state-types/builtin/v12/util/smoothing" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state12 struct { + reward12.State + store adt.Store +} + +func (s *state12) ThisEpochReward() (abi.TokenAmount, error) { + return s.State.ThisEpochReward, nil +} + +func (s *state12) ThisEpochRewardSmoothed() (builtin.FilterEstimate, error) { + + return builtin.FilterEstimate{ + PositionEstimate: s.State.ThisEpochRewardSmoothed.PositionEstimate, + VelocityEstimate: s.State.ThisEpochRewardSmoothed.VelocityEstimate, + }, nil + +} + +func (s *state12) ThisEpochBaselinePower() (abi.StoragePower, error) { + return s.State.ThisEpochBaselinePower, nil +} + +func (s *state12) TotalStoragePowerReward() (abi.TokenAmount, error) { + return s.State.TotalStoragePowerReward, nil +} + +func (s *state12) EffectiveBaselinePower() (abi.StoragePower, error) { + return s.State.EffectiveBaselinePower, nil +} + +func (s *state12) EffectiveNetworkTime() (abi.ChainEpoch, error) { + return s.State.EffectiveNetworkTime, nil +} + +func (s *state12) CumsumBaseline() (reward12.Spacetime, error) { + return s.State.CumsumBaseline, nil +} + +func (s *state12) CumsumRealized() (reward12.Spacetime, error) { + return s.State.CumsumRealized, nil +} + +func (s *state12) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { + return miner12.InitialPledgeForPower( + qaPower, + s.State.ThisEpochBaselinePower, + s.State.ThisEpochRewardSmoothed, + smoothing12.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + circSupply, + ), nil +} + +func (s *state12) PreCommitDepositForPower(networkQAPower builtin.FilterEstimate, sectorWeight abi.StoragePower) (abi.TokenAmount, error) { + return miner12.PreCommitDepositForPower(s.State.ThisEpochRewardSmoothed, + smoothing12.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + sectorWeight), nil +} + +func (s *state12) ActorKey() string { + return actors.RewardKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/reward/v13.go b/chain/actors/builtin/reward/v13.go new file mode 100644 index 000000000..fff886fed --- /dev/null +++ b/chain/actors/builtin/reward/v13.go @@ -0,0 +1,109 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package reward + +import ( + "fmt" + + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors" + "github.com/filecoin-project/lily/chain/actors/adt" + "github.com/filecoin-project/lily/chain/actors/builtin" + + miner13 "github.com/filecoin-project/go-state-types/builtin/v13/miner" + reward13 "github.com/filecoin-project/go-state-types/builtin/v13/reward" + smoothing13 "github.com/filecoin-project/go-state-types/builtin/v13/util/smoothing" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state13 struct { + reward13.State + store adt.Store +} + +func (s *state13) ThisEpochReward() (abi.TokenAmount, error) { + return s.State.ThisEpochReward, nil +} + +func (s *state13) ThisEpochRewardSmoothed() (builtin.FilterEstimate, error) { + + return builtin.FilterEstimate{ + PositionEstimate: s.State.ThisEpochRewardSmoothed.PositionEstimate, + VelocityEstimate: s.State.ThisEpochRewardSmoothed.VelocityEstimate, + }, nil + +} + +func (s *state13) ThisEpochBaselinePower() (abi.StoragePower, error) { + return s.State.ThisEpochBaselinePower, nil +} + +func (s *state13) TotalStoragePowerReward() (abi.TokenAmount, error) { + return s.State.TotalStoragePowerReward, nil +} + +func (s *state13) EffectiveBaselinePower() (abi.StoragePower, error) { + return s.State.EffectiveBaselinePower, nil +} + +func (s *state13) EffectiveNetworkTime() (abi.ChainEpoch, error) { + return s.State.EffectiveNetworkTime, nil +} + +func (s *state13) CumsumBaseline() (reward13.Spacetime, error) { + return s.State.CumsumBaseline, nil +} + +func (s *state13) CumsumRealized() (reward13.Spacetime, error) { + return s.State.CumsumRealized, nil +} + +func (s *state13) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { + return miner13.InitialPledgeForPower( + qaPower, + s.State.ThisEpochBaselinePower, + s.State.ThisEpochRewardSmoothed, + smoothing13.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + circSupply, + ), nil +} + +func (s *state13) PreCommitDepositForPower(networkQAPower builtin.FilterEstimate, sectorWeight abi.StoragePower) (abi.TokenAmount, error) { + return miner13.PreCommitDepositForPower(s.State.ThisEpochRewardSmoothed, + smoothing13.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + sectorWeight), nil +} + +func (s *state13) ActorKey() string { + return actors.RewardKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/verifreg/v12.go b/chain/actors/builtin/verifreg/v12.go new file mode 100644 index 000000000..07297d27a --- /dev/null +++ b/chain/actors/builtin/verifreg/v12.go @@ -0,0 +1,172 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package verifreg + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin12 "github.com/filecoin-project/go-state-types/builtin" + adt12 "github.com/filecoin-project/go-state-types/builtin/v12/util/adt" + verifreg12 "github.com/filecoin-project/go-state-types/builtin/v12/verifreg" + + "github.com/filecoin-project/go-state-types/big" + + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lily/chain/actors" +) + +var _ State = (*state12)(nil) + +func load12(store adt.Store, root cid.Cid) (State, error) { + out := state12{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state12 struct { + verifreg12.State + store adt.Store +} + +func (s *state12) ActorKey() string { + return actors.VerifregKey +} + +func (s *state12) ActorVersion() actors.Version { + return actors.Version12 +} + +func (s *state12) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func (s *state12) VerifiedClientsMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) VerifiedClientsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) VerifiedClientsMap() (adt.Map, error) { + + return nil, fmt.Errorf("unsupported in actors v12") + +} + +func (s *state12) VerifiersMap() (adt.Map, error) { + return adt12.AsMap(s.store, s.Verifiers, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) VerifiersMapBitWidth() int { + + return builtin12.DefaultHamtBitwidth + +} + +func (s *state12) VerifiersMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state12) RootKey() (address.Address, error) { + return s.State.RootKey, nil +} + +func (s *state12) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + + return false, big.Zero(), fmt.Errorf("unsupported in actors v12") + +} + +func (s *state12) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version12, s.VerifiersMap, addr) +} + +func (s *state12) RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) { + return getRemoveDataCapProposalID(s.store, actors.Version12, s.removeDataCapProposalIDs, verifier, client) +} + +func (s *state12) ForEachVerifier(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachCap(s.store, actors.Version12, s.VerifiersMap, cb) +} + +func (s *state12) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + + return fmt.Errorf("unsupported in actors v12") + +} + +func (s *state12) removeDataCapProposalIDs() (adt.Map, error) { + return adt12.AsMap(s.store, s.RemoveDataCapProposalIDs, builtin12.DefaultHamtBitwidth) +} + +func (s *state12) GetState() interface{} { + return &s.State +} + +func (s *state12) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg12.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state12) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v12Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v12Map)) + for k, v := range v12Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err + +} + +func (s *state12) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { + + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg12.ClaimId(claimId)) + return (*Claim)(claim), ok, err + +} + +func (s *state12) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v12Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v12Map)) + for k, v := range v12Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + +} diff --git a/chain/actors/builtin/verifreg/v13.go b/chain/actors/builtin/verifreg/v13.go new file mode 100644 index 000000000..1675ebd4d --- /dev/null +++ b/chain/actors/builtin/verifreg/v13.go @@ -0,0 +1,172 @@ +// Code generated by: `make actors-gen`. DO NOT EDIT. +package verifreg + +import ( + "fmt" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lily/chain/actors/adt" + + "crypto/sha256" + + builtin13 "github.com/filecoin-project/go-state-types/builtin" + adt13 "github.com/filecoin-project/go-state-types/builtin/v13/util/adt" + verifreg13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" + + "github.com/filecoin-project/go-state-types/big" + + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lily/chain/actors" +) + +var _ State = (*state13)(nil) + +func load13(store adt.Store, root cid.Cid) (State, error) { + out := state13{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +type state13 struct { + verifreg13.State + store adt.Store +} + +func (s *state13) ActorKey() string { + return actors.VerifregKey +} + +func (s *state13) ActorVersion() actors.Version { + return actors.Version13 +} + +func (s *state13) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} + +func (s *state13) VerifiedClientsMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) VerifiedClientsMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) VerifiedClientsMap() (adt.Map, error) { + + return nil, fmt.Errorf("unsupported in actors v13") + +} + +func (s *state13) VerifiersMap() (adt.Map, error) { + return adt13.AsMap(s.store, s.Verifiers, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) VerifiersMapBitWidth() int { + + return builtin13.DefaultHamtBitwidth + +} + +func (s *state13) VerifiersMapHashFunction() func(input []byte) []byte { + + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } + +} + +func (s *state13) RootKey() (address.Address, error) { + return s.State.RootKey, nil +} + +func (s *state13) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + + return false, big.Zero(), fmt.Errorf("unsupported in actors v13") + +} + +func (s *state13) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version13, s.VerifiersMap, addr) +} + +func (s *state13) RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) { + return getRemoveDataCapProposalID(s.store, actors.Version13, s.removeDataCapProposalIDs, verifier, client) +} + +func (s *state13) ForEachVerifier(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachCap(s.store, actors.Version13, s.VerifiersMap, cb) +} + +func (s *state13) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + + return fmt.Errorf("unsupported in actors v13") + +} + +func (s *state13) removeDataCapProposalIDs() (adt.Map, error) { + return adt13.AsMap(s.store, s.RemoveDataCapProposalIDs, builtin13.DefaultHamtBitwidth) +} + +func (s *state13) GetState() interface{} { + return &s.State +} + +func (s *state13) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg13.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state13) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v13Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v13Map)) + for k, v := range v13Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err + +} + +func (s *state13) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { + + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg13.ClaimId(claimId)) + return (*Claim)(claim), ok, err + +} + +func (s *state13) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v13Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v13Map)) + for k, v := range v13Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + +} diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index e7c961c2a..8d9a70346 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -24,7 +24,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" - builtin11 "github.com/filecoin-project/go-state-types/builtin" + builtin13 "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" lotusactors "github.com/filecoin-project/lotus/chain/actors" @@ -35,8 +35,8 @@ import ( ) var ( - Address = builtin11.VerifiedRegistryActorAddr - Methods = builtin11.MethodsVerifiedRegistry + Address = builtin13.VerifiedRegistryActorAddr + Methods = builtin13.MethodsVerifiedRegistry ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -59,6 +59,12 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actors.Version11: return load11(store, act.Head) + case actors.Version12: + return load12(store, act.Head) + + case actors.Version13: + return load13(store, act.Head) + } } @@ -147,6 +153,8 @@ func AllCodes() []cid.Cid { (&state9{}).Code(), (&state10{}).Code(), (&state11{}).Code(), + (&state12{}).Code(), + (&state13{}).Code(), } } @@ -163,6 +171,8 @@ func VersionCodes() map[actors.Version]cid.Cid { actors.Version9: (&state9{}).Code(), actors.Version10: (&state10{}).Code(), actors.Version11: (&state11{}).Code(), + actors.Version12: (&state12{}).Code(), + actors.Version13: (&state13{}).Code(), } } diff --git a/go.mod b/go.mod index d577194c2..85a4f4e70 100644 --- a/go.mod +++ b/go.mod @@ -13,8 +13,8 @@ require ( github.com/filecoin-project/go-hamt-ipld/v3 v3.1.1-0.20220505191157-d7766f8628ec github.com/filecoin-project/go-jsonrpc v0.2.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 - github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 + github.com/filecoin-project/go-state-types v0.10.0-rc3.0.20230224225638-2fa7a438fd4a + github.com/filecoin-project/lotus v1.20.0-hyperspace-nv21-hotfix-01 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 github.com/filecoin-project/specs-actors/v3 v3.1.2 @@ -26,7 +26,7 @@ require ( github.com/go-pg/migrations/v8 v8.0.1 github.com/go-pg/pg/v10 v10.10.6 github.com/hashicorp/golang-lru v0.5.4 - github.com/ipfs/go-block-format v0.0.3 + github.com/ipfs/go-block-format v0.1.1 // indirect github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-fs-lock v0.0.7 github.com/ipfs/go-ipfs-blockstore v1.2.0 @@ -39,11 +39,11 @@ require ( github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/minio/sha256-simd v1.0.0 github.com/mitchellh/go-homedir v1.1.0 - github.com/multiformats/go-multiaddr v0.7.0 + github.com/multiformats/go-multiaddr v0.8.0 github.com/multiformats/go-multihash v0.2.1 github.com/prometheus/client_golang v1.13.0 github.com/raulk/clock v1.1.0 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 github.com/urfave/cli/v2 v2.16.3 github.com/whyrusleeping/cbor-gen v0.0.0-20221021053955-c138aae13722 go.opencensus.io v0.23.0 @@ -67,8 +67,9 @@ require ( github.com/hibiken/asynq v0.23.0 github.com/hibiken/asynq/x v0.0.0-20220413130846-5c723f597e01 github.com/ipfs/go-ipld-format v0.4.0 + github.com/ipfs/go-libipfs v0.4.1 github.com/jedib0t/go-pretty/v6 v6.2.7 - github.com/libp2p/go-libp2p v0.23.2 + github.com/libp2p/go-libp2p v0.23.4 github.com/multiformats/go-varint v0.0.6 go.opentelemetry.io/otel/trace v1.11.1 go.uber.org/atomic v1.10.0 @@ -129,7 +130,7 @@ require ( github.com/filecoin-project/go-ds-versioning v0.1.2 // indirect github.com/filecoin-project/go-fil-commcid v0.1.0 // indirect github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 // indirect - github.com/filecoin-project/go-fil-markets v1.25.2 // indirect + github.com/filecoin-project/go-fil-markets v1.25.3 // indirect github.com/filecoin-project/go-hamt-ipld v0.1.5 // indirect github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 // indirect github.com/filecoin-project/go-legs v0.4.4 // indirect @@ -137,10 +138,8 @@ require ( github.com/filecoin-project/go-statemachine v1.0.2 // indirect github.com/filecoin-project/go-statestore v0.2.0 // indirect github.com/filecoin-project/go-storedcounter v0.1.0 // indirect - github.com/filecoin-project/index-provider v0.9.1 // indirect github.com/filecoin-project/pubsub v1.0.0 // indirect github.com/filecoin-project/specs-actors/v8 v8.0.1 // indirect - github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 // indirect github.com/flynn/noise v1.0.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect @@ -182,7 +181,6 @@ require ( github.com/icza/backscanner v0.0.0-20210726202459-ac2ffc679f94 // indirect github.com/ipfs/bbloom v0.0.4 // indirect github.com/ipfs/go-bitfield v1.0.0 // indirect - github.com/ipfs/go-bitswap v0.10.2 // indirect github.com/ipfs/go-blockservice v0.4.0 // indirect github.com/ipfs/go-cidutil v0.1.0 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect @@ -201,8 +199,8 @@ require ( github.com/ipfs/go-ipfs-files v0.1.1 // indirect github.com/ipfs/go-ipfs-http-client v0.4.0 // indirect github.com/ipfs/go-ipfs-posinfo v0.0.1 // indirect - github.com/ipfs/go-ipfs-pq v0.0.2 // indirect - github.com/ipfs/go-ipfs-routing v0.2.1 // indirect + github.com/ipfs/go-ipfs-pq v0.0.3 // indirect + github.com/ipfs/go-ipfs-routing v0.3.0 // indirect github.com/ipfs/go-ipfs-util v0.0.2 // indirect github.com/ipfs/go-ipld-legacy v0.1.1 // indirect github.com/ipfs/go-ipns v0.3.0 // indirect @@ -210,7 +208,7 @@ require ( github.com/ipfs/go-merkledag v0.8.1 // indirect github.com/ipfs/go-metrics-interface v0.0.1 // indirect github.com/ipfs/go-path v0.3.0 // indirect - github.com/ipfs/go-peertaskqueue v0.8.0 // indirect + github.com/ipfs/go-peertaskqueue v0.8.1 // indirect github.com/ipfs/go-unixfs v0.4.0 // indirect github.com/ipfs/go-unixfsnode v1.4.0 // indirect github.com/ipfs/go-verifcid v0.0.2 // indirect @@ -220,6 +218,8 @@ require ( github.com/ipld/go-ipld-adl-hamt v0.0.0-20220616142416-9004dbd839e0 // indirect github.com/ipld/go-ipld-prime v0.20.0 // indirect github.com/ipld/go-ipld-selector-text-lite v0.0.1 // indirect + github.com/ipni/index-provider v0.10.0 // indirect + github.com/ipni/storetheindex v0.5.3-0.20221203123030-16745cb63f15 // indirect github.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c // indirect @@ -306,7 +306,7 @@ require ( github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/cast v1.3.1 // indirect - github.com/stretchr/objx v0.4.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect github.com/twmb/murmur3 v1.1.6 // indirect diff --git a/go.sum b/go.sum index 7631d6042..bdda45e17 100644 --- a/go.sum +++ b/go.sum @@ -320,8 +320,8 @@ github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88Oq github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8= -github.com/filecoin-project/go-fil-markets v1.25.2 h1:kVfgaamTC7dkn8KwS5zRJBNEBSNvVqdG3BCoDaUYuCI= -github.com/filecoin-project/go-fil-markets v1.25.2/go.mod h1:dc2oTPU6GH3Qk1nA+Er+hSX64rg+NVykkPIWFBYxcZU= +github.com/filecoin-project/go-fil-markets v1.25.3 h1:50kK+2VBmyh9SuuS/MgcTRaWlVdBdTZLPCzMxw8ONBg= +github.com/filecoin-project/go-fil-markets v1.25.3/go.mod h1:eOIYHfPwyqc64O1HiapvcelfnrTfU7gLQgBf55IYleQ= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24= github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM= @@ -346,8 +346,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87 h1:gqKaMwXp8mrvf1Zj+l8mXUPTC2HYf+TG7rcSivO0nDI= -github.com/filecoin-project/go-state-types v0.10.0-rc2.0.20230213183937-7f1ede218b87/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= +github.com/filecoin-project/go-state-types v0.10.0-rc3.0.20230224225638-2fa7a438fd4a h1:ehvxKXl0eeu7rONOPmbVaVrgyDalE4zrwhygcuxJie0= +github.com/filecoin-project/go-state-types v0.10.0-rc3.0.20230224225638-2fa7a438fd4a/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -356,10 +356,8 @@ github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNd github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo= github.com/filecoin-project/go-storedcounter v0.1.0 h1:Mui6wSUBC+cQGHbDUBcO7rfh5zQkWJM/CpAZa/uOuus= github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= -github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= -github.com/filecoin-project/index-provider v0.9.1/go.mod h1:NlHxQcy2iMGfUoUGUzrRxntcpiC50QSnvp68u2VTT40= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20 h1:nVEXARksqtebKmD2XVFxVmh3sta+AJp5hF3uk/Ohoug= -github.com/filecoin-project/lotus v1.20.0-hyperspace-nv20/go.mod h1:iwEYFha2TlQEWve62gere63OOm49c/K0zMxt+qNm0+c= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv21-hotfix-01 h1:iqvKdH6yodx/A0N2O8+Qs8OZ+nOsZBSHlnuRzkAkIPQ= +github.com/filecoin-project/lotus v1.20.0-hyperspace-nv21-hotfix-01/go.mod h1:YXMBUtk9WIuAKhrlF8z/RKVGozcvcyyJRRiHXDRDfMs= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= @@ -380,8 +378,6 @@ github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= -github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 h1:6GCuzxLVHBzlz7y+FkbHh6n0UyoEGWqDwJKQPJoz7bE= -github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893/go.mod h1:S7590oDimBvXMUtzWsBXoshu9HtYKwtXl47zAK9rcP8= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= @@ -667,11 +663,11 @@ github.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiL github.com/ipfs/go-bitswap v0.5.1/go.mod h1:P+ckC87ri1xFLvk74NlXdP0Kj9RmWAh4+H78sC6Qopo= github.com/ipfs/go-bitswap v0.6.0/go.mod h1:Hj3ZXdOC5wBJvENtdqsixmzzRukqd8EHLxZLZc3mzRA= github.com/ipfs/go-bitswap v0.10.2 h1:B81RIwkTnIvSYT1ZCzxjYTeF0Ek88xa9r1AMpTfk+9Q= -github.com/ipfs/go-bitswap v0.10.2/go.mod h1:+fZEvycxviZ7c+5KlKwTzLm0M28g2ukCPqiuLfJk4KA= github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= -github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc= github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= +github.com/ipfs/go-block-format v0.1.1 h1:129vSO3zwbsYADcyQWcOYiuCpAqt462SFfqFHdFJhhI= +github.com/ipfs/go-block-format v0.1.1/go.mod h1:+McEIT+g52p+zz5xGAABGSOKrzmrdX97bc0USBdWPUs= github.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M= github.com/ipfs/go-blockservice v0.2.1/go.mod h1:k6SiwmgyYgs4M/qt+ww6amPeUH9EISLRBnvUurKJhi8= github.com/ipfs/go-blockservice v0.3.0/go.mod h1:P5ppi8IHDC7O+pA0AlGTF09jruB2h+oP3wVVaZl8sfk= @@ -770,11 +766,13 @@ github.com/ipfs/go-ipfs-http-client v0.4.0/go.mod h1:NXzPUKt/QVCuR74a8angJCGOSLP github.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs= github.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A= github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY= github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= +github.com/ipfs/go-ipfs-pq v0.0.3 h1:YpoHVJB+jzK15mr/xsWC574tyDLkezVrDNeaalQBsTE= +github.com/ipfs/go-ipfs-pq v0.0.3/go.mod h1:btNw5hsHBpRcSSgZtiNm/SLj5gYIZ18AKtv3kERkRb4= github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= -github.com/ipfs/go-ipfs-routing v0.2.1 h1:E+whHWhJkdN9YeoHZNj5itzc+OR292AJ2uE9FFiW0BY= github.com/ipfs/go-ipfs-routing v0.2.1/go.mod h1:xiNNiwgjmLqPS1cimvAw6EyB9rkVDbiocA4yY+wRNLM= +github.com/ipfs/go-ipfs-routing v0.3.0 h1:9W/W3N+g+y4ZDeffSgqhgo7BsBSJwPMcyssET9OWevc= +github.com/ipfs/go-ipfs-routing v0.3.0/go.mod h1:dKqtTFIql7e1zYsEuWLyuOU+E0WJWW8JjbTPLParDWo= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= @@ -796,6 +794,8 @@ github.com/ipfs/go-ipld-legacy v0.1.1 h1:BvD8PEuqwBHLTKqlGFTHSwrwFOMkVESEvwIYwR2 github.com/ipfs/go-ipld-legacy v0.1.1/go.mod h1:8AyKFCjgRPsQFf15ZQgDB8Din4DML/fOmKZkkFkrIEg= github.com/ipfs/go-ipns v0.3.0 h1:ai791nTgVo+zTuq2bLvEGmWP1M0A6kGTXUsgv/Yq67A= github.com/ipfs/go-ipns v0.3.0/go.mod h1:3cLT2rbvgPZGkHJoPO1YMJeh6LtkxopCkKFcio/wE24= +github.com/ipfs/go-libipfs v0.4.1 h1:tyu3RRMKFQUyUQt5jyt5SmDnls93H4Tr3HifL50zihg= +github.com/ipfs/go-libipfs v0.4.1/go.mod h1:Ad8ybPqwCkl2cNiNUMvM/iaVc/5bwNpHu8RPZ5te1hw= 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= @@ -833,8 +833,8 @@ github.com/ipfs/go-path v0.3.0/go.mod h1:NOScsVgxfC/eIw4nz6OiGwK42PjaSJ4Y/ZFPn1X github.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= github.com/ipfs/go-peertaskqueue v0.7.0/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= github.com/ipfs/go-peertaskqueue v0.7.1/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= -github.com/ipfs/go-peertaskqueue v0.8.0 h1:JyNO144tfu9bx6Hpo119zvbEL9iQ760FHOiJYsUjqaU= -github.com/ipfs/go-peertaskqueue v0.8.0/go.mod h1:cz8hEnnARq4Du5TGqiWKgMr/BOSQ5XOgMOh1K5YYKKM= +github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= +github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= github.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k= github.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw= github.com/ipfs/go-unixfs v0.3.1/go.mod h1:h4qfQYzghiIc8ZNFKiLMFWOTzrWIAtzYQ59W/pCFf1o= @@ -878,6 +878,10 @@ github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd73/go.mod h1:2PJ0JgxyB08t0b2WKrcuqI3di0V+5n6RS/LTUJhkoxY= github.com/ipld/go-ipld-selector-text-lite v0.0.1 h1:lNqFsQpBHc3p5xHob2KvEg/iM5dIFn6iw4L/Hh+kS1Y= github.com/ipld/go-ipld-selector-text-lite v0.0.1/go.mod h1:U2CQmFb+uWzfIEF3I1arrDa5rwtj00PrpiwwCO+k1RM= +github.com/ipni/index-provider v0.10.0 h1:nu8YBxzRopdjwZHsgCUuC4AHpq88VVHJYrbkqUDx7eg= +github.com/ipni/index-provider v0.10.0/go.mod h1:InSXbZp2p/ZhAwiDElG/wzjnA1ea1iJ3hhyiAHrD+Vo= +github.com/ipni/storetheindex v0.5.3-0.20221203123030-16745cb63f15 h1:qJq6QtLk+9nQi3CDBhNfJ1cjZ4pghjCHcQUZ1mWbF0k= +github.com/ipni/storetheindex v0.5.3-0.20221203123030-16745cb63f15/go.mod h1:c/NS640Iu2NrCCIErnUhsUM5KVEyeXymgtNnx6eDwMU= 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/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= @@ -1005,8 +1009,8 @@ github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2 github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= github.com/libp2p/go-libp2p v0.17.0/go.mod h1:Fkin50rsGdv5mm5BshBUtPRZknt9esfmYXBOYcwOTgw= github.com/libp2p/go-libp2p v0.19.4/go.mod h1:MIt8y481VDhUe4ErWi1a4bvt/CjjFfOq6kZTothWIXY= -github.com/libp2p/go-libp2p v0.23.2 h1:yqyTeKQJyofWXxEv/eEVUvOrGdt/9x+0PIQ4N1kaxmE= -github.com/libp2p/go-libp2p v0.23.2/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= +github.com/libp2p/go-libp2p v0.23.4 h1:hWi9XHSOVFR1oDWRk7rigfyA4XNMuYL20INNybP9LP8= +github.com/libp2p/go-libp2p v0.23.4/go.mod h1:s9DEa5NLR4g+LZS+md5uGU4emjMWFiqkZr6hBTY8UxI= github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I= github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw= github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI= @@ -1415,8 +1419,8 @@ github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9x github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= -github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc= -github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= +github.com/multiformats/go-multiaddr v0.8.0 h1:aqjksEcqK+iD/Foe1RRFsGZh8+XFiGo7FgUCZlpv3LU= +github.com/multiformats/go-multiaddr v0.8.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs= github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= @@ -1719,8 +1723,9 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1728,8 +1733,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= diff --git a/lens/util/store.go b/lens/util/store.go index ec1ea18c5..9426114e2 100644 --- a/lens/util/store.go +++ b/lens/util/store.go @@ -10,9 +10,9 @@ import ( "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/specs-actors/actors/util/adt" lru "github.com/hashicorp/golang-lru" - blocks "github.com/ipfs/go-block-format" - "github.com/ipfs/go-cid" + cid "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" + blocks "github.com/ipfs/go-libipfs/blocks" cbg "github.com/whyrusleeping/cbor-gen" ) diff --git a/tasks/actorstate/miner/extraction/mocks/state.go b/tasks/actorstate/miner/extraction/mocks/state.go index 450fef4be..bd1e311e4 100644 --- a/tasks/actorstate/miner/extraction/mocks/state.go +++ b/tasks/actorstate/miner/extraction/mocks/state.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/filecoin-project/go-address" + address "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/chain/types" "github.com/stretchr/testify/mock"