From b2b20e469f5c19e84a8e0f00137718e9bee0df33 Mon Sep 17 00:00:00 2001 From: Aayush Date: Sun, 15 May 2022 15:26:52 -0400 Subject: [PATCH] Fix tests --- chain/actors/builtin/builtin.go | 4 + chain/actors/builtin/builtin.go.template | 12 +- chain/consensus/filcns/compute_state.go | 2 + chain/gen/genesis/genesis.go | 19 +- chain/gen/genesis/miners.go | 178 ++++++++++++------ chain/gen/genesis/util.go | 45 +---- chain/vm/runtime.go | 20 +- cmd/lotus-seed/seed/seed.go | 1 + extern/storage-sealing/commit_batch_test.go | 3 +- .../storage-sealing/precommit_batch_test.go | 5 +- genesis/types.go | 13 +- go.mod | 2 +- go.sum | 3 +- itests/deals_retry_deal_no_funds_test.go | 2 +- itests/gateway_test.go | 4 +- lotuspond/front/src/chain/methods.json | 108 +++++++++++ storage/mockstorage/preseal.go | 1 + testplans/lotus-soup/go.mod | 8 +- testplans/lotus-soup/go.sum | 17 +- testplans/lotus-soup/paych/stress.go | 3 +- 20 files changed, 292 insertions(+), 158 deletions(-) diff --git a/chain/actors/builtin/builtin.go b/chain/actors/builtin/builtin.go index 7f63a056c..4f7665791 100644 --- a/chain/actors/builtin/builtin.go +++ b/chain/actors/builtin/builtin.go @@ -20,6 +20,7 @@ import ( builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" builtin8 "github.com/filecoin-project/go-state-types/builtin" + builtin8sa "github.com/filecoin-project/specs-actors/v8/actors/builtin" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/proof" @@ -92,6 +93,9 @@ func ActorNameByCode(c cid.Cid) string { case builtin7.IsBuiltinActor(c): return builtin7.ActorNameByCode(c) + case builtin8sa.IsBuiltinActor(c): + return builtin8sa.ActorNameByCode(c) + default: return "" } diff --git a/chain/actors/builtin/builtin.go.template b/chain/actors/builtin/builtin.go.template index d45100ebd..b6a108e0b 100644 --- a/chain/actors/builtin/builtin.go.template +++ b/chain/actors/builtin/builtin.go.template @@ -10,6 +10,7 @@ import ( builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin" {{else}} builtin{{.}} "github.com/filecoin-project/go-state-types/builtin" + builtin{{.}}sa "github.com/filecoin-project/specs-actors{{import .}}actors/builtin" {{end}} {{end}} @@ -62,12 +63,15 @@ func ActorNameByCode(c cid.Cid) string { } switch { - {{range .versions}} - {{if (le . 7)}} + {{range .versions}} + {{if (le . 7)}} case builtin{{.}}.IsBuiltinActor(c): return builtin{{.}}.ActorNameByCode(c) - {{end}} - {{end}} + {{else}} + case builtin{{.}}sa.IsBuiltinActor(c): + return builtin{{.}}sa.ActorNameByCode(c) + {{end}} + {{end}} default: return "" } diff --git a/chain/consensus/filcns/compute_state.go b/chain/consensus/filcns/compute_state.go index 51aa9fa6c..1b652dde5 100644 --- a/chain/consensus/filcns/compute_state.go +++ b/chain/consensus/filcns/compute_state.go @@ -24,6 +24,7 @@ import ( exported5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/exported" exported6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/exported" exported7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/exported" + exported8 "github.com/filecoin-project/specs-actors/v8/actors/builtin/exported" "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/build" @@ -48,6 +49,7 @@ func NewActorRegistry() *vm.ActorRegistry { inv.Register(actors.Version5, vm.ActorsVersionPredicate(actors.Version5), exported5.BuiltinActors()...) inv.Register(actors.Version6, vm.ActorsVersionPredicate(actors.Version6), exported6.BuiltinActors()...) inv.Register(actors.Version7, vm.ActorsVersionPredicate(actors.Version7), exported7.BuiltinActors()...) + inv.Register(actors.Version8, vm.ActorsVersionPredicate(actors.Version8), exported8.BuiltinActors()...) return inv } diff --git a/chain/gen/genesis/genesis.go b/chain/gen/genesis/genesis.go index 8b27ed4e2..e889e340d 100644 --- a/chain/gen/genesis/genesis.go +++ b/chain/gen/genesis/genesis.go @@ -495,7 +495,7 @@ func VerifyPreSealedData(ctx context.Context, cs *store.ChainStore, sys vm.Sysca NetworkVersion: nv, BaseFee: big.Zero(), } - vm, err := vm.NewLegacyVM(ctx, &vmopt) + vm, err := vm.NewVM(ctx, &vmopt) if err != nil { return cid.Undef, xerrors.Errorf("failed to create NewLegacyVM: %w", err) } @@ -580,23 +580,6 @@ func MakeGenesisBlock(ctx context.Context, j journal.Journal, bs bstore.Blocksto return nil, xerrors.Errorf("setup miners failed: %w", err) } - if template.NetworkVersion >= network.Version16 { - st, err := state.LoadStateTree(cbor.NewCborStore(bs), stateroot) - if err != nil { - return nil, xerrors.Errorf("error loading state tree") - } - - err = patchManifestCodeCids(st, template.NetworkVersion) - if err != nil { - return nil, xerrors.Errorf("error patching state tree: %w", err) - } - - stateroot, err = st.Flush(ctx) - if err != nil { - return nil, xerrors.Errorf("flush state tree failed: %w", err) - } - } - store := adt.WrapStore(ctx, cbor.NewCborStore(bs)) emptyroot, err := adt0.MakeEmptyArray(store).Root() if err != nil { diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 8cfa03114..a28804512 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -6,6 +6,12 @@ import ( "fmt" "math/rand" + "github.com/filecoin-project/lotus/chain/wallet" + + cborutil "github.com/filecoin-project/go-cbor-util" + + "github.com/filecoin-project/lotus/lib/sigs" + smoothing0 "github.com/filecoin-project/specs-actors/actors/util/smoothing" "github.com/filecoin-project/lotus/chain/actors/builtin" @@ -92,22 +98,26 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal return big.Zero(), nil } - vmopt := &vm.VMOpts{ - StateBase: sroot, - Epoch: 0, - Rand: &fakeRand{}, - Bstore: cs.StateBlockstore(), - Actors: filcns.NewActorRegistry(), - Syscalls: mkFakedSigSyscalls(sys), - CircSupplyCalc: csc, - NetworkVersion: nv, - BaseFee: big.Zero(), - FilVested: big.Zero(), + newVM := func(base cid.Cid) (vm.Interface, error) { + vmopt := &vm.VMOpts{ + StateBase: base, + Epoch: 0, + Rand: &fakeRand{}, + Bstore: cs.StateBlockstore(), + Actors: filcns.NewActorRegistry(), + Syscalls: mkFakedSigSyscalls(sys), + CircSupplyCalc: csc, + NetworkVersion: nv, + BaseFee: big.Zero(), + FilVested: big.Zero(), + } + + return vm.NewVM(ctx, vmopt) } - vm, err := vm.NewLegacyVM(ctx, vmopt) + genesisVm, err := newVM(sroot) if err != nil { - return cid.Undef, xerrors.Errorf("failed to create NewLegacyVM: %w", err) + return cid.Undef, fmt.Errorf("creating vm: %w", err) } if len(miners) == 0 { @@ -142,7 +152,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal } params := mustEnc(constructorParams) - rval, err := doExecValue(ctx, vm, power.Address, m.Owner, m.PowerBalance, power.Methods.CreateMiner, params) + rval, err := doExecValue(ctx, genesisVm, power.Address, m.Owner, m.PowerBalance, power.Methods.CreateMiner, params) if err != nil { return cid.Undef, xerrors.Errorf("failed to create genesis miner: %w", err) } @@ -158,12 +168,17 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal } minerInfos[i].maddr = ma.IDAddress - _, err = vm.Flush(ctx) + nh, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) } - mact, err := vm.StateTree().GetActor(minerInfos[i].maddr) + nst, err := state.LoadStateTree(cst, nh) + if err != nil { + return cid.Undef, xerrors.Errorf("loading new state tree: %w", err) + } + + mact, err := nst.GetActor(minerInfos[i].maddr) if err != nil { return cid.Undef, xerrors.Errorf("getting newly created miner actor: %w", err) } @@ -185,7 +200,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal if m.MarketBalance.GreaterThan(big.Zero()) { params := mustEnc(&minerInfos[i].maddr) - _, err := doExecValue(ctx, vm, market.Address, m.Worker, m.MarketBalance, market.Methods.AddBalance, params) + _, err := doExecValue(ctx, genesisVm, market.Address, m.Worker, m.MarketBalance, market.Methods.AddBalance, params) if err != nil { return cid.Undef, xerrors.Errorf("failed to create genesis miner (add balance): %w", err) } @@ -197,7 +212,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal publish := func(params *markettypes.PublishStorageDealsParams) error { fmt.Printf("publishing %d storage deals on miner %s with worker %s\n", len(params.Deals), params.Deals[0].Proposal.Provider, m.Worker) - ret, err := doExecValue(ctx, vm, market.Address, m.Worker, big.Zero(), builtin0.MethodsMarket.PublishStorageDeals, mustEnc(params)) + ret, err := doExecValue(ctx, genesisVm, market.Address, m.Worker, big.Zero(), builtin0.MethodsMarket.PublishStorageDeals, mustEnc(params)) if err != nil { return xerrors.Errorf("failed to create genesis miner (publish deals): %w", err) } @@ -223,9 +238,19 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal for _, preseal := range m.Sectors { preseal.Deal.VerifiedDeal = true preseal.Deal.EndEpoch = minerInfos[i].presealExp + buf, err := cborutil.Dump(&preseal.Deal) + if err != nil { + return cid.Undef, fmt.Errorf("failed to marshal proposal: %w", err) + } + + sig, err := sigs.Sign(wallet.ActSigType(preseal.DealClientKey.Type), preseal.DealClientKey.PrivateKey, buf) + if err != nil { + return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err) + } + params.Deals = append(params.Deals, markettypes.ClientDealProposal{ Proposal: preseal.Deal, - ClientSignature: crypto.Signature{Type: crypto.SigTypeBLS}, // TODO: do we want to sign these? Or do we want to fake signatures for genesis setup? + ClientSignature: *sig, }) if len(params.Deals) == cbg.MaxLength { @@ -252,7 +277,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal for pi := range m.Sectors { rawPow = types.BigAdd(rawPow, types.NewInt(uint64(m.SectorSize))) - dweight, vdweight, err := dealWeight(ctx, vm, minerInfos[i].maddr, []abi.DealID{minerInfos[i].dealIDs[pi]}, 0, minerInfos[i].presealExp, av) + dweight, vdweight, err := dealWeight(ctx, genesisVm, minerInfos[i].maddr, []abi.DealID{minerInfos[i].dealIDs[pi]}, 0, minerInfos[i].presealExp, av) if err != nil { return cid.Undef, xerrors.Errorf("getting deal weight: %w", err) } @@ -263,12 +288,21 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal } } - _, err = vm.Flush(ctx) + nh, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) } - pact, err := vm.StateTree().GetActor(power.Address) + if err != nil { + return cid.Undef, xerrors.Errorf("flushing vm: %w", err) + } + + nst, err := state.LoadStateTree(cst, nh) + if err != nil { + return cid.Undef, xerrors.Errorf("loading new state tree: %w", err) + } + + pact, err := nst.GetActor(power.Address) if err != nil { return cid.Undef, xerrors.Errorf("getting power actor: %w", err) } @@ -301,7 +335,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal pact.Head = pcid - if err = vm.StateTree().SetActor(power.Address, pact); err != nil { + if err = nst.SetActor(power.Address, pact); err != nil { return cid.Undef, xerrors.Errorf("setting power state: %w", err) } @@ -310,9 +344,19 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal return cid.Undef, xerrors.Errorf("setup reward actor: %w", err) } - if err = vm.StateTree().SetActor(reward.Address, rewact); err != nil { + if err = nst.SetActor(reward.Address, rewact); err != nil { return cid.Undef, xerrors.Errorf("set reward actor: %w", err) } + + nh, err = nst.Flush(ctx) + if err != nil { + return cid.Undef, xerrors.Errorf("flushing state tree: %w", err) + } + + genesisVm, err = newVM(nh) + if err != nil { + return cid.Undef, fmt.Errorf("creating new vm: %w", err) + } } for i, m := range miners { @@ -328,7 +372,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal Expiration: minerInfos[i].presealExp, // TODO: Allow setting externally! } - dweight, vdweight, err := dealWeight(ctx, vm, minerInfos[i].maddr, params.DealIDs, 0, minerInfos[i].presealExp, av) + dweight, vdweight, err := dealWeight(ctx, genesisVm, minerInfos[i].maddr, params.DealIDs, 0, minerInfos[i].presealExp, av) if err != nil { return cid.Undef, xerrors.Errorf("getting deal weight: %w", err) } @@ -337,12 +381,17 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal // we've added fake power for this sector above, remove it now - _, err = vm.Flush(ctx) + nh, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) } - pact, err := vm.StateTree().GetActor(power.Address) + nst, err := state.LoadStateTree(cst, nh) + if err != nil { + return cid.Undef, xerrors.Errorf("loading new state tree: %w", err) + } + + pact, err := nst.GetActor(power.Address) if err != nil { return cid.Undef, xerrors.Errorf("getting power actor: %w", err) } @@ -372,16 +421,26 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal pact.Head = pcid - if err = vm.StateTree().SetActor(power.Address, pact); err != nil { + if err = nst.SetActor(power.Address, pact); err != nil { return cid.Undef, xerrors.Errorf("setting power state: %w", err) } - baselinePower, rewardSmoothed, err := currentEpochBlockReward(ctx, vm, minerInfos[i].maddr, av) + nh, err = nst.Flush(ctx) + if err != nil { + return cid.Undef, xerrors.Errorf("flushing state tree: %w", err) + } + + genesisVm, err = newVM(nh) + if err != nil { + return cid.Undef, fmt.Errorf("creating new vm: %w", err) + } + + baselinePower, rewardSmoothed, err := currentEpochBlockReward(ctx, genesisVm, minerInfos[i].maddr, av) if err != nil { return cid.Undef, xerrors.Errorf("getting current epoch reward: %w", err) } - tpow, err := currentTotalPower(ctx, vm, minerInfos[i].maddr) + tpow, err := currentTotalPower(ctx, genesisVm, minerInfos[i].maddr) if err != nil { return cid.Undef, xerrors.Errorf("getting current total power: %w", err) } @@ -394,13 +453,13 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal tpow.PledgeCollateral, (*smoothing0.FilterEstimate)(&rewardSmoothed), tpow.QualityAdjPowerSmoothed, - circSupply(ctx, vm, minerInfos[i].maddr), + big.Zero(), ) pledge = big.Add(pcd, pledge) fmt.Println(types.FIL(pledge)) - _, err = doExecValue(ctx, vm, minerInfos[i].maddr, m.Worker, pledge, builtintypes.MethodsMiner.PreCommitSector, mustEnc(params)) + _, err = doExecValue(ctx, genesisVm, minerInfos[i].maddr, m.Worker, pledge, builtintypes.MethodsMiner.PreCommitSector, mustEnc(params)) if err != nil { return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err) } @@ -423,7 +482,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal paramBytes = mustEnc(confirmParams) } - _, err = doExecValue(ctx, vm, minerInfos[i].maddr, power.Address, big.Zero(), builtintypes.MethodsMiner.ConfirmSectorProofsValid, paramBytes) + _, err = doExecValue(ctx, genesisVm, minerInfos[i].maddr, power.Address, big.Zero(), builtintypes.MethodsMiner.ConfirmSectorProofsValid, paramBytes) if err != nil { return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err) } @@ -435,17 +494,22 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal QualityAdjustedDelta: sectorWeight, } - _, err = doExecValue(ctx, vm, power.Address, minerInfos[i].maddr, big.Zero(), power.Methods.UpdateClaimedPower, mustEnc(claimParams)) + _, err = doExecValue(ctx, genesisVm, power.Address, minerInfos[i].maddr, big.Zero(), power.Methods.UpdateClaimedPower, mustEnc(claimParams)) if err != nil { return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err) } - _, err = vm.Flush(ctx) + nh, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) } - mact, err := vm.StateTree().GetActor(minerInfos[i].maddr) + nst, err := state.LoadStateTree(cst, nh) + if err != nil { + return cid.Undef, xerrors.Errorf("loading new state tree: %w", err) + } + + mact, err := nst.GetActor(minerInfos[i].maddr) if err != nil { return cid.Undef, xerrors.Errorf("getting miner actor: %w", err) } @@ -466,21 +530,36 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal mact.Head = mcid - if err = vm.StateTree().SetActor(minerInfos[i].maddr, mact); err != nil { + if err = nst.SetActor(minerInfos[i].maddr, mact); err != nil { return cid.Undef, xerrors.Errorf("setting miner state: %w", err) } + + nh, err = nst.Flush(ctx) + if err != nil { + return cid.Undef, xerrors.Errorf("flushing state tree: %w", err) + } + + genesisVm, err = newVM(nh) + if err != nil { + return cid.Undef, fmt.Errorf("creating new vm: %w", err) + } } } } } // Sanity-check total network power - _, err = vm.Flush(ctx) + nh, err := genesisVm.Flush(ctx) if err != nil { - return cid.Undef, xerrors.Errorf("flushing vm: %w", err) + return cid.Undef, fmt.Errorf("flushing vm: %w", err) } - pact, err := vm.StateTree().GetActor(power.Address) + nst, err := state.LoadStateTree(cst, nh) + if err != nil { + return cid.Undef, xerrors.Errorf("loading new state tree: %w", err) + } + + pact, err := nst.GetActor(power.Address) if err != nil { return cid.Undef, xerrors.Errorf("getting power actor: %w", err) } @@ -505,10 +584,11 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal // TODO: Should we re-ConstructState for the reward actor using rawPow as currRealizedPower here? - c, err := vm.Flush(ctx) + c, err := genesisVm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) } + return c, nil } @@ -527,7 +607,7 @@ func (fr *fakeRand) GetBeaconRandomness(ctx context.Context, personalization cry return out, nil } -func currentTotalPower(ctx context.Context, vm *vm.LegacyVM, maddr address.Address) (*power0.CurrentTotalPowerReturn, error) { +func currentTotalPower(ctx context.Context, vm vm.Interface, maddr address.Address) (*power0.CurrentTotalPowerReturn, error) { pwret, err := doExecValue(ctx, vm, power.Address, maddr, big.Zero(), builtin0.MethodsPower.CurrentTotalPower, nil) if err != nil { return nil, err @@ -540,7 +620,7 @@ func currentTotalPower(ctx context.Context, vm *vm.LegacyVM, maddr address.Addre return &pwr, nil } -func dealWeight(ctx context.Context, vm *vm.LegacyVM, maddr address.Address, dealIDs []abi.DealID, sectorStart, sectorExpiry abi.ChainEpoch, av actors.Version) (abi.DealWeight, abi.DealWeight, error) { +func dealWeight(ctx context.Context, vm vm.Interface, maddr address.Address, dealIDs []abi.DealID, sectorStart, sectorExpiry abi.ChainEpoch, av actors.Version) (abi.DealWeight, abi.DealWeight, error) { // TODO: This hack should move to market actor wrapper if av <= actors.Version2 { params := &market0.VerifyDealsForActivationParams{ @@ -600,7 +680,7 @@ func dealWeight(ctx context.Context, vm *vm.LegacyVM, maddr address.Address, dea return dealWeights.Sectors[0].DealWeight, dealWeights.Sectors[0].VerifiedDealWeight, nil } -func currentEpochBlockReward(ctx context.Context, vm *vm.LegacyVM, maddr address.Address, av actors.Version) (abi.StoragePower, builtin.FilterEstimate, error) { +func currentEpochBlockReward(ctx context.Context, vm vm.Interface, maddr address.Address, av actors.Version) (abi.StoragePower, builtin.FilterEstimate, error) { rwret, err := doExecValue(ctx, vm, reward.Address, maddr, big.Zero(), reward.Methods.ThisEpochReward, nil) if err != nil { return big.Zero(), builtin.FilterEstimate{}, err @@ -634,13 +714,3 @@ func currentEpochBlockReward(ctx context.Context, vm *vm.LegacyVM, maddr address return epochReward.ThisEpochBaselinePower, builtin.FilterEstimate(epochReward.ThisEpochRewardSmoothed), nil } - -func circSupply(ctx context.Context, vmi *vm.LegacyVM, maddr address.Address) abi.TokenAmount { - unsafeVM := &vm.UnsafeVM{VM: vmi} - rt := unsafeVM.MakeRuntime(ctx, &types.Message{ - GasLimit: 1_000_000_000, - From: maddr, - }) - - return rt.TotalFilCircSupply() -} diff --git a/chain/gen/genesis/util.go b/chain/gen/genesis/util.go index 8bf5c031d..1f576c8a4 100644 --- a/chain/gen/genesis/util.go +++ b/chain/gen/genesis/util.go @@ -5,13 +5,10 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/go-state-types/network" cbg "github.com/whyrusleeping/cbor-gen" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/chain/actors" - "github.com/filecoin-project/lotus/chain/actors/builtin" - "github.com/filecoin-project/lotus/chain/state" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/vm" ) @@ -24,12 +21,7 @@ func mustEnc(i cbg.CBORMarshaler) []byte { return enc } -func doExecValue(ctx context.Context, vm *vm.LegacyVM, to, from address.Address, value types.BigInt, method abi.MethodNum, params []byte) ([]byte, error) { - act, err := vm.StateTree().GetActor(from) - if err != nil { - return nil, xerrors.Errorf("doExec failed to get from actor (%s): %w", from, err) - } - +func doExecValue(ctx context.Context, vm vm.Interface, to, from address.Address, value types.BigInt, method abi.MethodNum, params []byte) ([]byte, error) { ret, err := vm.ApplyImplicitMessage(ctx, &types.Message{ To: to, From: from, @@ -37,7 +29,7 @@ func doExecValue(ctx context.Context, vm *vm.LegacyVM, to, from address.Address, Params: params, GasLimit: 1_000_000_000_000_000, Value: value, - Nonce: act.Nonce, + Nonce: 0, }) if err != nil { return nil, xerrors.Errorf("doExec apply message failed: %w", err) @@ -49,36 +41,3 @@ func doExecValue(ctx context.Context, vm *vm.LegacyVM, to, from address.Address, return ret.Return, nil } - -func patchManifestCodeCids(st *state.StateTree, nv network.Version) error { - av, err := actors.VersionForNetwork(nv) - if err != nil { - return err - } - - var acts []address.Address - err = st.ForEach(func(a address.Address, _ *types.Actor) error { - acts = append(acts, a) - return nil - }) - if err != nil { - return xerrors.Errorf("error collecting actors: %w", err) - } - - for _, a := range acts { - err = st.MutateActor(a, func(act *types.Actor) error { - name := actors.CanonicalName(builtin.ActorNameByCode(act.Code)) - code, ok := actors.GetActorCodeID(av, name) - if ok { - act.Code = code - } - return nil - }) - - if err != nil { - return xerrors.Errorf("error mutating actor %s: %w", a, err) - } - } - - return nil -} diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index 7c11ff30c..17485c052 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -16,6 +16,12 @@ import ( "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" rtt "github.com/filecoin-project/go-state-types/rt" + rt0 "github.com/filecoin-project/specs-actors/actors/runtime" + rt2 "github.com/filecoin-project/specs-actors/v2/actors/runtime" + rt3 "github.com/filecoin-project/specs-actors/v3/actors/runtime" + rt4 "github.com/filecoin-project/specs-actors/v4/actors/runtime" + rt5 "github.com/filecoin-project/specs-actors/v5/actors/runtime" + rt6 "github.com/filecoin-project/specs-actors/v6/actors/runtime" rt7 "github.com/filecoin-project/specs-actors/v7/actors/runtime" "github.com/ipfs/go-cid" ipldcbor "github.com/ipfs/go-ipld-cbor" @@ -142,13 +148,13 @@ func (rt *Runtime) StorePut(x cbor.Marshaler) cid.Cid { return c } -//var _ rt0.Runtime = (*Runtime)(nil) -//var _ rt5.Runtime = (*Runtime)(nil) -//var _ rt2.Runtime = (*Runtime)(nil) -//var _ rt3.Runtime = (*Runtime)(nil) -//var _ rt4.Runtime = (*Runtime)(nil) -//var _ rt5.Runtime = (*Runtime)(nil) -//var _ rt6.Runtime = (*Runtime)(nil) +var _ rt0.Runtime = (*Runtime)(nil) +var _ rt5.Runtime = (*Runtime)(nil) +var _ rt2.Runtime = (*Runtime)(nil) +var _ rt3.Runtime = (*Runtime)(nil) +var _ rt4.Runtime = (*Runtime)(nil) +var _ rt5.Runtime = (*Runtime)(nil) +var _ rt6.Runtime = (*Runtime)(nil) var _ rt7.Runtime = (*Runtime)(nil) func (rt *Runtime) shimCall(f func() interface{}) (rval []byte, aerr aerrors.ActorError) { diff --git a/cmd/lotus-seed/seed/seed.go b/cmd/lotus-seed/seed/seed.go index 97d2b3a85..55411713e 100644 --- a/cmd/lotus-seed/seed/seed.go +++ b/cmd/lotus-seed/seed/seed.go @@ -270,6 +270,7 @@ func createDeals(m *genesis.Miner, k *wallet.Key, maddr address.Address, ssize a ClientCollateral: big.Zero(), } + sector.DealClientKey = k sector.Deal = *proposal } diff --git a/extern/storage-sealing/commit_batch_test.go b/extern/storage-sealing/commit_batch_test.go index 97aa6523e..4b2f56aec 100644 --- a/extern/storage-sealing/commit_batch_test.go +++ b/extern/storage-sealing/commit_batch_test.go @@ -21,7 +21,6 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/extern/sector-storage/ffiwrapper" sealing "github.com/filecoin-project/lotus/extern/storage-sealing" @@ -154,7 +153,7 @@ func TestCommitBatcher(t *testing.T) { //stm: @CHAIN_STATE_MINER_INFO_001, @CHAIN_STATE_NETWORK_VERSION_001, @CHAIN_STATE_MINER_GET_COLLATERAL_001 expectSend := func(expect []abi.SectorNumber, aboveBalancer, failOnePCI bool) action { return func(t *testing.T, s *mocks.MockCommitBatcherApi, pcb *sealing.CommitBatcher) promise { - s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(miner.MinerInfo{Owner: t0123, Worker: t0123}, nil) + s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(api.MinerInfo{Owner: t0123, Worker: t0123}, nil) ti := len(expect) batch := false diff --git a/extern/storage-sealing/precommit_batch_test.go b/extern/storage-sealing/precommit_batch_test.go index ff62eea8a..e2cea330e 100644 --- a/extern/storage-sealing/precommit_batch_test.go +++ b/extern/storage-sealing/precommit_batch_test.go @@ -23,7 +23,6 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" sealing "github.com/filecoin-project/lotus/extern/storage-sealing" "github.com/filecoin-project/lotus/extern/storage-sealing/mocks" @@ -161,7 +160,7 @@ func TestPrecommitBatcher(t *testing.T) { s.EXPECT().ChainBaseFee(gomock.Any(), gomock.Any()).Return(big.NewInt(10001), nil) s.EXPECT().StateNetworkVersion(gomock.Any(), gomock.Any()).Return(network.Version14, nil) - s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(miner.MinerInfo{Owner: t0123, Worker: t0123}, nil) + s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(api.MinerInfo{Owner: t0123, Worker: t0123}, nil) s.EXPECT().SendMsg(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), funMatcher(func(i interface{}) bool { b := i.([]byte) var params miner6.PreCommitSectorBatchParams @@ -182,7 +181,7 @@ func TestPrecommitBatcher(t *testing.T) { s.EXPECT().ChainBaseFee(gomock.Any(), gomock.Any()).Return(big.NewInt(9999), nil) s.EXPECT().StateNetworkVersion(gomock.Any(), gomock.Any()).Return(network.Version14, nil) - s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(miner.MinerInfo{Owner: t0123, Worker: t0123}, nil) + s.EXPECT().StateMinerInfo(gomock.Any(), gomock.Any(), gomock.Any()).Return(api.MinerInfo{Owner: t0123, Worker: t0123}, nil) for _, number := range expect { numClone := number s.EXPECT().SendMsg(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), funMatcher(func(i interface{}) bool { diff --git a/genesis/types.go b/genesis/types.go index 3b94eecce..1a4bbec41 100644 --- a/genesis/types.go +++ b/genesis/types.go @@ -3,6 +3,8 @@ package genesis import ( "encoding/json" + "github.com/filecoin-project/lotus/chain/wallet" + "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" market8 "github.com/filecoin-project/go-state-types/builtin/v8/market" @@ -19,11 +21,12 @@ const ( ) type PreSeal struct { - CommR cid.Cid - CommD cid.Cid - SectorID abi.SectorNumber - Deal market8.DealProposal - ProofType abi.RegisteredSealProof + CommR cid.Cid + CommD cid.Cid + SectorID abi.SectorNumber + Deal market8.DealProposal + DealClientKey *wallet.Key + ProofType abi.RegisteredSealProof } type Miner struct { diff --git a/go.mod b/go.mod index b4df1063e..983854044 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/filecoin-project/go-legs v0.3.10 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.6 + github.com/filecoin-project/go-state-types v0.1.7 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 ed4ed4356..d15ff76a7 100644 --- a/go.sum +++ b/go.sum @@ -371,8 +371,9 @@ github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/ github.com/filecoin-project/go-state-types v0.1.3/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.4-0.20220511200558-7a486892661a/go.mod h1:xCA/WfKlC2zcn3fUmDv4IrzznwS98X5XW/irUP3Lhxg= github.com/filecoin-project/go-state-types v0.1.4/go.mod h1:xCA/WfKlC2zcn3fUmDv4IrzznwS98X5XW/irUP3Lhxg= -github.com/filecoin-project/go-state-types v0.1.6 h1:xDDYt188auutDP7miWceT8H7woW9EgunkM+EEm0mCLg= 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.7 h1:r/ZzyUA+CqY8IXyHsLtliqRgPFaON+aC2MmWKm1nl98= +github.com/filecoin-project/go-state-types v0.1.7/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= 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-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= diff --git a/itests/deals_retry_deal_no_funds_test.go b/itests/deals_retry_deal_no_funds_test.go index cede2a8ab..3abd82053 100644 --- a/itests/deals_retry_deal_no_funds_test.go +++ b/itests/deals_retry_deal_no_funds_test.go @@ -261,7 +261,7 @@ func TestDealsRetryLackOfFunds_belowLimit(t *testing.T) { dp.EpochPrice = abi.NewTokenAmount(62500000) // minimum asking price. deal := dh.StartDeal(ctx, dp) - err = dh.ExpectDealFailure(ctx, deal, "actor balance less than needed") + err = dh.ExpectDealFailure(ctx, deal, "Actor balance less than needed") if err != nil { t.Fatal(err) } diff --git a/itests/gateway_test.go b/itests/gateway_test.go index d5bc9c0eb..249112b1f 100644 --- a/itests/gateway_test.go +++ b/itests/gateway_test.go @@ -138,8 +138,8 @@ func TestGatewayWalletMsig(t *testing.T) { //stm: @CHAIN_STATE_MINER_AVAILABLE_BALANCE_001 msigBalance, err := lite.MsigGetAvailableBalance(ctx, msig, types.EmptyTSK) require.NoError(t, err) - require.Greater(t, msigBalance.Int64(), int64(0)) - require.Less(t, msigBalance.Int64(), amt.Int64()) + require.GreaterOrEqual(t, msigBalance.Int64(), int64(0)) + require.LessOrEqual(t, msigBalance.Int64(), amt.Int64()) // Propose to add a new address to the msig proto, err = lite.MsigAddPropose(ctx, msig, walletAddrs[0], walletAddrs[3], false) diff --git a/lotuspond/front/src/chain/methods.json b/lotuspond/front/src/chain/methods.json index 15c04ca28..938105528 100644 --- a/lotuspond/front/src/chain/methods.json +++ b/lotuspond/front/src/chain/methods.json @@ -730,5 +730,113 @@ "UseBytes", "RestoreBytes", "RemoveVerifiedClientDataCap" + ], + "fil/8/account": [ + "Send", + "Constructor", + "PubkeyAddress" + ], + "fil/8/cron": [ + "Send", + "Constructor", + "EpochTick" + ], + "fil/8/init": [ + "Send", + "Constructor", + "Exec" + ], + "fil/8/multisig": [ + "Send", + "Constructor", + "Propose", + "Approve", + "Cancel", + "AddSigner", + "RemoveSigner", + "SwapSigner", + "ChangeNumApprovalsThreshold", + "LockBalance" + ], + "fil/8/paymentchannel": [ + "Send", + "Constructor", + "UpdateChannelState", + "Settle", + "Collect" + ], + "fil/8/reward": [ + "Send", + "Constructor", + "AwardBlockReward", + "ThisEpochReward", + "UpdateNetworkKPI" + ], + "fil/8/storagemarket": [ + "Send", + "Constructor", + "AddBalance", + "WithdrawBalance", + "PublishStorageDeals", + "VerifyDealsForActivation", + "ActivateDeals", + "OnMinerSectorsTerminate", + "ComputeDataCommitment", + "CronTick" + ], + "fil/8/storageminer": [ + "Send", + "Constructor", + "ControlAddresses", + "ChangeWorkerAddress", + "ChangePeerID", + "SubmitWindowedPoSt", + "PreCommitSector", + "ProveCommitSector", + "ExtendSectorExpiration", + "TerminateSectors", + "DeclareFaults", + "DeclareFaultsRecovered", + "OnDeferredCronEvent", + "CheckSectorProven", + "ApplyRewards", + "ReportConsensusFault", + "WithdrawBalance", + "ConfirmSectorProofsValid", + "ChangeMultiaddrs", + "CompactPartitions", + "CompactSectorNumbers", + "ConfirmUpdateWorkerKey", + "RepayDebt", + "ChangeOwnerAddress", + "DisputeWindowedPoSt", + "PreCommitSectorBatch", + "ProveCommitAggregate", + "ProveReplicaUpdates" + ], + "fil/8/storagepower": [ + "Send", + "Constructor", + "CreateMiner", + "UpdateClaimedPower", + "EnrollCronEvent", + "CronTick", + "UpdatePledgeTotal", + "SubmitPoRepForBulkVerify", + "CurrentTotalPower" + ], + "fil/8/system": [ + "Send", + "Constructor" + ], + "fil/8/verifiedregistry": [ + "Send", + "Constructor", + "AddVerifier", + "RemoveVerifier", + "AddVerifiedClient", + "UseBytes", + "RestoreBytes", + "RemoveVerifiedClientDataCap" ] } \ No newline at end of file diff --git a/storage/mockstorage/preseal.go b/storage/mockstorage/preseal.go index fda494dd0..4e5b2306c 100644 --- a/storage/mockstorage/preseal.go +++ b/storage/mockstorage/preseal.go @@ -65,6 +65,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (* ProviderCollateral: big.Zero(), ClientCollateral: big.Zero(), } + preseal.DealClientKey = k genm.Sectors[i] = preseal } diff --git a/testplans/lotus-soup/go.mod b/testplans/lotus-soup/go.mod index 99a5c05b4..0da2cb5ea 100644 --- a/testplans/lotus-soup/go.mod +++ b/testplans/lotus-soup/go.mod @@ -9,9 +9,9 @@ require ( github.com/drand/drand v1.3.0 github.com/filecoin-project/go-address v0.0.6 github.com/filecoin-project/go-data-transfer v1.15.1 - github.com/filecoin-project/go-fil-markets v1.20.2 + github.com/filecoin-project/go-fil-markets v1.20.1-v16-1 github.com/filecoin-project/go-jsonrpc v0.1.5 - github.com/filecoin-project/go-state-types v0.1.6 + github.com/filecoin-project/go-state-types v0.1.7 github.com/filecoin-project/go-storedcounter v0.1.0 github.com/filecoin-project/lotus v0.0.0-00010101000000-000000000000 github.com/filecoin-project/specs-actors v0.9.15-0.20220514164640-94e0d5e123bd @@ -99,7 +99,7 @@ require ( github.com/filecoin-project/go-paramfetch v0.0.4 // indirect github.com/filecoin-project/go-statemachine v1.0.2 // indirect github.com/filecoin-project/go-statestore v0.2.0 // indirect - github.com/filecoin-project/index-provider v0.6.1 // indirect + github.com/filecoin-project/index-provider v0.5.0 // indirect github.com/filecoin-project/specs-actors/v2 v2.3.6 // indirect github.com/filecoin-project/specs-actors/v3 v3.1.2 // indirect github.com/filecoin-project/specs-actors/v4 v4.0.2 // indirect @@ -108,7 +108,7 @@ require ( github.com/filecoin-project/specs-actors/v7 v7.0.1-0.20220511223846-637436c27154 // indirect github.com/filecoin-project/specs-actors/v8 v8.0.0-20220422153930-0afe155bfffa // indirect github.com/filecoin-project/specs-storage v0.4.0 // indirect - github.com/filecoin-project/storetheindex v0.4.0 // indirect + github.com/filecoin-project/storetheindex v0.3.5 // indirect github.com/flynn/noise v1.0.0 // indirect github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect diff --git a/testplans/lotus-soup/go.sum b/testplans/lotus-soup/go.sum index 1db58cb7f..d300a5a0b 100644 --- a/testplans/lotus-soup/go.sum +++ b/testplans/lotus-soup/go.sum @@ -397,7 +397,6 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/filecoin-project/dagstore v0.5.2 h1:Nd6oXdnolbbVhpMpkYT5PJHOjQp4OBSntHpMV5pxj3c= github.com/filecoin-project/dagstore v0.5.2/go.mod h1:mdqKzYrRBHf1pRMthYfMv3n37oOw0Tkx7+TxPt240M0= github.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8= @@ -435,9 +434,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.20.1-v16-1 h1:/eZXwVg2Z7qPwTBUAinA7m6w6rLYBeSvE61XW8MTV5M= github.com/filecoin-project/go-fil-markets v1.20.1-v16-1/go.mod h1:QHJZVEbQ7TydJ6hjK87q4MxOmRfDNbQkuSkdjxtqBWo= -github.com/filecoin-project/go-fil-markets v1.20.2 h1:OnfT3ggxksjz0IpPeWF4SvwVqQPmsQE3Ei4CB1Y/d0A= -github.com/filecoin-project/go-fil-markets v1.20.2/go.mod h1:lhA01KAScD9S/N4J5On9Y3vXmqm/r2yWlKrbKRItLGY= 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= @@ -446,7 +444,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 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI= github.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g= github.com/filecoin-project/go-indexer-core v0.2.8/go.mod h1:IagNfTdFuX4057kla43PjRCn3yBuUiZgIxuA0hTUamY= -github.com/filecoin-project/go-indexer-core v0.2.9/go.mod h1:u03I3HB6ZnqCc3cm8Tq+QkTWBbfKOvNxM8K6Ny/IHRw= github.com/filecoin-project/go-jsonrpc v0.1.5 h1:ckxqZ09ivBAVf5CSmxxrqqNHC7PJm3GYGtYKiNQ+vGk= github.com/filecoin-project/go-jsonrpc v0.1.5/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4= github.com/filecoin-project/go-legs v0.3.7/go.mod h1:pgekGm8/gKY5zCtQ/qGAoSjGP92wTLFqpO3GPHeu8YU= @@ -465,8 +462,9 @@ github.com/filecoin-project/go-state-types v0.1.1-0.20210810190654-139e0e79e69e/ github.com/filecoin-project/go-state-types v0.1.3/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g= github.com/filecoin-project/go-state-types v0.1.4-0.20220511200558-7a486892661a/go.mod h1:xCA/WfKlC2zcn3fUmDv4IrzznwS98X5XW/irUP3Lhxg= github.com/filecoin-project/go-state-types v0.1.4/go.mod h1:xCA/WfKlC2zcn3fUmDv4IrzznwS98X5XW/irUP3Lhxg= -github.com/filecoin-project/go-state-types v0.1.6 h1:xDDYt188auutDP7miWceT8H7woW9EgunkM+EEm0mCLg= 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.7 h1:r/ZzyUA+CqY8IXyHsLtliqRgPFaON+aC2MmWKm1nl98= +github.com/filecoin-project/go-state-types v0.1.7/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= 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-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= @@ -476,9 +474,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.5.0 h1:k2C1RFvOvxmA2i8bhmkb3b4qun7RDRDzzs/y25/TwQg= github.com/filecoin-project/index-provider v0.5.0/go.mod h1:KHVrP2vU3YuScb+fawObwTFoR882up9U07kk0ZrfP0c= -github.com/filecoin-project/index-provider v0.6.1 h1:yVpmtm1ASl2JZMNDC6H2Fe0neYo5akYgaJJB2wlcsMU= -github.com/filecoin-project/index-provider v0.6.1/go.mod h1:iAbSQ6sUpKC4GqfUSheGnYwj9d9B+X8pPi4BV1PgwZA= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= github.com/filecoin-project/specs-actors v0.9.15-0.20220514164640-94e0d5e123bd h1:PoQ9+o9zjqD7gBMAvG0nwvpmmONo2lFajmjIfzlqeFc= github.com/filecoin-project/specs-actors v0.9.15-0.20220514164640-94e0d5e123bd/go.mod h1:pjGEe3QlWtK20ju/aFRsiArbMX6Cn8rqEhhsiCM9xYE= @@ -502,14 +499,12 @@ github.com/filecoin-project/specs-actors/v6 v6.0.2-0.20220511204807-569c6d12432b github.com/filecoin-project/specs-actors/v7 v7.0.0/go.mod h1:TA5FwCna+Yi36POaT7SLKXsgEDvJwc0V/L6ZsO19B9M= github.com/filecoin-project/specs-actors/v7 v7.0.1-0.20220511223846-637436c27154 h1:NKA2mpz3GAksmrP7P13zLufvoYG9DlasgKxdhrk9gGM= github.com/filecoin-project/specs-actors/v7 v7.0.1-0.20220511223846-637436c27154/go.mod h1:2pWr2Soyl4yfOkoMThzj41l2lPIRC+CUgU5cW3wI+K4= -github.com/filecoin-project/specs-actors/v8 v8.0.0-20220407202104-e375a8763a1c/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-actors/v8 v8.0.0-20220422153930-0afe155bfffa h1:P9l2WQMvWUJ450esBttbAaqH8Lhe1hu1W2J6cQsiZcA= github.com/filecoin-project/specs-actors/v8 v8.0.0-20220422153930-0afe155bfffa/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-storage v0.4.0 h1:Gima+B0dNwtsLJrvpg40W3HgHOgWTYyl8lPEYeOxuPk= github.com/filecoin-project/specs-storage v0.4.0/go.mod h1:Z2eK6uMwAOSLjek6+sy0jNV2DSsMEENziMUz0GHRFBw= +github.com/filecoin-project/storetheindex v0.3.5 h1:KoS9TvjPm6zIZfUH8atAHJbVHOO7GTP1MdTG+v0eE+Q= github.com/filecoin-project/storetheindex v0.3.5/go.mod h1:0r3d0kSpK63O6AvLr1CjAINLi+nWD49clzcnKV+GLpI= -github.com/filecoin-project/storetheindex v0.4.0 h1:MPIDJYBknPbwBcVf+2/WEIK6LKxhZmfQGCrqKmvhFyU= -github.com/filecoin-project/storetheindex v0.4.0/go.mod h1:LIwqpXoKeGxOGEjmxPfdYVPQYoZOSI3oXMUd9XTCpjc= github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= 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= @@ -801,7 +796,6 @@ github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA github.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 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/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= 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/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1180,7 +1174,6 @@ github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20211210234204-ce2a1c70cd 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/ipld/go-storethehash v0.0.1/go.mod h1:w8cQfWInks8lvvbQTiKbCPusU9v0sqiViBihTHbavpQ= -github.com/ipld/go-storethehash v0.0.2/go.mod h1:w8cQfWInks8lvvbQTiKbCPusU9v0sqiViBihTHbavpQ= 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= diff --git a/testplans/lotus-soup/paych/stress.go b/testplans/lotus-soup/paych/stress.go index 4f107bf5b..6b91d7277 100644 --- a/testplans/lotus-soup/paych/stress.go +++ b/testplans/lotus-soup/paych/stress.go @@ -6,11 +6,12 @@ import ( "os" "time" + "github.com/filecoin-project/go-state-types/builtin/v8/paych" + "github.com/ipfs/go-cid" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" - "github.com/filecoin-project/specs-actors/actors/builtin/paych" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/big"