From c0bbaebaf412331baa6922813bb15053ac5ee5ab Mon Sep 17 00:00:00 2001 From: Aayush Date: Fri, 9 Sep 2022 16:42:55 -0400 Subject: [PATCH] more fixes --- api/cbor_gen.go | 7 +- chain/actors/builtin/registry.go | 140 +++++++++++++++ chain/actors/builtin/registry.go.template | 70 ++++++++ chain/exchange/cbor_gen.go | 3 +- chain/gen/genesis/miners.go | 99 +--------- chain/stmgr/utils.go | 4 +- chain/types/cbor_gen.go | 7 +- chain/vm/cbor_gen.go | 3 +- go.mod | 2 +- go.sum | 8 +- lotuspond/front/src/chain/methods.json | 210 ++++++++++++++++++++++ node/hello/cbor_gen.go | 3 +- paychmgr/cbor_gen.go | 5 +- storage/pipeline/precommit_batch.go | 10 +- storage/sealer/cbor_gen.go | 3 +- 15 files changed, 457 insertions(+), 117 deletions(-) diff --git a/api/cbor_gen.go b/api/cbor_gen.go index 40982779e..66655fd75 100644 --- a/api/cbor_gen.go +++ b/api/cbor_gen.go @@ -8,12 +8,13 @@ import ( "math" "sort" - abi "github.com/filecoin-project/go-state-types/abi" - market "github.com/filecoin-project/go-state-types/builtin/v8/market" - paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + abi "github.com/filecoin-project/go-state-types/abi" + market "github.com/filecoin-project/go-state-types/builtin/v8/market" + paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" ) var _ = xerrors.Errorf diff --git a/chain/actors/builtin/registry.go b/chain/actors/builtin/registry.go index d2384a1a0..a51ef6245 100644 --- a/chain/actors/builtin/registry.go +++ b/chain/actors/builtin/registry.go @@ -5,7 +5,27 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" account8 "github.com/filecoin-project/go-state-types/builtin/v8/account" + cron8 "github.com/filecoin-project/go-state-types/builtin/v8/cron" + _init8 "github.com/filecoin-project/go-state-types/builtin/v8/init" + market8 "github.com/filecoin-project/go-state-types/builtin/v8/market" + miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" + multisig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig" + paych8 "github.com/filecoin-project/go-state-types/builtin/v8/paych" + power8 "github.com/filecoin-project/go-state-types/builtin/v8/power" + reward8 "github.com/filecoin-project/go-state-types/builtin/v8/reward" + system8 "github.com/filecoin-project/go-state-types/builtin/v8/system" + verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" account9 "github.com/filecoin-project/go-state-types/builtin/v9/account" + cron9 "github.com/filecoin-project/go-state-types/builtin/v9/cron" + _init9 "github.com/filecoin-project/go-state-types/builtin/v9/init" + market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" + miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" + multisig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" + paych9 "github.com/filecoin-project/go-state-types/builtin/v9/paych" + power9 "github.com/filecoin-project/go-state-types/builtin/v9/power" + reward9 "github.com/filecoin-project/go-state-types/builtin/v9/reward" + system9 "github.com/filecoin-project/go-state-types/builtin/v9/system" + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/cbor" rtt "github.com/filecoin-project/go-state-types/rt" @@ -54,6 +74,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor { methods: account8.Methods, state: new(account8.State), }) + case actors.CronKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: cron8.Methods, + state: new(cron8.State), + }) + case actors.InitKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: _init8.Methods, + state: new(_init8.State), + }) + case actors.MarketKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: market8.Methods, + state: new(market8.State), + }) + case actors.MinerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: miner8.Methods, + state: new(miner8.State), + }) + case actors.MultisigKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: multisig8.Methods, + state: new(multisig8.State), + }) + case actors.PaychKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: paych8.Methods, + state: new(paych8.State), + }) + case actors.PowerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: power8.Methods, + state: new(power8.State), + }) + case actors.RewardKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: reward8.Methods, + state: new(reward8.State), + }) + case actors.SystemKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: system8.Methods, + state: new(system8.State), + }) + case actors.VerifregKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: verifreg8.Methods, + state: new(verifreg8.State), + }) } } @@ -66,6 +146,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor { methods: account9.Methods, state: new(account9.State), }) + case actors.CronKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: cron9.Methods, + state: new(cron9.State), + }) + case actors.InitKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: _init9.Methods, + state: new(_init9.State), + }) + case actors.MarketKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: market9.Methods, + state: new(market9.State), + }) + case actors.MinerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: miner9.Methods, + state: new(miner9.State), + }) + case actors.MultisigKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: multisig9.Methods, + state: new(multisig9.State), + }) + case actors.PaychKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: paych9.Methods, + state: new(paych9.State), + }) + case actors.PowerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: power9.Methods, + state: new(power9.State), + }) + case actors.RewardKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: reward9.Methods, + state: new(reward9.State), + }) + case actors.SystemKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: system9.Methods, + state: new(system9.State), + }) + case actors.VerifregKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: verifreg9.Methods, + state: new(verifreg9.State), + }) } } diff --git a/chain/actors/builtin/registry.go.template b/chain/actors/builtin/registry.go.template index 56a177330..ec6d5b633 100644 --- a/chain/actors/builtin/registry.go.template +++ b/chain/actors/builtin/registry.go.template @@ -6,6 +6,16 @@ import ( {{range .versions}} {{if (ge . 8)}} account{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/account" + cron{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/cron" + _init{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/init" + multisig{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/multisig" + miner{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/miner" + market{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/market" + reward{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/reward" + paych{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/paych" + power{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/power" + system{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/system" + verifreg{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/verifreg" {{end}} {{end}} "github.com/filecoin-project/go-state-types/cbor" @@ -56,6 +66,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor { methods: account{{.}}.Methods, state: new(account{{.}}.State), }) + case actors.CronKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: cron{{.}}.Methods, + state: new(cron{{.}}.State), + }) + case actors.InitKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: _init{{.}}.Methods, + state: new(_init{{.}}.State), + }) + case actors.MarketKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: market{{.}}.Methods, + state: new(market{{.}}.State), + }) + case actors.MinerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: miner{{.}}.Methods, + state: new(miner{{.}}.State), + }) + case actors.MultisigKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: multisig{{.}}.Methods, + state: new(multisig{{.}}.State), + }) + case actors.PaychKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: paych{{.}}.Methods, + state: new(paych{{.}}.State), + }) + case actors.PowerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: power{{.}}.Methods, + state: new(power{{.}}.State), + }) + case actors.RewardKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: reward{{.}}.Methods, + state: new(reward{{.}}.State), + }) + case actors.SystemKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: system{{.}}.Methods, + state: new(system{{.}}.State), + }) + case actors.VerifregKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: verifreg{{.}}.Methods, + state: new(verifreg{{.}}.State), + }) } } {{end}} diff --git a/chain/exchange/cbor_gen.go b/chain/exchange/cbor_gen.go index 9c7f68ab8..d1eb271e9 100644 --- a/chain/exchange/cbor_gen.go +++ b/chain/exchange/cbor_gen.go @@ -8,10 +8,11 @@ import ( "math" "sort" - types "github.com/filecoin-project/lotus/chain/types" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + types "github.com/filecoin-project/lotus/chain/types" ) var _ = xerrors.Errorf diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index e74934cc9..55156fda6 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -6,12 +6,6 @@ import ( "fmt" "math/rand" - smoothing9 "github.com/filecoin-project/go-state-types/builtin/v9/util/smoothing" - - miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - - market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" - "github.com/ipfs/go-cid" cbor "github.com/ipfs/go-ipld-cbor" cbg "github.com/whyrusleeping/cbor-gen" @@ -25,16 +19,15 @@ import ( builtintypes "github.com/filecoin-project/go-state-types/builtin" markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market" minertypes "github.com/filecoin-project/go-state-types/builtin/v8/miner" + miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" + smoothing9 "github.com/filecoin-project/go-state-types/builtin/v9/util/smoothing" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/network" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" - market0 "github.com/filecoin-project/specs-actors/actors/builtin/market" miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" power0 "github.com/filecoin-project/specs-actors/actors/builtin/power" reward0 "github.com/filecoin-project/specs-actors/actors/builtin/reward" - market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market" reward2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/reward" - market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market" power4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/power" reward4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/reward" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" @@ -280,6 +273,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal } } + { nh, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) @@ -606,93 +600,6 @@ func currentTotalPower(ctx context.Context, vm vm.Interface, maddr address.Addre return &pwr, nil } -func dealWeight(ctx context.Context, vm vm.Interface, maddr address.Address, spt abi.RegisteredSealProof, dealIDs []abi.DealID, sectorStart, sectorExpiry abi.ChainEpoch, av actorstypes.Version) (abi.DealWeight, abi.DealWeight, error) { - // TODO: This hack should move to market actor wrapper - if av <= actorstypes.Version2 { - params := &market0.VerifyDealsForActivationParams{ - DealIDs: dealIDs, - SectorStart: sectorStart, - SectorExpiry: sectorExpiry, - } - - ret, err := doExecValue(ctx, vm, - market.Address, - maddr, - abi.NewTokenAmount(0), - builtin0.MethodsMarket.VerifyDealsForActivation, - mustEnc(params), - ) - if err != nil { - return big.Zero(), big.Zero(), err - } - var weight, verifiedWeight abi.DealWeight - if av < actorstypes.Version2 { - var dealWeights market0.VerifyDealsForActivationReturn - err = dealWeights.UnmarshalCBOR(bytes.NewReader(ret)) - weight = dealWeights.DealWeight - verifiedWeight = dealWeights.VerifiedDealWeight - } else { - var dealWeights market2.VerifyDealsForActivationReturn - err = dealWeights.UnmarshalCBOR(bytes.NewReader(ret)) - weight = dealWeights.DealWeight - verifiedWeight = dealWeights.VerifiedDealWeight - } - if err != nil { - return big.Zero(), big.Zero(), err - } - - return weight, verifiedWeight, nil - } - - if av < actorstypes.Version9 { - params := &market4.VerifyDealsForActivationParams{Sectors: []market4.SectorDeals{{ - SectorExpiry: sectorExpiry, - DealIDs: dealIDs, - }}} - paramEnc := mustEnc(params) - - var dealWeights market4.VerifyDealsForActivationReturn - ret, err := doExecValue(ctx, vm, - market.Address, - maddr, - abi.NewTokenAmount(0), - market.Methods.VerifyDealsForActivation, - paramEnc, - ) - if err != nil { - return big.Zero(), big.Zero(), err - } - if err := dealWeights.UnmarshalCBOR(bytes.NewReader(ret)); err != nil { - return big.Zero(), big.Zero(), err - } - - return dealWeights.Sectors[0].DealWeight, dealWeights.Sectors[0].VerifiedDealWeight, nil - - } - - params := &market9.ActivateDealsParams{ - DealIDs: dealIDs, - SectorExpiry: sectorExpiry} - paramEnc := mustEnc(params) - - var dealWeights market9.ActivateDealsResult - ret, err := doExecValue(ctx, vm, - market.Address, - maddr, - abi.NewTokenAmount(0), - market.Methods.ActivateDeals, - paramEnc, - ) - if err != nil { - return big.Zero(), big.Zero(), xerrors.Errorf("failed to activate deals: %w", err) - } - if err := dealWeights.UnmarshalCBOR(bytes.NewReader(ret)); xerrors.Errorf("failed to unmarshal ret: %w", err) != nil { - return big.Zero(), big.Zero(), err - } - - return dealWeights.Weights.DealWeight, dealWeights.Weights.VerifiedDealWeight, nil -} - func currentEpochBlockReward(ctx context.Context, vm vm.Interface, maddr address.Address, av actorstypes.Version) (abi.StoragePower, builtin.FilterEstimate, error) { rwret, err := doExecValue(ctx, vm, reward.Address, maddr, big.Zero(), reward.Methods.ThisEpochReward, nil) if err != nil { diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 9e7a08ba7..03ade3bd2 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -30,13 +30,15 @@ import ( func GetReturnType(ctx context.Context, sm *StateManager, to address.Address, method abi.MethodNum, ts *types.TipSet) (cbg.CBORUnmarshaler, error) { act, err := sm.LoadActor(ctx, to, ts) if err != nil { - return nil, xerrors.Errorf("(get sset) failed to load miner actor: %w", err) + return nil, xerrors.Errorf("(get sset) failed to load actor: %w", err) } m, found := sm.tsExec.NewActorRegistry().Methods[act.Code][method] if !found { return nil, fmt.Errorf("unknown method %d for actor %s", method, act.Code) } + + fmt.Println("found ", m.Ret, " and ", m.Params, " for ", m.Num) return reflect.New(m.Ret.Elem()).Interface().(cbg.CBORUnmarshaler), nil } diff --git a/chain/types/cbor_gen.go b/chain/types/cbor_gen.go index 79ff5d19c..78a3449ee 100644 --- a/chain/types/cbor_gen.go +++ b/chain/types/cbor_gen.go @@ -8,13 +8,14 @@ import ( "math" "sort" + cid "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + xerrors "golang.org/x/xerrors" + abi "github.com/filecoin-project/go-state-types/abi" crypto "github.com/filecoin-project/go-state-types/crypto" exitcode "github.com/filecoin-project/go-state-types/exitcode" proof "github.com/filecoin-project/go-state-types/proof" - cid "github.com/ipfs/go-cid" - cbg "github.com/whyrusleeping/cbor-gen" - xerrors "golang.org/x/xerrors" ) var _ = xerrors.Errorf diff --git a/chain/vm/cbor_gen.go b/chain/vm/cbor_gen.go index 804d9fe4b..c2bb4fa79 100644 --- a/chain/vm/cbor_gen.go +++ b/chain/vm/cbor_gen.go @@ -8,10 +8,11 @@ import ( "math" "sort" - types "github.com/filecoin-project/lotus/chain/types" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + types "github.com/filecoin-project/lotus/chain/types" ) var _ = xerrors.Errorf diff --git a/go.mod b/go.mod index 71c758244..e20d246c5 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/filecoin-project/go-legs v0.4.4 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.1.12-0.20220909195146-6740cdd9390d + github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b github.com/filecoin-project/go-statemachine v1.0.2 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 diff --git a/go.sum b/go.sum index fe63fe3d2..655957331 100644 --- a/go.sum +++ b/go.sum @@ -343,12 +343,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.1.12-0.20220909165003-f4ad1a59d916 h1:30E8Wwpe17E816LVRZeeN4QLklGpVO2v+1tGXuQx1Ps= -github.com/filecoin-project/go-state-types v0.1.12-0.20220909165003-f4ad1a59d916/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= -github.com/filecoin-project/go-state-types v0.1.12-0.20220909170026-395c37ab732c h1:+QMHpDZ0Zhc1K1nAUg+S2Cm1muEJhGa8N8Nx2tL2Rcc= -github.com/filecoin-project/go-state-types v0.1.12-0.20220909170026-395c37ab732c/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= -github.com/filecoin-project/go-state-types v0.1.12-0.20220909195146-6740cdd9390d h1:r1uMayyVGBNZv2WPWEG6Qy7PUmjX8H+tFQnHjCOjwmM= -github.com/filecoin-project/go-state-types v0.1.12-0.20220909195146-6740cdd9390d/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= +github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b h1:Dd7R2JHJaXrNc1kZ+Z3PIUTEy5SRbQdw8YwGyWLLZn4= +github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= 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= diff --git a/lotuspond/front/src/chain/methods.json b/lotuspond/front/src/chain/methods.json index f8fc1338d..d0127944e 100644 --- a/lotuspond/front/src/chain/methods.json +++ b/lotuspond/front/src/chain/methods.json @@ -736,10 +736,220 @@ "1", "2" ], + "fil/8/cron": [ + "0", + "1", + "2" + ], + "fil/8/init": [ + "0", + "1", + "2" + ], + "fil/8/multisig": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + "fil/8/paymentchannel": [ + "0", + "1", + "2", + "3", + "4" + ], + "fil/8/reward": [ + "0", + "1", + "2", + "3", + "4" + ], + "fil/8/storagemarket": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + "fil/8/storageminer": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27" + ], + "fil/8/storagepower": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "9" + ], + "fil/8/system": [ + "0", + "1" + ], + "fil/8/verifiedregistry": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" + ], "fil/9/account": [ "0", "1", "2", "3" + ], + "fil/9/cron": [ + "0", + "1", + "2" + ], + "fil/9/init": [ + "0", + "1", + "2" + ], + "fil/9/multisig": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + "fil/9/paymentchannel": [ + "0", + "1", + "2", + "3", + "4" + ], + "fil/9/reward": [ + "0", + "1", + "2", + "3", + "4" + ], + "fil/9/storagemarket": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ], + "fil/9/storageminer": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "18", + "19", + "20", + "21", + "22", + "23", + "24", + "25", + "26", + "27", + "28", + "29", + "30", + "31" + ], + "fil/9/storagepower": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "9" + ], + "fil/9/system": [ + "0", + "1" + ], + "fil/9/verifiedregistry": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7" ] } \ No newline at end of file diff --git a/node/hello/cbor_gen.go b/node/hello/cbor_gen.go index 68c82e2bb..81a1774c1 100644 --- a/node/hello/cbor_gen.go +++ b/node/hello/cbor_gen.go @@ -8,10 +8,11 @@ import ( "math" "sort" - abi "github.com/filecoin-project/go-state-types/abi" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + abi "github.com/filecoin-project/go-state-types/abi" ) var _ = xerrors.Errorf diff --git a/paychmgr/cbor_gen.go b/paychmgr/cbor_gen.go index 450d526d8..78a55488e 100644 --- a/paychmgr/cbor_gen.go +++ b/paychmgr/cbor_gen.go @@ -8,11 +8,12 @@ import ( "math" "sort" - address "github.com/filecoin-project/go-address" - paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + address "github.com/filecoin-project/go-address" + paych "github.com/filecoin-project/go-state-types/builtin/v8/paych" ) var _ = xerrors.Errorf diff --git a/storage/pipeline/precommit_batch.go b/storage/pipeline/precommit_batch.go index 7f7ea8069..94b8d272f 100644 --- a/storage/pipeline/precommit_batch.go +++ b/storage/pipeline/precommit_batch.go @@ -281,9 +281,17 @@ func (b *PreCommitBatcher) processIndividually(cfg sealiface.Config) ([]sealifac } func (b *PreCommitBatcher) processSingle(cfg sealiface.Config, mi api.MinerInfo, avail *abi.TokenAmount, params *preCommitEntry) (cid.Cid, error) { + msgParams := miner.PreCommitSectorParams{ + SealProof: params.pci.SealProof, + SectorNumber: params.pci.SectorNumber, + SealedCID: params.pci.SealedCID, + SealRandEpoch: params.pci.SealRandEpoch, + DealIDs: params.pci.DealIDs, + Expiration: params.pci.Expiration, + } enc := new(bytes.Buffer) - if err := params.pci.MarshalCBOR(enc); err != nil { + if err := msgParams.MarshalCBOR(enc); err != nil { return cid.Undef, xerrors.Errorf("marshaling precommit params: %w", err) } diff --git a/storage/sealer/cbor_gen.go b/storage/sealer/cbor_gen.go index 6db7d96a4..48bf0146a 100644 --- a/storage/sealer/cbor_gen.go +++ b/storage/sealer/cbor_gen.go @@ -8,10 +8,11 @@ import ( "math" "sort" - sealtasks "github.com/filecoin-project/lotus/storage/sealer/sealtasks" cid "github.com/ipfs/go-cid" cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + + sealtasks "github.com/filecoin-project/lotus/storage/sealer/sealtasks" ) var _ = xerrors.Errorf