From ae4010ffb6d48b6c87647ee75c3b715dcf469698 Mon Sep 17 00:00:00 2001 From: Geoff Stuart Date: Tue, 13 Dec 2022 18:02:34 -0500 Subject: [PATCH] Drop actor keys from chain/actors/manifest.go --- build/builtin_actors_test.go | 3 +- chain/actors/actor_cids.go | 25 +++---- chain/actors/builtin/account/account.go | 3 +- .../actors/builtin/account/actor.go.template | 3 +- .../actors/builtin/account/state.go.template | 3 +- chain/actors/builtin/account/v0.go | 3 +- chain/actors/builtin/account/v10.go | 3 +- chain/actors/builtin/account/v2.go | 3 +- chain/actors/builtin/account/v3.go | 3 +- chain/actors/builtin/account/v4.go | 3 +- chain/actors/builtin/account/v5.go | 3 +- chain/actors/builtin/account/v6.go | 3 +- chain/actors/builtin/account/v7.go | 3 +- chain/actors/builtin/account/v8.go | 3 +- chain/actors/builtin/account/v9.go | 3 +- chain/actors/builtin/builtin.go | 5 +- chain/actors/builtin/builtin.go.template | 5 +- chain/actors/builtin/cron/actor.go.template | 3 +- chain/actors/builtin/cron/cron.go | 3 +- chain/actors/builtin/cron/state.go.template | 3 +- chain/actors/builtin/cron/v0.go | 3 +- chain/actors/builtin/cron/v10.go | 3 +- chain/actors/builtin/cron/v2.go | 3 +- chain/actors/builtin/cron/v3.go | 3 +- chain/actors/builtin/cron/v4.go | 3 +- chain/actors/builtin/cron/v5.go | 3 +- chain/actors/builtin/cron/v6.go | 3 +- chain/actors/builtin/cron/v7.go | 3 +- chain/actors/builtin/cron/v8.go | 3 +- chain/actors/builtin/cron/v9.go | 3 +- .../actors/builtin/datacap/actor.go.template | 3 +- chain/actors/builtin/datacap/datacap.go | 3 +- .../actors/builtin/datacap/state.go.template | 3 +- chain/actors/builtin/datacap/v10.go | 3 +- chain/actors/builtin/datacap/v9.go | 3 +- chain/actors/builtin/evm/actor.go.template | 3 +- chain/actors/builtin/evm/evm.go | 3 +- chain/actors/builtin/init/actor.go.template | 3 +- chain/actors/builtin/init/init.go | 3 +- chain/actors/builtin/init/state.go.template | 3 +- chain/actors/builtin/init/v0.go | 3 +- chain/actors/builtin/init/v10.go | 3 +- chain/actors/builtin/init/v2.go | 3 +- chain/actors/builtin/init/v3.go | 3 +- chain/actors/builtin/init/v4.go | 3 +- chain/actors/builtin/init/v5.go | 3 +- chain/actors/builtin/init/v6.go | 3 +- chain/actors/builtin/init/v7.go | 3 +- chain/actors/builtin/init/v8.go | 3 +- chain/actors/builtin/init/v9.go | 3 +- chain/actors/builtin/market/actor.go.template | 3 +- chain/actors/builtin/market/market.go | 3 +- chain/actors/builtin/market/state.go.template | 3 +- chain/actors/builtin/market/v0.go | 3 +- chain/actors/builtin/market/v10.go | 3 +- chain/actors/builtin/market/v2.go | 3 +- chain/actors/builtin/market/v3.go | 3 +- chain/actors/builtin/market/v4.go | 3 +- chain/actors/builtin/market/v5.go | 3 +- chain/actors/builtin/market/v6.go | 3 +- chain/actors/builtin/market/v7.go | 3 +- chain/actors/builtin/market/v8.go | 3 +- chain/actors/builtin/market/v9.go | 3 +- chain/actors/builtin/miner/actor.go.template | 3 +- chain/actors/builtin/miner/miner.go | 3 +- chain/actors/builtin/miner/state.go.template | 3 +- chain/actors/builtin/miner/v0.go | 3 +- chain/actors/builtin/miner/v10.go | 3 +- chain/actors/builtin/miner/v2.go | 3 +- chain/actors/builtin/miner/v3.go | 3 +- chain/actors/builtin/miner/v4.go | 3 +- chain/actors/builtin/miner/v5.go | 3 +- chain/actors/builtin/miner/v6.go | 3 +- chain/actors/builtin/miner/v7.go | 3 +- chain/actors/builtin/miner/v8.go | 3 +- chain/actors/builtin/miner/v9.go | 3 +- .../actors/builtin/multisig/actor.go.template | 3 +- .../builtin/multisig/message.go.template | 3 +- chain/actors/builtin/multisig/message10.go | 3 +- chain/actors/builtin/multisig/message8.go | 3 +- chain/actors/builtin/multisig/message9.go | 3 +- chain/actors/builtin/multisig/multisig.go | 3 +- .../actors/builtin/multisig/state.go.template | 3 +- chain/actors/builtin/multisig/v0.go | 3 +- chain/actors/builtin/multisig/v10.go | 3 +- chain/actors/builtin/multisig/v2.go | 3 +- chain/actors/builtin/multisig/v3.go | 3 +- chain/actors/builtin/multisig/v4.go | 3 +- chain/actors/builtin/multisig/v5.go | 3 +- chain/actors/builtin/multisig/v6.go | 3 +- chain/actors/builtin/multisig/v7.go | 3 +- chain/actors/builtin/multisig/v8.go | 3 +- chain/actors/builtin/multisig/v9.go | 3 +- chain/actors/builtin/paych/actor.go.template | 3 +- chain/actors/builtin/paych/mock/mock.go | 4 +- chain/actors/builtin/paych/paych.go | 3 +- chain/actors/builtin/paych/state.go.template | 3 +- chain/actors/builtin/paych/v0.go | 3 +- chain/actors/builtin/paych/v10.go | 3 +- chain/actors/builtin/paych/v2.go | 3 +- chain/actors/builtin/paych/v3.go | 3 +- chain/actors/builtin/paych/v4.go | 3 +- chain/actors/builtin/paych/v5.go | 3 +- chain/actors/builtin/paych/v6.go | 3 +- chain/actors/builtin/paych/v7.go | 3 +- chain/actors/builtin/paych/v8.go | 3 +- chain/actors/builtin/paych/v9.go | 3 +- chain/actors/builtin/power/actor.go.template | 3 +- chain/actors/builtin/power/power.go | 3 +- chain/actors/builtin/power/state.go.template | 3 +- chain/actors/builtin/power/v0.go | 3 +- chain/actors/builtin/power/v10.go | 3 +- chain/actors/builtin/power/v2.go | 3 +- chain/actors/builtin/power/v3.go | 3 +- chain/actors/builtin/power/v4.go | 3 +- chain/actors/builtin/power/v5.go | 3 +- chain/actors/builtin/power/v6.go | 3 +- chain/actors/builtin/power/v7.go | 3 +- chain/actors/builtin/power/v8.go | 3 +- chain/actors/builtin/power/v9.go | 3 +- chain/actors/builtin/registry.go | 71 ++++++++++--------- chain/actors/builtin/registry.go.template | 25 +++---- chain/actors/builtin/reward/actor.go.template | 3 +- chain/actors/builtin/reward/reward.go | 3 +- chain/actors/builtin/reward/state.go.template | 3 +- chain/actors/builtin/reward/v0.go | 3 +- chain/actors/builtin/reward/v10.go | 3 +- chain/actors/builtin/reward/v2.go | 3 +- chain/actors/builtin/reward/v3.go | 3 +- chain/actors/builtin/reward/v4.go | 3 +- chain/actors/builtin/reward/v5.go | 3 +- chain/actors/builtin/reward/v6.go | 3 +- chain/actors/builtin/reward/v7.go | 3 +- chain/actors/builtin/reward/v8.go | 3 +- chain/actors/builtin/reward/v9.go | 3 +- chain/actors/builtin/system/actor.go.template | 3 +- chain/actors/builtin/system/state.go.template | 3 +- chain/actors/builtin/system/system.go | 3 +- chain/actors/builtin/system/v0.go | 3 +- chain/actors/builtin/system/v10.go | 3 +- chain/actors/builtin/system/v2.go | 3 +- chain/actors/builtin/system/v3.go | 3 +- chain/actors/builtin/system/v4.go | 3 +- chain/actors/builtin/system/v5.go | 3 +- chain/actors/builtin/system/v6.go | 3 +- chain/actors/builtin/system/v7.go | 3 +- chain/actors/builtin/system/v8.go | 3 +- chain/actors/builtin/system/v9.go | 3 +- .../actors/builtin/verifreg/actor.go.template | 3 +- .../actors/builtin/verifreg/state.go.template | 3 +- chain/actors/builtin/verifreg/v0.go | 3 +- chain/actors/builtin/verifreg/v10.go | 3 +- chain/actors/builtin/verifreg/v2.go | 3 +- chain/actors/builtin/verifreg/v3.go | 3 +- chain/actors/builtin/verifreg/v4.go | 3 +- chain/actors/builtin/verifreg/v5.go | 3 +- chain/actors/builtin/verifreg/v6.go | 3 +- chain/actors/builtin/verifreg/v7.go | 3 +- chain/actors/builtin/verifreg/v8.go | 3 +- chain/actors/builtin/verifreg/v9.go | 3 +- chain/actors/builtin/verifreg/verifreg.go | 3 +- chain/actors/manifest.go | 47 +----------- chain/consensus/filcns/upgrades.go | 4 +- chain/gen/genesis/f00_system.go | 2 +- chain/gen/genesis/f01_init.go | 3 +- chain/gen/genesis/f02_reward.go | 3 +- chain/gen/genesis/f03_cron.go | 3 +- chain/gen/genesis/f04_power.go | 3 +- chain/gen/genesis/f05_market.go | 3 +- chain/gen/genesis/f06_vreg.go | 3 +- chain/gen/genesis/f07_dcap.go | 3 +- chain/gen/genesis/genesis.go | 5 +- chain/vm/fvm.go | 3 +- cmd/lotus-shed/migrations.go | 3 +- itests/lite_migration_test.go | 3 +- storage/wdpost/wdpost_run_test.go | 3 +- 176 files changed, 410 insertions(+), 281 deletions(-) diff --git a/build/builtin_actors_test.go b/build/builtin_actors_test.go index 384193fee4b..858a8b3a18b 100644 --- a/build/builtin_actors_test.go +++ b/build/builtin_actors_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors" @@ -26,7 +27,7 @@ func TestRegistration(t *testing.T) { require.True(t, found) require.True(t, manifestCid.Defined()) - for _, key := range actors.GetBuiltinActorsKeys(av) { + for _, key := range manifest.GetBuiltinActorsKeys(av) { actorCid, found := actors.GetActorCodeID(av, key) require.True(t, found) name, version, found := actors.GetActorMetaByCode(actorCid) diff --git a/chain/actors/actor_cids.go b/chain/actors/actor_cids.go index 042426801dd..ad9ae490929 100644 --- a/chain/actors/actor_cids.go +++ b/chain/actors/actor_cids.go @@ -5,6 +5,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -28,7 +29,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { // Actors V7 and lower switch name { - case AccountKey: + case manifest.AccountKey: switch av { case actorstypes.Version0: @@ -53,7 +54,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.AccountActorCodeID, true } - case CronKey: + case manifest.CronKey: switch av { case actorstypes.Version0: @@ -78,7 +79,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.CronActorCodeID, true } - case InitKey: + case manifest.InitKey: switch av { case actorstypes.Version0: @@ -103,7 +104,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.InitActorCodeID, true } - case MarketKey: + case manifest.MarketKey: switch av { case actorstypes.Version0: @@ -128,7 +129,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.StorageMarketActorCodeID, true } - case MinerKey: + case manifest.MinerKey: switch av { case actorstypes.Version0: @@ -153,7 +154,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.StorageMinerActorCodeID, true } - case MultisigKey: + case manifest.MultisigKey: switch av { case actorstypes.Version0: @@ -178,7 +179,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.MultisigActorCodeID, true } - case PaychKey: + case manifest.PaychKey: switch av { case actorstypes.Version0: @@ -203,7 +204,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.PaymentChannelActorCodeID, true } - case PowerKey: + case manifest.PowerKey: switch av { case actorstypes.Version0: @@ -228,7 +229,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.StoragePowerActorCodeID, true } - case RewardKey: + case manifest.RewardKey: switch av { case actorstypes.Version0: @@ -253,7 +254,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.RewardActorCodeID, true } - case SystemKey: + case manifest.SystemKey: switch av { case actorstypes.Version0: @@ -278,7 +279,7 @@ func GetActorCodeID(av actorstypes.Version, name string) (cid.Cid, bool) { return builtin7.SystemActorCodeID, true } - case VerifregKey: + case manifest.VerifregKey: switch av { case actorstypes.Version0: @@ -314,7 +315,7 @@ func GetActorCodeIDs(av actorstypes.Version) (map[string]cid.Cid, error) { return cids, nil } - actorsKeys := GetBuiltinActorsKeys(av) + actorsKeys := manifest.GetBuiltinActorsKeys(av) synthCids := make(map[string]cid.Cid) for _, key := range actorsKeys { diff --git a/chain/actors/builtin/account/account.go b/chain/actors/builtin/account/account.go index 5a2d55961f3..4542ad76709 100644 --- a/chain/actors/builtin/account/account.go +++ b/chain/actors/builtin/account/account.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -25,7 +26,7 @@ var Methods = builtin10.MethodsAccount func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.AccountKey { + if name != manifest.AccountKey { return nil, xerrors.Errorf("actor code is not account: %s", name) } diff --git a/chain/actors/builtin/account/actor.go.template b/chain/actors/builtin/account/actor.go.template index ef6e7ac3dbf..2db38eff6f0 100644 --- a/chain/actors/builtin/account/actor.go.template +++ b/chain/actors/builtin/account/actor.go.template @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} {{if (le . 7)}} @@ -24,7 +25,7 @@ var Methods = builtin{{.latestVersion}}.MethodsAccount func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.AccountKey { + if name != manifest.AccountKey { return nil, xerrors.Errorf("actor code is not account: %s", name) } diff --git a/chain/actors/builtin/account/state.go.template b/chain/actors/builtin/account/state.go.template index 9b623519d84..55a56de8cd3 100644 --- a/chain/actors/builtin/account/state.go.template +++ b/chain/actors/builtin/account/state.go.template @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} account{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/account" @@ -48,7 +49,7 @@ func (s *state{{.v}}) GetState() interface{} { } func (s *state{{.v}}) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v0.go b/chain/actors/builtin/account/v0.go index f6af2c79cbd..a41ee3879ed 100644 --- a/chain/actors/builtin/account/v0.go +++ b/chain/actors/builtin/account/v0.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account0 "github.com/filecoin-project/specs-actors/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state0) GetState() interface{} { } func (s *state0) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v10.go b/chain/actors/builtin/account/v10.go index dbe7c609e71..ff87c421220 100644 --- a/chain/actors/builtin/account/v10.go +++ b/chain/actors/builtin/account/v10.go @@ -8,6 +8,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" account10 "github.com/filecoin-project/go-state-types/builtin/v10/account" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -44,7 +45,7 @@ func (s *state10) GetState() interface{} { } func (s *state10) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v2.go b/chain/actors/builtin/account/v2.go index 5e2297b4ac5..db0af77e2a7 100644 --- a/chain/actors/builtin/account/v2.go +++ b/chain/actors/builtin/account/v2.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state2) GetState() interface{} { } func (s *state2) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v3.go b/chain/actors/builtin/account/v3.go index 4e142bcf74d..9e6c71ad0f6 100644 --- a/chain/actors/builtin/account/v3.go +++ b/chain/actors/builtin/account/v3.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state3) GetState() interface{} { } func (s *state3) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v4.go b/chain/actors/builtin/account/v4.go index 7b1e7f0ddfe..907896312ee 100644 --- a/chain/actors/builtin/account/v4.go +++ b/chain/actors/builtin/account/v4.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state4) GetState() interface{} { } func (s *state4) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v5.go b/chain/actors/builtin/account/v5.go index ad8bed522b1..8514ab325e1 100644 --- a/chain/actors/builtin/account/v5.go +++ b/chain/actors/builtin/account/v5.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state5) GetState() interface{} { } func (s *state5) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v6.go b/chain/actors/builtin/account/v6.go index 74c959c5fa0..16369f38c26 100644 --- a/chain/actors/builtin/account/v6.go +++ b/chain/actors/builtin/account/v6.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state6) GetState() interface{} { } func (s *state6) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v7.go b/chain/actors/builtin/account/v7.go index 24d259f33dd..cd420da92ae 100644 --- a/chain/actors/builtin/account/v7.go +++ b/chain/actors/builtin/account/v7.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" account7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/account" "github.com/filecoin-project/lotus/chain/actors" @@ -44,7 +45,7 @@ func (s *state7) GetState() interface{} { } func (s *state7) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v8.go b/chain/actors/builtin/account/v8.go index 2a4a74ca43f..13b478de890 100644 --- a/chain/actors/builtin/account/v8.go +++ b/chain/actors/builtin/account/v8.go @@ -8,6 +8,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" account8 "github.com/filecoin-project/go-state-types/builtin/v8/account" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -44,7 +45,7 @@ func (s *state8) GetState() interface{} { } func (s *state8) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/account/v9.go b/chain/actors/builtin/account/v9.go index 97bcd43d75a..fc1fc4d14bf 100644 --- a/chain/actors/builtin/account/v9.go +++ b/chain/actors/builtin/account/v9.go @@ -8,6 +8,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" account9 "github.com/filecoin-project/go-state-types/builtin/v9/account" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -44,7 +45,7 @@ func (s *state9) GetState() interface{} { } func (s *state9) ActorKey() string { - return actors.AccountKey + return manifest.AccountKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/builtin.go b/chain/actors/builtin/builtin.go index 82e80365a04..7811aab6c07 100644 --- a/chain/actors/builtin/builtin.go +++ b/chain/actors/builtin/builtin.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/builtin" smoothingtypes "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing" minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/proof" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -165,7 +166,7 @@ func IsAccountActor(c cid.Cid) bool { func IsStorageMinerActor(c cid.Cid) bool { name, _, ok := actors.GetActorMetaByCode(c) if ok { - return name == actors.MinerKey + return name == manifest.MinerKey } if c == builtin0.StorageMinerActorCodeID { @@ -202,7 +203,7 @@ func IsStorageMinerActor(c cid.Cid) bool { func IsMultisigActor(c cid.Cid) bool { name, _, ok := actors.GetActorMetaByCode(c) if ok { - return name == actors.MultisigKey + return name == manifest.MultisigKey } if c == builtin0.MultisigActorCodeID { diff --git a/chain/actors/builtin/builtin.go.template b/chain/actors/builtin/builtin.go.template index 825f6cc0752..76627945139 100644 --- a/chain/actors/builtin/builtin.go.template +++ b/chain/actors/builtin/builtin.go.template @@ -15,6 +15,7 @@ import ( "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/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" @@ -107,7 +108,7 @@ func IsAccountActor(c cid.Cid) bool { func IsStorageMinerActor(c cid.Cid) bool { name, _, ok := actors.GetActorMetaByCode(c) if ok { - return name == actors.MinerKey + return name == manifest.MinerKey } {{range .versions}} @@ -123,7 +124,7 @@ func IsStorageMinerActor(c cid.Cid) bool { func IsMultisigActor(c cid.Cid) bool { name, _, ok := actors.GetActorMetaByCode(c) if ok { - return name == actors.MultisigKey + return name == manifest.MultisigKey } {{range .versions}} diff --git a/chain/actors/builtin/cron/actor.go.template b/chain/actors/builtin/cron/actor.go.template index 3abb33e6363..7e01483d260 100644 --- a/chain/actors/builtin/cron/actor.go.template +++ b/chain/actors/builtin/cron/actor.go.template @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "golang.org/x/xerrors" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} {{if (le . 7)}} @@ -18,7 +19,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.CronKey { + if name != manifest.CronKey { return nil, xerrors.Errorf("actor code is not cron: %s", name) } diff --git a/chain/actors/builtin/cron/cron.go b/chain/actors/builtin/cron/cron.go index 3f573789a07..43b8c0eaa24 100644 --- a/chain/actors/builtin/cron/cron.go +++ b/chain/actors/builtin/cron/cron.go @@ -6,6 +6,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -21,7 +22,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.CronKey { + if name != manifest.CronKey { return nil, xerrors.Errorf("actor code is not cron: %s", name) } diff --git a/chain/actors/builtin/cron/state.go.template b/chain/actors/builtin/cron/state.go.template index 24739f1629e..ca82d8be839 100644 --- a/chain/actors/builtin/cron/state.go.template +++ b/chain/actors/builtin/cron/state.go.template @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} cron{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/cron" @@ -42,7 +43,7 @@ func (s *state{{.v}}) GetState() interface{} { } func (s *state{{.v}}) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v0.go b/chain/actors/builtin/cron/v0.go index ef5f6d93ede..6dce524f643 100644 --- a/chain/actors/builtin/cron/v0.go +++ b/chain/actors/builtin/cron/v0.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron0 "github.com/filecoin-project/specs-actors/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state0) GetState() interface{} { } func (s *state0) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v10.go b/chain/actors/builtin/cron/v10.go index 4e2e1c815d7..2d20e2401c3 100644 --- a/chain/actors/builtin/cron/v10.go +++ b/chain/actors/builtin/cron/v10.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" cron10 "github.com/filecoin-project/go-state-types/builtin/v10/cron" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -39,7 +40,7 @@ func (s *state10) GetState() interface{} { } func (s *state10) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v2.go b/chain/actors/builtin/cron/v2.go index fc45be0de65..97b3ffbe08b 100644 --- a/chain/actors/builtin/cron/v2.go +++ b/chain/actors/builtin/cron/v2.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state2) GetState() interface{} { } func (s *state2) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v3.go b/chain/actors/builtin/cron/v3.go index 6f8e66a3b87..4c0d4f1d938 100644 --- a/chain/actors/builtin/cron/v3.go +++ b/chain/actors/builtin/cron/v3.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state3) GetState() interface{} { } func (s *state3) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v4.go b/chain/actors/builtin/cron/v4.go index 2539f2b1cb8..a222f0d93dc 100644 --- a/chain/actors/builtin/cron/v4.go +++ b/chain/actors/builtin/cron/v4.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state4) GetState() interface{} { } func (s *state4) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v5.go b/chain/actors/builtin/cron/v5.go index 8aba47a2b81..2487cbbc687 100644 --- a/chain/actors/builtin/cron/v5.go +++ b/chain/actors/builtin/cron/v5.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state5) GetState() interface{} { } func (s *state5) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v6.go b/chain/actors/builtin/cron/v6.go index f607a409f5c..673e7588a9d 100644 --- a/chain/actors/builtin/cron/v6.go +++ b/chain/actors/builtin/cron/v6.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state6) GetState() interface{} { } func (s *state6) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v7.go b/chain/actors/builtin/cron/v7.go index ef962fd41d6..cd71bd41833 100644 --- a/chain/actors/builtin/cron/v7.go +++ b/chain/actors/builtin/cron/v7.go @@ -6,6 +6,7 @@ import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" cron7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/cron" "github.com/filecoin-project/lotus/chain/actors" @@ -39,7 +40,7 @@ func (s *state7) GetState() interface{} { } func (s *state7) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v8.go b/chain/actors/builtin/cron/v8.go index 377cba060cb..904de5496a6 100644 --- a/chain/actors/builtin/cron/v8.go +++ b/chain/actors/builtin/cron/v8.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" cron8 "github.com/filecoin-project/go-state-types/builtin/v8/cron" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -39,7 +40,7 @@ func (s *state8) GetState() interface{} { } func (s *state8) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/cron/v9.go b/chain/actors/builtin/cron/v9.go index b2e1d12654b..201348b6cd8 100644 --- a/chain/actors/builtin/cron/v9.go +++ b/chain/actors/builtin/cron/v9.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" cron9 "github.com/filecoin-project/go-state-types/builtin/v9/cron" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -39,7 +40,7 @@ func (s *state9) GetState() interface{} { } func (s *state9) ActorKey() string { - return actors.CronKey + return manifest.CronKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/datacap/actor.go.template b/chain/actors/builtin/datacap/actor.go.template index 15272d7d135..f1bafc30163 100644 --- a/chain/actors/builtin/datacap/actor.go.template +++ b/chain/actors/builtin/datacap/actor.go.template @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" ) var ( @@ -23,7 +24,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.DatacapKey { + if name != manifest.DataCapKey { return nil, xerrors.Errorf("actor code is not datacap: %s", name) } diff --git a/chain/actors/builtin/datacap/datacap.go b/chain/actors/builtin/datacap/datacap.go index 977c020d3d2..f94b03704bf 100644 --- a/chain/actors/builtin/datacap/datacap.go +++ b/chain/actors/builtin/datacap/datacap.go @@ -9,6 +9,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -22,7 +23,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.DatacapKey { + if name != manifest.DataCapKey { return nil, xerrors.Errorf("actor code is not datacap: %s", name) } diff --git a/chain/actors/builtin/datacap/state.go.template b/chain/actors/builtin/datacap/state.go.template index dfb6eaad478..337ee3e25e4 100644 --- a/chain/actors/builtin/datacap/state.go.template +++ b/chain/actors/builtin/datacap/state.go.template @@ -12,6 +12,7 @@ import ( datacap{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}datacap" adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt" + "github.com/filecoin-project/go-state-types/manifest" ) var _ State = (*state{{.v}})(nil) @@ -63,7 +64,7 @@ func (s *state{{.v}}) VerifiedClientDataCap(addr address.Address) (bool, abi.Sto } func (s *state{{.v}}) ActorKey() string { - return actors.DatacapKey + return manifest.DataCapKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/datacap/v10.go b/chain/actors/builtin/datacap/v10.go index 6f4c8593d26..7a68879a9f5 100644 --- a/chain/actors/builtin/datacap/v10.go +++ b/chain/actors/builtin/datacap/v10.go @@ -10,6 +10,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" datacap10 "github.com/filecoin-project/go-state-types/builtin/v10/datacap" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -64,7 +65,7 @@ func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.Storage } func (s *state10) ActorKey() string { - return actors.DatacapKey + return manifest.DataCapKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/datacap/v9.go b/chain/actors/builtin/datacap/v9.go index 6dcf0447765..76ce22ed00f 100644 --- a/chain/actors/builtin/datacap/v9.go +++ b/chain/actors/builtin/datacap/v9.go @@ -10,6 +10,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" datacap9 "github.com/filecoin-project/go-state-types/builtin/v9/datacap" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -64,7 +65,7 @@ func (s *state9) VerifiedClientDataCap(addr address.Address) (bool, abi.StorageP } func (s *state9) ActorKey() string { - return actors.DatacapKey + return manifest.DataCapKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/evm/actor.go.template b/chain/actors/builtin/evm/actor.go.template index 698029253b6..d20db6bcbc2 100644 --- a/chain/actors/builtin/evm/actor.go.template +++ b/chain/actors/builtin/evm/actor.go.template @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" builtin{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin" ) @@ -18,7 +19,7 @@ var Methods = builtin{{.latestVersion}}.MethodsEVM func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.EvmKey { + if name != manifest.EvmKey { return nil, xerrors.Errorf("actor code is not evm: %s", name) } diff --git a/chain/actors/builtin/evm/evm.go b/chain/actors/builtin/evm/evm.go index 69bd90c4287..120ca66f8b2 100644 --- a/chain/actors/builtin/evm/evm.go +++ b/chain/actors/builtin/evm/evm.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -17,7 +18,7 @@ var Methods = builtin10.MethodsEVM func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.EvmKey { + if name != manifest.EvmKey { return nil, xerrors.Errorf("actor code is not evm: %s", name) } diff --git a/chain/actors/builtin/init/actor.go.template b/chain/actors/builtin/init/actor.go.template index 453aba963d1..1d19ebb4073 100644 --- a/chain/actors/builtin/init/actor.go.template +++ b/chain/actors/builtin/init/actor.go.template @@ -13,6 +13,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} {{if (le . 7)}} builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin" @@ -28,7 +29,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.InitKey { + if name != manifest.InitKey { return nil, xerrors.Errorf("actor code is not init: %s", name) } diff --git a/chain/actors/builtin/init/init.go b/chain/actors/builtin/init/init.go index a97d402978b..c38629d2d59 100644 --- a/chain/actors/builtin/init/init.go +++ b/chain/actors/builtin/init/init.go @@ -9,6 +9,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -30,7 +31,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.InitKey { + if name != manifest.InitKey { return nil, xerrors.Errorf("actor code is not init: %s", name) } diff --git a/chain/actors/builtin/init/state.go.template b/chain/actors/builtin/init/state.go.template index c31aef6a0aa..52e223a856b 100644 --- a/chain/actors/builtin/init/state.go.template +++ b/chain/actors/builtin/init/state.go.template @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} {{if (ge .v 3)}} @@ -148,7 +149,7 @@ func (s *state{{.v}}) AddressMapHashFunction() func(input []byte) []byte { } func (s *state{{.v}}) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v0.go b/chain/actors/builtin/init/v0.go index 61ae3f2db9c..7e48dda9e13 100644 --- a/chain/actors/builtin/init/v0.go +++ b/chain/actors/builtin/init/v0.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" init0 "github.com/filecoin-project/specs-actors/actors/builtin/init" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -128,7 +129,7 @@ func (s *state0) AddressMapHashFunction() func(input []byte) []byte { } func (s *state0) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v10.go b/chain/actors/builtin/init/v10.go index 761f9dacc1f..dd8c778dd4a 100644 --- a/chain/actors/builtin/init/v10.go +++ b/chain/actors/builtin/init/v10.go @@ -14,6 +14,7 @@ import ( 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" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -129,7 +130,7 @@ func (s *state10) AddressMapHashFunction() func(input []byte) []byte { } func (s *state10) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v2.go b/chain/actors/builtin/init/v2.go index dfbdde6c9fa..c107bd52d59 100644 --- a/chain/actors/builtin/init/v2.go +++ b/chain/actors/builtin/init/v2.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" init2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/init" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -128,7 +129,7 @@ func (s *state2) AddressMapHashFunction() func(input []byte) []byte { } func (s *state2) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v3.go b/chain/actors/builtin/init/v3.go index 56a5e4afd92..0be11f9761a 100644 --- a/chain/actors/builtin/init/v3.go +++ b/chain/actors/builtin/init/v3.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" init3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/init" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -129,7 +130,7 @@ func (s *state3) AddressMapHashFunction() func(input []byte) []byte { } func (s *state3) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v4.go b/chain/actors/builtin/init/v4.go index b1ecd3188e3..5ca6bc1c81b 100644 --- a/chain/actors/builtin/init/v4.go +++ b/chain/actors/builtin/init/v4.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" init4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/init" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -129,7 +130,7 @@ func (s *state4) AddressMapHashFunction() func(input []byte) []byte { } func (s *state4) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v5.go b/chain/actors/builtin/init/v5.go index b8a6438d77f..f6450789d71 100644 --- a/chain/actors/builtin/init/v5.go +++ b/chain/actors/builtin/init/v5.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" init5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/init" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -129,7 +130,7 @@ func (s *state5) AddressMapHashFunction() func(input []byte) []byte { } func (s *state5) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v6.go b/chain/actors/builtin/init/v6.go index aeadc2caf22..4d2267aa1dc 100644 --- a/chain/actors/builtin/init/v6.go +++ b/chain/actors/builtin/init/v6.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" init6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/init" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -129,7 +130,7 @@ func (s *state6) AddressMapHashFunction() func(input []byte) []byte { } func (s *state6) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v7.go b/chain/actors/builtin/init/v7.go index e62c56277c4..052faf98502 100644 --- a/chain/actors/builtin/init/v7.go +++ b/chain/actors/builtin/init/v7.go @@ -11,6 +11,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" + "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" init7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/init" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -129,7 +130,7 @@ func (s *state7) AddressMapHashFunction() func(input []byte) []byte { } func (s *state7) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v8.go b/chain/actors/builtin/init/v8.go index 145b755517f..c7c7860d399 100644 --- a/chain/actors/builtin/init/v8.go +++ b/chain/actors/builtin/init/v8.go @@ -14,6 +14,7 @@ import ( builtin8 "github.com/filecoin-project/go-state-types/builtin" init8 "github.com/filecoin-project/go-state-types/builtin/v8/init" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -129,7 +130,7 @@ func (s *state8) AddressMapHashFunction() func(input []byte) []byte { } func (s *state8) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/init/v9.go b/chain/actors/builtin/init/v9.go index 8cba18e7af8..a221a4a7c4b 100644 --- a/chain/actors/builtin/init/v9.go +++ b/chain/actors/builtin/init/v9.go @@ -14,6 +14,7 @@ import ( builtin9 "github.com/filecoin-project/go-state-types/builtin" init9 "github.com/filecoin-project/go-state-types/builtin/v9/init" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -129,7 +130,7 @@ func (s *state9) AddressMapHashFunction() func(input []byte) []byte { } func (s *state9) ActorKey() string { - return actors.InitKey + return manifest.InitKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/actor.go.template b/chain/actors/builtin/market/actor.go.template index b8d8c987b55..a84c04ab9c5 100644 --- a/chain/actors/builtin/market/actor.go.template +++ b/chain/actors/builtin/market/actor.go.template @@ -13,6 +13,7 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/cbor" cbg "github.com/whyrusleeping/cbor-gen" + "github.com/filecoin-project/go-state-types/manifest" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" @@ -36,7 +37,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MarketKey { + if name != manifest.MarketKey { return nil, xerrors.Errorf("actor code is not market: %s", name) } diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index e96484d64ea..fc057549d70 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -15,6 +15,7 @@ import ( markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -36,7 +37,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MarketKey { + if name != manifest.MarketKey { return nil, xerrors.Errorf("actor code is not market: %s", name) } diff --git a/chain/actors/builtin/market/state.go.template b/chain/actors/builtin/market/state.go.template index ef5dff0a549..bbaa5c775fa 100644 --- a/chain/actors/builtin/market/state.go.template +++ b/chain/actors/builtin/market/state.go.template @@ -20,6 +20,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/types" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} market{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/market" @@ -394,7 +395,7 @@ func (s *state{{.v}}) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifreg func (s *state{{.v}}) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v0.go b/chain/actors/builtin/market/v0.go index 4af5fe9b071..c0a628b47fc 100644 --- a/chain/actors/builtin/market/v0.go +++ b/chain/actors/builtin/market/v0.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market0 "github.com/filecoin-project/specs-actors/actors/builtin/market" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -312,7 +313,7 @@ func (s *state0) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state0) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v10.go b/chain/actors/builtin/market/v10.go index 21acf15ac70..aaa0ee0f1be 100644 --- a/chain/actors/builtin/market/v10.go +++ b/chain/actors/builtin/market/v10.go @@ -18,6 +18,7 @@ import ( adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -359,7 +360,7 @@ func (s *state10) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtype } func (s *state10) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v2.go b/chain/actors/builtin/market/v2.go index 45a357f333b..89ffdde8f55 100644 --- a/chain/actors/builtin/market/v2.go +++ b/chain/actors/builtin/market/v2.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -312,7 +313,7 @@ func (s *state2) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state2) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v3.go b/chain/actors/builtin/market/v3.go index ec745f5a07e..f4d073ed866 100644 --- a/chain/actors/builtin/market/v3.go +++ b/chain/actors/builtin/market/v3.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/market" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -307,7 +308,7 @@ func (s *state3) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state3) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v4.go b/chain/actors/builtin/market/v4.go index 03e728c150d..422a30cbb12 100644 --- a/chain/actors/builtin/market/v4.go +++ b/chain/actors/builtin/market/v4.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -307,7 +308,7 @@ func (s *state4) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state4) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v5.go b/chain/actors/builtin/market/v5.go index 98d498258d4..b30decb03a2 100644 --- a/chain/actors/builtin/market/v5.go +++ b/chain/actors/builtin/market/v5.go @@ -12,6 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/market" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -307,7 +308,7 @@ func (s *state5) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state5) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v6.go b/chain/actors/builtin/market/v6.go index 5966f2f8b3a..377b278ae18 100644 --- a/chain/actors/builtin/market/v6.go +++ b/chain/actors/builtin/market/v6.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/market" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -325,7 +326,7 @@ func (s *state6) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state6) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v7.go b/chain/actors/builtin/market/v7.go index df910cd4ad4..cd4607cbef7 100644 --- a/chain/actors/builtin/market/v7.go +++ b/chain/actors/builtin/market/v7.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -325,7 +326,7 @@ func (s *state7) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state7) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v8.go b/chain/actors/builtin/market/v8.go index 1c0bfd3c5dc..5cce06d3a0a 100644 --- a/chain/actors/builtin/market/v8.go +++ b/chain/actors/builtin/market/v8.go @@ -17,6 +17,7 @@ import ( adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -342,7 +343,7 @@ func (s *state8) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state8) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/market/v9.go b/chain/actors/builtin/market/v9.go index 9335a235ac2..095c2085005 100644 --- a/chain/actors/builtin/market/v9.go +++ b/chain/actors/builtin/market/v9.go @@ -18,6 +18,7 @@ import ( markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -359,7 +360,7 @@ func (s *state9) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes } func (s *state9) ActorKey() string { - return actors.MarketKey + return manifest.MarketKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index 069b74d31b6..abbcbfeb6e5 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -18,6 +18,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" + "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} {{if (le . 7)}} @@ -28,7 +29,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MinerKey { + if name != manifest.MinerKey { return nil, xerrors.Errorf("actor code is not miner: %s", name) } diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index 4f93ff6a992..1931af3d371 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -12,6 +12,7 @@ import ( minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/go-state-types/proof" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -29,7 +30,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MinerKey { + if name != manifest.MinerKey { return nil, xerrors.Errorf("actor code is not miner: %s", name) } diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index 5ba5f5463c6..b322b2283c3 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -18,6 +18,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} {{if (ge .v 3)}} @@ -614,7 +615,7 @@ func (s *state{{.v}}) GetState() interface{} { } func (s *state{{.v}}) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index 10903b46b80..7d5eaf8e0a9 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -15,6 +15,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -535,7 +536,7 @@ func (s *state0) GetState() interface{} { } func (s *state0) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v10.go b/chain/actors/builtin/miner/v10.go index d72f7124a93..4d47ba396c1 100644 --- a/chain/actors/builtin/miner/v10.go +++ b/chain/actors/builtin/miner/v10.go @@ -17,6 +17,7 @@ import ( miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -573,7 +574,7 @@ func (s *state10) GetState() interface{} { } func (s *state10) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index c9870a124b9..14341ae3832 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -566,7 +567,7 @@ func (s *state2) GetState() interface{} { } func (s *state2) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index c71c8315a7a..52808da8ca6 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -566,7 +567,7 @@ func (s *state3) GetState() interface{} { } func (s *state3) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index 2e3c6ee796c..5980ef769be 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" miner4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/miner" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -566,7 +567,7 @@ func (s *state4) GetState() interface{} { } func (s *state4) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index 28ab438e4dc..886300ea3d5 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -566,7 +567,7 @@ func (s *state5) GetState() interface{} { } func (s *state5) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v6.go b/chain/actors/builtin/miner/v6.go index 9e819e55f69..4737b0ee2fa 100644 --- a/chain/actors/builtin/miner/v6.go +++ b/chain/actors/builtin/miner/v6.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -566,7 +567,7 @@ func (s *state6) GetState() interface{} { } func (s *state6) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v7.go b/chain/actors/builtin/miner/v7.go index f98233c37d2..72803eb750d 100644 --- a/chain/actors/builtin/miner/v7.go +++ b/chain/actors/builtin/miner/v7.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -567,7 +568,7 @@ func (s *state7) GetState() interface{} { } func (s *state7) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v8.go b/chain/actors/builtin/miner/v8.go index ee3c475eab5..3e3739591f7 100644 --- a/chain/actors/builtin/miner/v8.go +++ b/chain/actors/builtin/miner/v8.go @@ -17,6 +17,7 @@ import ( miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -567,7 +568,7 @@ func (s *state8) GetState() interface{} { } func (s *state8) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index 12e88870613..72d9dbd59f5 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -17,6 +17,7 @@ import ( miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -573,7 +574,7 @@ func (s *state9) GetState() interface{} { } func (s *state9) ActorKey() string { - return actors.MinerKey + return manifest.MinerKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/actor.go.template b/chain/actors/builtin/multisig/actor.go.template index 40e49e7025c..9bb69a04876 100644 --- a/chain/actors/builtin/multisig/actor.go.template +++ b/chain/actors/builtin/multisig/actor.go.template @@ -21,6 +21,7 @@ import ( {{end}} builtintypes "github.com/filecoin-project/go-state-types/builtin" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -29,7 +30,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MultisigKey { + if name != manifest.MultisigKey { return nil, xerrors.Errorf("actor code is not multisig: %s", name) } diff --git a/chain/actors/builtin/multisig/message.go.template b/chain/actors/builtin/multisig/message.go.template index 1e15599687d..b5bc6924f7c 100644 --- a/chain/actors/builtin/multisig/message.go.template +++ b/chain/actors/builtin/multisig/message.go.template @@ -14,6 +14,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" multisig{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}multisig" init{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin/v{{.latestVersion}}/init" + "github.com/filecoin-project/go-state-types/manifest" {{end}} builtintypes "github.com/filecoin-project/go-state-types/builtin" @@ -68,7 +69,7 @@ func (m message{{.v}}) Create( ConstructorParams: enc, } {{else}} - code, ok := actors.GetActorCodeID(actorstypes.Version{{.v}}, actors.MultisigKey) + code, ok := actors.GetActorCodeID(actorstypes.Version{{.v}}, manifest.MultisigKey) if !ok { return nil, xerrors.Errorf("failed to get multisig code ID") } diff --git a/chain/actors/builtin/multisig/message10.go b/chain/actors/builtin/multisig/message10.go index 94491164308..87ee759bd71 100644 --- a/chain/actors/builtin/multisig/message10.go +++ b/chain/actors/builtin/multisig/message10.go @@ -9,6 +9,7 @@ import ( builtintypes "github.com/filecoin-project/go-state-types/builtin" init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" multisig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" @@ -50,7 +51,7 @@ func (m message10) Create( return nil, actErr } - code, ok := actors.GetActorCodeID(actorstypes.Version10, actors.MultisigKey) + code, ok := actors.GetActorCodeID(actorstypes.Version10, manifest.MultisigKey) if !ok { return nil, xerrors.Errorf("failed to get multisig code ID") } diff --git a/chain/actors/builtin/multisig/message8.go b/chain/actors/builtin/multisig/message8.go index 7c79f3f509c..4131a1b7680 100644 --- a/chain/actors/builtin/multisig/message8.go +++ b/chain/actors/builtin/multisig/message8.go @@ -9,6 +9,7 @@ import ( builtintypes "github.com/filecoin-project/go-state-types/builtin" init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" multisig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" @@ -50,7 +51,7 @@ func (m message8) Create( return nil, actErr } - code, ok := actors.GetActorCodeID(actorstypes.Version8, actors.MultisigKey) + code, ok := actors.GetActorCodeID(actorstypes.Version8, manifest.MultisigKey) if !ok { return nil, xerrors.Errorf("failed to get multisig code ID") } diff --git a/chain/actors/builtin/multisig/message9.go b/chain/actors/builtin/multisig/message9.go index be49894fa2e..f9c8c310379 100644 --- a/chain/actors/builtin/multisig/message9.go +++ b/chain/actors/builtin/multisig/message9.go @@ -9,6 +9,7 @@ import ( builtintypes "github.com/filecoin-project/go-state-types/builtin" init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" multisig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" @@ -50,7 +51,7 @@ func (m message9) Create( return nil, actErr } - code, ok := actors.GetActorCodeID(actorstypes.Version9, actors.MultisigKey) + code, ok := actors.GetActorCodeID(actorstypes.Version9, manifest.MultisigKey) if !ok { return nil, xerrors.Errorf("failed to get multisig code ID") } diff --git a/chain/actors/builtin/multisig/multisig.go b/chain/actors/builtin/multisig/multisig.go index adb2fcfa0d8..4abdf7bbbde 100644 --- a/chain/actors/builtin/multisig/multisig.go +++ b/chain/actors/builtin/multisig/multisig.go @@ -14,6 +14,7 @@ import ( builtintypes "github.com/filecoin-project/go-state-types/builtin" msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -29,7 +30,7 @@ import ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.MultisigKey { + if name != manifest.MultisigKey { return nil, xerrors.Errorf("actor code is not multisig: %s", name) } diff --git a/chain/actors/builtin/multisig/state.go.template b/chain/actors/builtin/multisig/state.go.template index 457e8cb4d25..5d04b94be4b 100644 --- a/chain/actors/builtin/multisig/state.go.template +++ b/chain/actors/builtin/multisig/state.go.template @@ -15,6 +15,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} {{if (ge .v 3)}} @@ -136,7 +137,7 @@ func (s *state{{.v}}) GetState() interface{} { } func (s *state{{.v}}) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v0.go b/chain/actors/builtin/multisig/v0.go index 38cc764113a..86bfdaaf37a 100644 --- a/chain/actors/builtin/multisig/v0.go +++ b/chain/actors/builtin/multisig/v0.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" msig0 "github.com/filecoin-project/specs-actors/actors/builtin/multisig" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state0) GetState() interface{} { } func (s *state0) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v10.go b/chain/actors/builtin/multisig/v10.go index 3b9babebe35..d87fc5807ab 100644 --- a/chain/actors/builtin/multisig/v10.go +++ b/chain/actors/builtin/multisig/v10.go @@ -15,6 +15,7 @@ import ( 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" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -120,7 +121,7 @@ func (s *state10) GetState() interface{} { } func (s *state10) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v2.go b/chain/actors/builtin/multisig/v2.go index 2d72b3215eb..77330d5139d 100644 --- a/chain/actors/builtin/multisig/v2.go +++ b/chain/actors/builtin/multisig/v2.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" msig2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/multisig" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state2) GetState() interface{} { } func (s *state2) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v3.go b/chain/actors/builtin/multisig/v3.go index bd45ecdaa9a..e8659093fc7 100644 --- a/chain/actors/builtin/multisig/v3.go +++ b/chain/actors/builtin/multisig/v3.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" msig3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/multisig" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -120,7 +121,7 @@ func (s *state3) GetState() interface{} { } func (s *state3) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v4.go b/chain/actors/builtin/multisig/v4.go index 1f5f2a9ce3d..ddaac547056 100644 --- a/chain/actors/builtin/multisig/v4.go +++ b/chain/actors/builtin/multisig/v4.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" msig4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/multisig" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -120,7 +121,7 @@ func (s *state4) GetState() interface{} { } func (s *state4) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v5.go b/chain/actors/builtin/multisig/v5.go index bf4a58cbf7a..50474d5fd4a 100644 --- a/chain/actors/builtin/multisig/v5.go +++ b/chain/actors/builtin/multisig/v5.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" msig5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/multisig" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -120,7 +121,7 @@ func (s *state5) GetState() interface{} { } func (s *state5) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v6.go b/chain/actors/builtin/multisig/v6.go index f5c6f66bb74..c51404dc49b 100644 --- a/chain/actors/builtin/multisig/v6.go +++ b/chain/actors/builtin/multisig/v6.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" msig6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/multisig" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -120,7 +121,7 @@ func (s *state6) GetState() interface{} { } func (s *state6) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v7.go b/chain/actors/builtin/multisig/v7.go index e758658416f..9ddce167af6 100644 --- a/chain/actors/builtin/multisig/v7.go +++ b/chain/actors/builtin/multisig/v7.go @@ -12,6 +12,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" + "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" msig7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/multisig" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -120,7 +121,7 @@ func (s *state7) GetState() interface{} { } func (s *state7) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v8.go b/chain/actors/builtin/multisig/v8.go index 677f4ffe930..b28ec5684d0 100644 --- a/chain/actors/builtin/multisig/v8.go +++ b/chain/actors/builtin/multisig/v8.go @@ -15,6 +15,7 @@ import ( builtin8 "github.com/filecoin-project/go-state-types/builtin" msig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -120,7 +121,7 @@ func (s *state8) GetState() interface{} { } func (s *state8) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/multisig/v9.go b/chain/actors/builtin/multisig/v9.go index 2700470d347..faa3b7d3731 100644 --- a/chain/actors/builtin/multisig/v9.go +++ b/chain/actors/builtin/multisig/v9.go @@ -15,6 +15,7 @@ import ( builtin9 "github.com/filecoin-project/go-state-types/builtin" msig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -120,7 +121,7 @@ func (s *state9) GetState() interface{} { } func (s *state9) ActorKey() string { - return actors.MultisigKey + return manifest.MultisigKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/actor.go.template b/chain/actors/builtin/paych/actor.go.template index 4250b4770e0..e19ac5e2937 100644 --- a/chain/actors/builtin/paych/actor.go.template +++ b/chain/actors/builtin/paych/actor.go.template @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/cbor" ipldcbor "github.com/ipfs/go-ipld-cbor" + "github.com/filecoin-project/go-state-types/manifest" paych0 "github.com/filecoin-project/specs-actors/actors/builtin/paych" paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" @@ -31,7 +32,7 @@ import ( // Load returns an abstract copy of payment channel state, irregardless of actor version func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.PaychKey { + if name != manifest.PaychKey { return nil, xerrors.Errorf("actor code is not paych: %s", name) } diff --git a/chain/actors/builtin/paych/mock/mock.go b/chain/actors/builtin/paych/mock/mock.go index 8b8624ac8e5..3b888131966 100644 --- a/chain/actors/builtin/paych/mock/mock.go +++ b/chain/actors/builtin/paych/mock/mock.go @@ -9,8 +9,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" - "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/builtin/paych" ) @@ -27,7 +27,7 @@ func (ms *mockState) Code() cid.Cid { } func (ms *mockState) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (ms *mockState) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/paych.go b/chain/actors/builtin/paych/paych.go index 537ae8d9269..0e6a3ca0764 100644 --- a/chain/actors/builtin/paych/paych.go +++ b/chain/actors/builtin/paych/paych.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-state-types/big" paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" paych0 "github.com/filecoin-project/specs-actors/actors/builtin/paych" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -31,7 +32,7 @@ import ( // Load returns an abstract copy of payment channel state, irregardless of actor version func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.PaychKey { + if name != manifest.PaychKey { return nil, xerrors.Errorf("actor code is not paych: %s", name) } diff --git a/chain/actors/builtin/paych/state.go.template b/chain/actors/builtin/paych/state.go.template index c00f7dc5659..0b0f9f9a142 100644 --- a/chain/actors/builtin/paych/state.go.template +++ b/chain/actors/builtin/paych/state.go.template @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} paych{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/paych" @@ -122,7 +123,7 @@ func (ls *laneState{{.v}}) Nonce() (uint64, error) { } func (s *state{{.v}}) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v0.go b/chain/actors/builtin/paych/v0.go index 8cdc27c3921..facc7f65671 100644 --- a/chain/actors/builtin/paych/v0.go +++ b/chain/actors/builtin/paych/v0.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych0 "github.com/filecoin-project/specs-actors/actors/builtin/paych" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState0) Nonce() (uint64, error) { } func (s *state0) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v10.go b/chain/actors/builtin/paych/v10.go index 0527c36d166..edc6c96b6cc 100644 --- a/chain/actors/builtin/paych/v10.go +++ b/chain/actors/builtin/paych/v10.go @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/go-state-types/big" paych10 "github.com/filecoin-project/go-state-types/builtin/v10/paych" adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -117,7 +118,7 @@ func (ls *laneState10) Nonce() (uint64, error) { } func (s *state10) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v2.go b/chain/actors/builtin/paych/v2.go index ae94adc1783..63a3cc75eb2 100644 --- a/chain/actors/builtin/paych/v2.go +++ b/chain/actors/builtin/paych/v2.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/paych" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState2) Nonce() (uint64, error) { } func (s *state2) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v3.go b/chain/actors/builtin/paych/v3.go index 5c57ea729d6..c672c0027e6 100644 --- a/chain/actors/builtin/paych/v3.go +++ b/chain/actors/builtin/paych/v3.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/paych" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState3) Nonce() (uint64, error) { } func (s *state3) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v4.go b/chain/actors/builtin/paych/v4.go index b243be2e316..842e5209389 100644 --- a/chain/actors/builtin/paych/v4.go +++ b/chain/actors/builtin/paych/v4.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/paych" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState4) Nonce() (uint64, error) { } func (s *state4) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v5.go b/chain/actors/builtin/paych/v5.go index b3b9ad50ef0..8f53fe43fab 100644 --- a/chain/actors/builtin/paych/v5.go +++ b/chain/actors/builtin/paych/v5.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/paych" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState5) Nonce() (uint64, error) { } func (s *state5) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v6.go b/chain/actors/builtin/paych/v6.go index a3b80c8e16a..0a8a9389600 100644 --- a/chain/actors/builtin/paych/v6.go +++ b/chain/actors/builtin/paych/v6.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/paych" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState6) Nonce() (uint64, error) { } func (s *state6) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v7.go b/chain/actors/builtin/paych/v7.go index bb6721b0190..ce0dcba0aaf 100644 --- a/chain/actors/builtin/paych/v7.go +++ b/chain/actors/builtin/paych/v7.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" paych7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/paych" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -117,7 +118,7 @@ func (ls *laneState7) Nonce() (uint64, error) { } func (s *state7) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v8.go b/chain/actors/builtin/paych/v8.go index fc6853cad1a..51067e87b00 100644 --- a/chain/actors/builtin/paych/v8.go +++ b/chain/actors/builtin/paych/v8.go @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/go-state-types/big" paych8 "github.com/filecoin-project/go-state-types/builtin/v8/paych" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -117,7 +118,7 @@ func (ls *laneState8) Nonce() (uint64, error) { } func (s *state8) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/paych/v9.go b/chain/actors/builtin/paych/v9.go index 817541dfb0a..8a69e16d4f0 100644 --- a/chain/actors/builtin/paych/v9.go +++ b/chain/actors/builtin/paych/v9.go @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/go-state-types/big" paych9 "github.com/filecoin-project/go-state-types/builtin/v9/paych" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -117,7 +118,7 @@ func (ls *laneState9) Nonce() (uint64, error) { } func (s *state9) ActorKey() string { - return actors.PaychKey + return manifest.PaychKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/actor.go.template b/chain/actors/builtin/power/actor.go.template index 0a4d70f468e..ed2d3fa77a3 100644 --- a/chain/actors/builtin/power/actor.go.template +++ b/chain/actors/builtin/power/actor.go.template @@ -15,6 +15,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" {{range .versions}} {{if (le . 7)}} @@ -31,7 +32,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.PowerKey { + if name != manifest.PowerKey { return nil, xerrors.Errorf("actor code is not power: %s", name) } diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index 893a25cd794..6dca61435bf 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/go-state-types/big" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -32,7 +33,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.PowerKey { + if name != manifest.PowerKey { return nil, xerrors.Errorf("actor code is not power: %s", name) } diff --git a/chain/actors/builtin/power/state.go.template b/chain/actors/builtin/power/state.go.template index 8c2a8ce9748..d37a8b98ac8 100644 --- a/chain/actors/builtin/power/state.go.template +++ b/chain/actors/builtin/power/state.go.template @@ -13,6 +13,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/builtin" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} {{if (ge .v 3)}} @@ -210,7 +211,7 @@ func fromV{{.v}}Claim(v{{.v}} power{{.v}}.Claim) Claim { } func (s *state{{.v}}) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v0.go b/chain/actors/builtin/power/v0.go index 56982e77b34..4cf550616b2 100644 --- a/chain/actors/builtin/power/v0.go +++ b/chain/actors/builtin/power/v0.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" power0 "github.com/filecoin-project/specs-actors/actors/builtin/power" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -193,7 +194,7 @@ func fromV0Claim(v0 power0.Claim) Claim { } func (s *state0) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v10.go b/chain/actors/builtin/power/v10.go index 7359ca947c3..dd7a9decf0f 100644 --- a/chain/actors/builtin/power/v10.go +++ b/chain/actors/builtin/power/v10.go @@ -13,6 +13,7 @@ import ( 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" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -189,7 +190,7 @@ func fromV10Claim(v10 power10.Claim) Claim { } func (s *state10) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v2.go b/chain/actors/builtin/power/v2.go index b4e25302419..bac0fa1792d 100644 --- a/chain/actors/builtin/power/v2.go +++ b/chain/actors/builtin/power/v2.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" power2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/power" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -193,7 +194,7 @@ func fromV2Claim(v2 power2.Claim) Claim { } func (s *state2) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v3.go b/chain/actors/builtin/power/v3.go index 2b2b75ae7e3..bdb66e3842a 100644 --- a/chain/actors/builtin/power/v3.go +++ b/chain/actors/builtin/power/v3.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" power3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/power" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -189,7 +190,7 @@ func fromV3Claim(v3 power3.Claim) Claim { } func (s *state3) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v4.go b/chain/actors/builtin/power/v4.go index c40dad92a73..b2dc953475f 100644 --- a/chain/actors/builtin/power/v4.go +++ b/chain/actors/builtin/power/v4.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" power4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/power" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -189,7 +190,7 @@ func fromV4Claim(v4 power4.Claim) Claim { } func (s *state4) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v5.go b/chain/actors/builtin/power/v5.go index 5d740a40b20..3a3adaf32da 100644 --- a/chain/actors/builtin/power/v5.go +++ b/chain/actors/builtin/power/v5.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" power5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/power" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -189,7 +190,7 @@ func fromV5Claim(v5 power5.Claim) Claim { } func (s *state5) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v6.go b/chain/actors/builtin/power/v6.go index 45c0db9e821..7e8eb36546c 100644 --- a/chain/actors/builtin/power/v6.go +++ b/chain/actors/builtin/power/v6.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" power6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/power" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -189,7 +190,7 @@ func fromV6Claim(v6 power6.Claim) Claim { } func (s *state6) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v7.go b/chain/actors/builtin/power/v7.go index 3143182635b..893c58667d5 100644 --- a/chain/actors/builtin/power/v7.go +++ b/chain/actors/builtin/power/v7.go @@ -10,6 +10,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" + "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" power7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/power" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -189,7 +190,7 @@ func fromV7Claim(v7 power7.Claim) Claim { } func (s *state7) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v8.go b/chain/actors/builtin/power/v8.go index a462b260069..b15fe435590 100644 --- a/chain/actors/builtin/power/v8.go +++ b/chain/actors/builtin/power/v8.go @@ -13,6 +13,7 @@ import ( builtin8 "github.com/filecoin-project/go-state-types/builtin" power8 "github.com/filecoin-project/go-state-types/builtin/v8/power" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -189,7 +190,7 @@ func fromV8Claim(v8 power8.Claim) Claim { } func (s *state8) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/power/v9.go b/chain/actors/builtin/power/v9.go index 0e8d5b072c0..126fbbfbf66 100644 --- a/chain/actors/builtin/power/v9.go +++ b/chain/actors/builtin/power/v9.go @@ -13,6 +13,7 @@ import ( builtin9 "github.com/filecoin-project/go-state-types/builtin" power9 "github.com/filecoin-project/go-state-types/builtin/v9/power" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -189,7 +190,7 @@ func fromV9Claim(v9 power9.Claim) Claim { } func (s *state9) ActorKey() string { - return actors.PowerKey + return manifest.PowerKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/registry.go b/chain/actors/builtin/registry.go index 6b47b0fc72d..f591e9e1b5d 100644 --- a/chain/actors/builtin/registry.go +++ b/chain/actors/builtin/registry.go @@ -46,6 +46,7 @@ import ( 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" + "github.com/filecoin-project/go-state-types/manifest" rtt "github.com/filecoin-project/go-state-types/rt" "github.com/filecoin-project/lotus/chain/actors" @@ -119,67 +120,67 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry { case actorstypes.Version8: for key, codeID := range codeIDs { switch key { - case actors.AccountKey: + case manifest.AccountKey: registry = append(registry, RegistryEntry{ code: codeID, methods: account8.Methods, state: new(account8.State), }) - case actors.CronKey: + case manifest.CronKey: registry = append(registry, RegistryEntry{ code: codeID, methods: cron8.Methods, state: new(cron8.State), }) - case actors.InitKey: + case manifest.InitKey: registry = append(registry, RegistryEntry{ code: codeID, methods: _init8.Methods, state: new(_init8.State), }) - case actors.MarketKey: + case manifest.MarketKey: registry = append(registry, RegistryEntry{ code: codeID, methods: market8.Methods, state: new(market8.State), }) - case actors.MinerKey: + case manifest.MinerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: miner8.Methods, state: new(miner8.State), }) - case actors.MultisigKey: + case manifest.MultisigKey: registry = append(registry, RegistryEntry{ code: codeID, methods: multisig8.Methods, state: new(multisig8.State), }) - case actors.PaychKey: + case manifest.PaychKey: registry = append(registry, RegistryEntry{ code: codeID, methods: paych8.Methods, state: new(paych8.State), }) - case actors.PowerKey: + case manifest.PowerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: power8.Methods, state: new(power8.State), }) - case actors.RewardKey: + case manifest.RewardKey: registry = append(registry, RegistryEntry{ code: codeID, methods: reward8.Methods, state: new(reward8.State), }) - case actors.SystemKey: + case manifest.SystemKey: registry = append(registry, RegistryEntry{ code: codeID, methods: system8.Methods, state: new(system8.State), }) - case actors.VerifregKey: + case manifest.VerifregKey: registry = append(registry, RegistryEntry{ code: codeID, methods: verifreg8.Methods, @@ -192,73 +193,73 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry { case actorstypes.Version9: for key, codeID := range codeIDs { switch key { - case actors.AccountKey: + case manifest.AccountKey: registry = append(registry, RegistryEntry{ code: codeID, methods: account9.Methods, state: new(account9.State), }) - case actors.CronKey: + case manifest.CronKey: registry = append(registry, RegistryEntry{ code: codeID, methods: cron9.Methods, state: new(cron9.State), }) - case actors.InitKey: + case manifest.InitKey: registry = append(registry, RegistryEntry{ code: codeID, methods: _init9.Methods, state: new(_init9.State), }) - case actors.MarketKey: + case manifest.MarketKey: registry = append(registry, RegistryEntry{ code: codeID, methods: market9.Methods, state: new(market9.State), }) - case actors.MinerKey: + case manifest.MinerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: miner9.Methods, state: new(miner9.State), }) - case actors.MultisigKey: + case manifest.MultisigKey: registry = append(registry, RegistryEntry{ code: codeID, methods: multisig9.Methods, state: new(multisig9.State), }) - case actors.PaychKey: + case manifest.PaychKey: registry = append(registry, RegistryEntry{ code: codeID, methods: paych9.Methods, state: new(paych9.State), }) - case actors.PowerKey: + case manifest.PowerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: power9.Methods, state: new(power9.State), }) - case actors.RewardKey: + case manifest.RewardKey: registry = append(registry, RegistryEntry{ code: codeID, methods: reward9.Methods, state: new(reward9.State), }) - case actors.SystemKey: + case manifest.SystemKey: registry = append(registry, RegistryEntry{ code: codeID, methods: system9.Methods, state: new(system9.State), }) - case actors.VerifregKey: + case manifest.VerifregKey: registry = append(registry, RegistryEntry{ code: codeID, methods: verifreg9.Methods, state: new(verifreg9.State), }) - case actors.DatacapKey: + case manifest.DataCapKey: registry = append(registry, RegistryEntry{ code: codeID, methods: datacap9.Methods, @@ -270,73 +271,73 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry { case actorstypes.Version10: for key, codeID := range codeIDs { switch key { - case actors.AccountKey: + case manifest.AccountKey: registry = append(registry, RegistryEntry{ code: codeID, methods: account10.Methods, state: new(account10.State), }) - case actors.CronKey: + case manifest.CronKey: registry = append(registry, RegistryEntry{ code: codeID, methods: cron10.Methods, state: new(cron10.State), }) - case actors.InitKey: + case manifest.InitKey: registry = append(registry, RegistryEntry{ code: codeID, methods: _init10.Methods, state: new(_init10.State), }) - case actors.MarketKey: + case manifest.MarketKey: registry = append(registry, RegistryEntry{ code: codeID, methods: market10.Methods, state: new(market10.State), }) - case actors.MinerKey: + case manifest.MinerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: miner10.Methods, state: new(miner10.State), }) - case actors.MultisigKey: + case manifest.MultisigKey: registry = append(registry, RegistryEntry{ code: codeID, methods: multisig10.Methods, state: new(multisig10.State), }) - case actors.PaychKey: + case manifest.PaychKey: registry = append(registry, RegistryEntry{ code: codeID, methods: paych10.Methods, state: new(paych10.State), }) - case actors.PowerKey: + case manifest.PowerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: power10.Methods, state: new(power10.State), }) - case actors.RewardKey: + case manifest.RewardKey: registry = append(registry, RegistryEntry{ code: codeID, methods: reward10.Methods, state: new(reward10.State), }) - case actors.SystemKey: + case manifest.SystemKey: registry = append(registry, RegistryEntry{ code: codeID, methods: system10.Methods, state: new(system10.State), }) - case actors.VerifregKey: + case manifest.VerifregKey: registry = append(registry, RegistryEntry{ code: codeID, methods: verifreg10.Methods, state: new(verifreg10.State), }) - case actors.DatacapKey: + case manifest.DataCapKey: registry = append(registry, RegistryEntry{ code: codeID, methods: datacap10.Methods, diff --git a/chain/actors/builtin/registry.go.template b/chain/actors/builtin/registry.go.template index 0eb061297ce..76837eef55d 100644 --- a/chain/actors/builtin/registry.go.template +++ b/chain/actors/builtin/registry.go.template @@ -30,6 +30,7 @@ import ( rtt "github.com/filecoin-project/go-state-types/rt" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/manifest" ) type RegistryEntry struct { @@ -101,73 +102,73 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry { case actorstypes.Version{{.}}: for key, codeID := range codeIDs { switch key { - case actors.AccountKey: + case manifest.AccountKey: registry = append(registry, RegistryEntry{ code: codeID, methods: account{{.}}.Methods, state: new(account{{.}}.State), }) - case actors.CronKey: + case manifest.CronKey: registry = append(registry, RegistryEntry{ code: codeID, methods: cron{{.}}.Methods, state: new(cron{{.}}.State), }) - case actors.InitKey: + case manifest.InitKey: registry = append(registry, RegistryEntry{ code: codeID, methods: _init{{.}}.Methods, state: new(_init{{.}}.State), }) - case actors.MarketKey: + case manifest.MarketKey: registry = append(registry, RegistryEntry{ code: codeID, methods: market{{.}}.Methods, state: new(market{{.}}.State), }) - case actors.MinerKey: + case manifest.MinerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: miner{{.}}.Methods, state: new(miner{{.}}.State), }) - case actors.MultisigKey: + case manifest.MultisigKey: registry = append(registry, RegistryEntry{ code: codeID, methods: multisig{{.}}.Methods, state: new(multisig{{.}}.State), }) - case actors.PaychKey: + case manifest.PaychKey: registry = append(registry, RegistryEntry{ code: codeID, methods: paych{{.}}.Methods, state: new(paych{{.}}.State), }) - case actors.PowerKey: + case manifest.PowerKey: registry = append(registry, RegistryEntry{ code: codeID, methods: power{{.}}.Methods, state: new(power{{.}}.State), }) - case actors.RewardKey: + case manifest.RewardKey: registry = append(registry, RegistryEntry{ code: codeID, methods: reward{{.}}.Methods, state: new(reward{{.}}.State), }) - case actors.SystemKey: + case manifest.SystemKey: registry = append(registry, RegistryEntry{ code: codeID, methods: system{{.}}.Methods, state: new(system{{.}}.State), }) - case actors.VerifregKey: + case manifest.VerifregKey: registry = append(registry, RegistryEntry{ code: codeID, methods: verifreg{{.}}.Methods, state: new(verifreg{{.}}.State), }) - {{if (ge . 9)}}case actors.DatacapKey: + {{if (ge . 9)}}case manifest.DataCapKey: registry = append(registry, RegistryEntry{ code: codeID, methods: datacap{{.}}.Methods, diff --git a/chain/actors/builtin/reward/actor.go.template b/chain/actors/builtin/reward/actor.go.template index 4fd317c973b..81bf91ac317 100644 --- a/chain/actors/builtin/reward/actor.go.template +++ b/chain/actors/builtin/reward/actor.go.template @@ -19,6 +19,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/builtin" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/go-state-types/manifest" ) var ( @@ -28,7 +29,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.RewardKey { + if name != manifest.RewardKey { return nil, xerrors.Errorf("actor code is not reward: %s", name) } diff --git a/chain/actors/builtin/reward/reward.go b/chain/actors/builtin/reward/reward.go index 0efbdaf794f..01462d6804d 100644 --- a/chain/actors/builtin/reward/reward.go +++ b/chain/actors/builtin/reward/reward.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" reward0 "github.com/filecoin-project/specs-actors/actors/builtin/reward" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -30,7 +31,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.RewardKey { + if name != manifest.RewardKey { return nil, xerrors.Errorf("actor code is not reward: %s", name) } diff --git a/chain/actors/builtin/reward/state.go.template b/chain/actors/builtin/reward/state.go.template index 104aefbaf91..28ddb80f054 100644 --- a/chain/actors/builtin/reward/state.go.template +++ b/chain/actors/builtin/reward/state.go.template @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors/builtin" + "github.com/filecoin-project/go-state-types/manifest" {{if (le .v 7)}} miner{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/miner" @@ -122,7 +123,7 @@ func (s *state{{.v}}) GetState() interface{} { } func (s *state{{.v}}) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v0.go b/chain/actors/builtin/reward/v0.go index 332e971280f..66736f9e009 100644 --- a/chain/actors/builtin/reward/v0.go +++ b/chain/actors/builtin/reward/v0.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" reward0 "github.com/filecoin-project/specs-actors/actors/builtin/reward" smoothing0 "github.com/filecoin-project/specs-actors/actors/util/smoothing" @@ -99,7 +100,7 @@ func (s *state0) GetState() interface{} { } func (s *state0) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v10.go b/chain/actors/builtin/reward/v10.go index 75c23e1a676..3ffe9a26749 100644 --- a/chain/actors/builtin/reward/v10.go +++ b/chain/actors/builtin/reward/v10.go @@ -10,6 +10,7 @@ import ( 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" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -102,7 +103,7 @@ func (s *state10) GetState() interface{} { } func (s *state10) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v2.go b/chain/actors/builtin/reward/v2.go index 33f6c120fd0..6d640f2e970 100644 --- a/chain/actors/builtin/reward/v2.go +++ b/chain/actors/builtin/reward/v2.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" reward2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/reward" smoothing2 "github.com/filecoin-project/specs-actors/v2/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state2) GetState() interface{} { } func (s *state2) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v3.go b/chain/actors/builtin/reward/v3.go index d727a9861a9..fe8e555c914 100644 --- a/chain/actors/builtin/reward/v3.go +++ b/chain/actors/builtin/reward/v3.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner" reward3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/reward" smoothing3 "github.com/filecoin-project/specs-actors/v3/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state3) GetState() interface{} { } func (s *state3) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v4.go b/chain/actors/builtin/reward/v4.go index 94ebc43c48b..f0decd39217 100644 --- a/chain/actors/builtin/reward/v4.go +++ b/chain/actors/builtin/reward/v4.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/miner" reward4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/reward" smoothing4 "github.com/filecoin-project/specs-actors/v4/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state4) GetState() interface{} { } func (s *state4) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v5.go b/chain/actors/builtin/reward/v5.go index 563b8f42ab4..82be12c0aea 100644 --- a/chain/actors/builtin/reward/v5.go +++ b/chain/actors/builtin/reward/v5.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" reward5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/reward" smoothing5 "github.com/filecoin-project/specs-actors/v5/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state5) GetState() interface{} { } func (s *state5) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v6.go b/chain/actors/builtin/reward/v6.go index 5237367669d..71884dadaaf 100644 --- a/chain/actors/builtin/reward/v6.go +++ b/chain/actors/builtin/reward/v6.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" reward6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/reward" smoothing6 "github.com/filecoin-project/specs-actors/v6/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state6) GetState() interface{} { } func (s *state6) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v7.go b/chain/actors/builtin/reward/v7.go index 79db860e169..bc39f366619 100644 --- a/chain/actors/builtin/reward/v7.go +++ b/chain/actors/builtin/reward/v7.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner" reward7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/reward" smoothing7 "github.com/filecoin-project/specs-actors/v7/actors/util/smoothing" @@ -102,7 +103,7 @@ func (s *state7) GetState() interface{} { } func (s *state7) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v8.go b/chain/actors/builtin/reward/v8.go index a9d6fae699d..5f6b96d29bf 100644 --- a/chain/actors/builtin/reward/v8.go +++ b/chain/actors/builtin/reward/v8.go @@ -10,6 +10,7 @@ import ( miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" reward8 "github.com/filecoin-project/go-state-types/builtin/v8/reward" smoothing8 "github.com/filecoin-project/go-state-types/builtin/v8/util/smoothing" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -102,7 +103,7 @@ func (s *state8) GetState() interface{} { } func (s *state8) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/reward/v9.go b/chain/actors/builtin/reward/v9.go index 34b8a7d347a..6118e2b3029 100644 --- a/chain/actors/builtin/reward/v9.go +++ b/chain/actors/builtin/reward/v9.go @@ -10,6 +10,7 @@ import ( miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" reward9 "github.com/filecoin-project/go-state-types/builtin/v9/reward" smoothing9 "github.com/filecoin-project/go-state-types/builtin/v9/util/smoothing" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -102,7 +103,7 @@ func (s *state9) GetState() interface{} { } func (s *state9) ActorKey() string { - return actors.RewardKey + return manifest.RewardKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/actor.go.template b/chain/actors/builtin/system/actor.go.template index a6442c6a96e..b725f082075 100644 --- a/chain/actors/builtin/system/actor.go.template +++ b/chain/actors/builtin/system/actor.go.template @@ -3,6 +3,7 @@ package system import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/types" @@ -24,7 +25,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.SystemKey { + if name != manifest.SystemKey { return nil, xerrors.Errorf("actor code is not system: %s", name) } diff --git a/chain/actors/builtin/system/state.go.template b/chain/actors/builtin/system/state.go.template index 62dba041aea..c6cab0583e2 100644 --- a/chain/actors/builtin/system/state.go.template +++ b/chain/actors/builtin/system/state.go.template @@ -3,6 +3,7 @@ package system import ( "fmt" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" "github.com/ipfs/go-cid" @@ -63,7 +64,7 @@ func (s *state{{.v}}) SetBuiltinActors(c cid.Cid) error { } func (s *state{{.v}}) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/system.go b/chain/actors/builtin/system/system.go index 747563cc017..c7589efa183 100644 --- a/chain/actors/builtin/system/system.go +++ b/chain/actors/builtin/system/system.go @@ -6,6 +6,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin10 "github.com/filecoin-project/go-state-types/builtin" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -25,7 +26,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.SystemKey { + if name != manifest.SystemKey { return nil, xerrors.Errorf("actor code is not system: %s", name) } diff --git a/chain/actors/builtin/system/v0.go b/chain/actors/builtin/system/v0.go index 17fa9e8c7e0..d5f0f079e27 100644 --- a/chain/actors/builtin/system/v0.go +++ b/chain/actors/builtin/system/v0.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system0 "github.com/filecoin-project/specs-actors/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state0) SetBuiltinActors(c cid.Cid) error { } func (s *state0) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v10.go b/chain/actors/builtin/system/v10.go index e6d6fbe965e..2cdb3968268 100644 --- a/chain/actors/builtin/system/v10.go +++ b/chain/actors/builtin/system/v10.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" system10 "github.com/filecoin-project/go-state-types/builtin/v10/system" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -54,7 +55,7 @@ func (s *state10) SetBuiltinActors(c cid.Cid) error { } func (s *state10) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v2.go b/chain/actors/builtin/system/v2.go index 7821bee5873..b0c64205418 100644 --- a/chain/actors/builtin/system/v2.go +++ b/chain/actors/builtin/system/v2.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state2) SetBuiltinActors(c cid.Cid) error { } func (s *state2) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v3.go b/chain/actors/builtin/system/v3.go index 0c80218c423..8334f780e34 100644 --- a/chain/actors/builtin/system/v3.go +++ b/chain/actors/builtin/system/v3.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state3) SetBuiltinActors(c cid.Cid) error { } func (s *state3) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v4.go b/chain/actors/builtin/system/v4.go index e4179211040..227104f3784 100644 --- a/chain/actors/builtin/system/v4.go +++ b/chain/actors/builtin/system/v4.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state4) SetBuiltinActors(c cid.Cid) error { } func (s *state4) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v5.go b/chain/actors/builtin/system/v5.go index a2760b09651..bbfb70b51bd 100644 --- a/chain/actors/builtin/system/v5.go +++ b/chain/actors/builtin/system/v5.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state5) SetBuiltinActors(c cid.Cid) error { } func (s *state5) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v6.go b/chain/actors/builtin/system/v6.go index 0de085a5e74..2319b5929a9 100644 --- a/chain/actors/builtin/system/v6.go +++ b/chain/actors/builtin/system/v6.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state6) SetBuiltinActors(c cid.Cid) error { } func (s *state6) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v7.go b/chain/actors/builtin/system/v7.go index 2753251c009..0b10129e859 100644 --- a/chain/actors/builtin/system/v7.go +++ b/chain/actors/builtin/system/v7.go @@ -7,6 +7,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" system7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/system" "github.com/filecoin-project/lotus/chain/actors" @@ -52,7 +53,7 @@ func (s *state7) SetBuiltinActors(c cid.Cid) error { } func (s *state7) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v8.go b/chain/actors/builtin/system/v8.go index 00cafdfed6e..eca3b0c044d 100644 --- a/chain/actors/builtin/system/v8.go +++ b/chain/actors/builtin/system/v8.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" system8 "github.com/filecoin-project/go-state-types/builtin/v8/system" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -54,7 +55,7 @@ func (s *state8) SetBuiltinActors(c cid.Cid) error { } func (s *state8) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/system/v9.go b/chain/actors/builtin/system/v9.go index 8bf96a9173f..55e073efe94 100644 --- a/chain/actors/builtin/system/v9.go +++ b/chain/actors/builtin/system/v9.go @@ -7,6 +7,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" system9 "github.com/filecoin-project/go-state-types/builtin/v9/system" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -54,7 +55,7 @@ func (s *state9) SetBuiltinActors(c cid.Cid) error { } func (s *state9) ActorKey() string { - return actors.SystemKey + return manifest.SystemKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/actor.go.template b/chain/actors/builtin/verifreg/actor.go.template index 97d1417f774..9f9efef922f 100644 --- a/chain/actors/builtin/verifreg/actor.go.template +++ b/chain/actors/builtin/verifreg/actor.go.template @@ -3,6 +3,7 @@ package verifreg import ( "github.com/ipfs/go-cid" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" @@ -29,7 +30,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.VerifregKey { + if name != manifest.VerifregKey { return nil, xerrors.Errorf("actor code is not verifreg: %s", name) } diff --git a/chain/actors/builtin/verifreg/state.go.template b/chain/actors/builtin/verifreg/state.go.template index 960b2b6046b..526dff54eb5 100644 --- a/chain/actors/builtin/verifreg/state.go.template +++ b/chain/actors/builtin/verifreg/state.go.template @@ -3,6 +3,7 @@ package verifreg import ( "fmt" actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" "github.com/ipfs/go-cid" @@ -170,7 +171,7 @@ func (s *state{{.v}}) GetClaims(providerIdAddr address.Address) (map[ClaimId]Cla } func (s *state{{.v}}) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state{{.v}}) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v0.go b/chain/actors/builtin/verifreg/v0.go index 4917667eaf2..8d97ebbc2e3 100644 --- a/chain/actors/builtin/verifreg/v0.go +++ b/chain/actors/builtin/verifreg/v0.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" verifreg0 "github.com/filecoin-project/specs-actors/actors/builtin/verifreg" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -118,7 +119,7 @@ func (s *state0) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state0) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state0) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v10.go b/chain/actors/builtin/verifreg/v10.go index a510d1970fe..63b161da340 100644 --- a/chain/actors/builtin/verifreg/v10.go +++ b/chain/actors/builtin/verifreg/v10.go @@ -14,6 +14,7 @@ import ( adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -134,7 +135,7 @@ func (s *state10) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, } func (s *state10) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state10) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v2.go b/chain/actors/builtin/verifreg/v2.go index 28061c2d1a1..61c175c7ae8 100644 --- a/chain/actors/builtin/verifreg/v2.go +++ b/chain/actors/builtin/verifreg/v2.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" verifreg2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/verifreg" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -118,7 +119,7 @@ func (s *state2) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state2) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state2) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v3.go b/chain/actors/builtin/verifreg/v3.go index 4096059a6ed..5ba478500c9 100644 --- a/chain/actors/builtin/verifreg/v3.go +++ b/chain/actors/builtin/verifreg/v3.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" verifreg3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/verifreg" adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state3) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state3) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state3) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v4.go b/chain/actors/builtin/verifreg/v4.go index 4577045045b..3ad739f6810 100644 --- a/chain/actors/builtin/verifreg/v4.go +++ b/chain/actors/builtin/verifreg/v4.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" verifreg4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg" adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state4) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state4) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state4) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v5.go b/chain/actors/builtin/verifreg/v5.go index b1e6db4247c..1ffe06f3f4a 100644 --- a/chain/actors/builtin/verifreg/v5.go +++ b/chain/actors/builtin/verifreg/v5.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" verifreg5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg" adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state5) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state5) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state5) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v6.go b/chain/actors/builtin/verifreg/v6.go index d66ae105c34..9786838d11a 100644 --- a/chain/actors/builtin/verifreg/v6.go +++ b/chain/actors/builtin/verifreg/v6.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" verifreg6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg" adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt" @@ -119,7 +120,7 @@ func (s *state6) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state6) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state6) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v7.go b/chain/actors/builtin/verifreg/v7.go index 72235e2684e..e63e277427c 100644 --- a/chain/actors/builtin/verifreg/v7.go +++ b/chain/actors/builtin/verifreg/v7.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" verifreg7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg" adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt" @@ -118,7 +119,7 @@ func (s *state7) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state7) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state7) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v8.go b/chain/actors/builtin/verifreg/v8.go index b39895bd91f..a1edeba3487 100644 --- a/chain/actors/builtin/verifreg/v8.go +++ b/chain/actors/builtin/verifreg/v8.go @@ -13,6 +13,7 @@ import ( adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -118,7 +119,7 @@ func (s *state8) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state8) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state8) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/v9.go b/chain/actors/builtin/verifreg/v9.go index 2348007e65a..bf6424ba73f 100644 --- a/chain/actors/builtin/verifreg/v9.go +++ b/chain/actors/builtin/verifreg/v9.go @@ -13,6 +13,7 @@ import ( builtin9 "github.com/filecoin-project/go-state-types/builtin" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/adt" @@ -133,7 +134,7 @@ func (s *state9) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, e } func (s *state9) ActorKey() string { - return actors.VerifregKey + return manifest.VerifregKey } func (s *state9) ActorVersion() actorstypes.Version { diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index 82c630c0f15..1380a9207c0 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -10,6 +10,7 @@ import ( builtin10 "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/cbor" + "github.com/filecoin-project/go-state-types/manifest" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -30,7 +31,7 @@ var ( func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { - if name != actors.VerifregKey { + if name != manifest.VerifregKey { return nil, xerrors.Errorf("actor code is not verifreg: %s", name) } diff --git a/chain/actors/manifest.go b/chain/actors/manifest.go index 225c8b9904d..f58768ca24b 100644 --- a/chain/actors/manifest.go +++ b/chain/actors/manifest.go @@ -15,50 +15,9 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" ) -var manifestCids map[actorstypes.Version]cid.Cid = make(map[actorstypes.Version]cid.Cid) -var manifests map[actorstypes.Version]map[string]cid.Cid = make(map[actorstypes.Version]map[string]cid.Cid) -var actorMeta map[cid.Cid]actorEntry = make(map[cid.Cid]actorEntry) - -const ( - AccountKey = "account" - CronKey = "cron" - InitKey = "init" - MarketKey = "storagemarket" - MinerKey = "storageminer" - MultisigKey = "multisig" - PaychKey = "paymentchannel" - PowerKey = "storagepower" - RewardKey = "reward" - SystemKey = "system" - VerifregKey = "verifiedregistry" - DatacapKey = "datacap" - EvmKey = "evm" - EamKey = "eam" - EmbryoKey = "embryo" -) - -func GetBuiltinActorsKeys(av actorstypes.Version) []string { - keys := []string{ - AccountKey, - CronKey, - InitKey, - MarketKey, - MinerKey, - MultisigKey, - PaychKey, - PowerKey, - RewardKey, - SystemKey, - VerifregKey, - } - if av >= 9 { - keys = append(keys, DatacapKey) - } - if av >= 10 { - keys = append(keys, EvmKey, EamKey, EmbryoKey) - } - return keys -} +var manifestCids = make(map[actorstypes.Version]cid.Cid) +var manifests = make(map[actorstypes.Version]map[string]cid.Cid) +var actorMeta = make(map[cid.Cid]actorEntry) var ( manifestMx sync.RWMutex diff --git a/chain/consensus/filcns/upgrades.go b/chain/consensus/filcns/upgrades.go index f3345ea7dea..54e507277ce 100644 --- a/chain/consensus/filcns/upgrades.go +++ b/chain/consensus/filcns/upgrades.go @@ -1651,10 +1651,10 @@ func LiteMigration(ctx context.Context, bstore blockstore.Blockstore, newActorsM return cid.Undef, xerrors.Errorf("error loading new manifest data: %w", err) } - if len(oldManifestData.Entries) != len(actors.GetBuiltinActorsKeys(oldAv)) { + if len(oldManifestData.Entries) != len(manifest.GetBuiltinActorsKeys(oldAv)) { return cid.Undef, xerrors.Errorf("incomplete old manifest with %d code CIDs", len(oldManifestData.Entries)) } - if len(newManifestData.Entries) != len(actors.GetBuiltinActorsKeys(newAv)) { + if len(newManifestData.Entries) != len(manifest.GetBuiltinActorsKeys(newAv)) { return cid.Undef, xerrors.Errorf("incomplete new manifest with %d code CIDs", len(newManifestData.Entries)) } diff --git a/chain/gen/genesis/f00_system.go b/chain/gen/genesis/f00_system.go index 93849bcc926..5c6ecacbf92 100644 --- a/chain/gen/genesis/f00_system.go +++ b/chain/gen/genesis/f00_system.go @@ -48,7 +48,7 @@ func SetupSystemActor(ctx context.Context, bs bstore.Blockstore, av actorstypes. return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.SystemKey) + actcid, ok := actors.GetActorCodeID(av, manifest.SystemKey) if !ok { return nil, xerrors.Errorf("failed to get system actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f01_init.go b/chain/gen/genesis/f01_init.go index 26062cf2774..706328d2194 100644 --- a/chain/gen/genesis/f01_init.go +++ b/chain/gen/genesis/f01_init.go @@ -13,6 +13,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/specs-actors/actors/util/adt" bstore "github.com/filecoin-project/lotus/blockstore" @@ -174,7 +175,7 @@ func SetupInitActor(ctx context.Context, bs bstore.Blockstore, netname string, i return 0, nil, nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.InitKey) + actcid, ok := actors.GetActorCodeID(av, manifest.InitKey) if !ok { return 0, nil, nil, xerrors.Errorf("failed to get init actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f02_reward.go b/chain/gen/genesis/f02_reward.go index 4a5ac9fa145..db32517f9cf 100644 --- a/chain/gen/genesis/f02_reward.go +++ b/chain/gen/genesis/f02_reward.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" bstore "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/build" @@ -29,7 +30,7 @@ func SetupRewardActor(ctx context.Context, bs bstore.Blockstore, qaPower big.Int return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.RewardKey) + actcid, ok := actors.GetActorCodeID(av, manifest.RewardKey) if !ok { return nil, xerrors.Errorf("failed to get reward actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f03_cron.go b/chain/gen/genesis/f03_cron.go index 16396c43713..4c377b19156 100644 --- a/chain/gen/genesis/f03_cron.go +++ b/chain/gen/genesis/f03_cron.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" bstore "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/chain/actors" @@ -28,7 +29,7 @@ func SetupCronActor(ctx context.Context, bs bstore.Blockstore, av actorstypes.Ve return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.CronKey) + actcid, ok := actors.GetActorCodeID(av, manifest.CronKey) if !ok { return nil, xerrors.Errorf("failed to get cron actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f04_power.go b/chain/gen/genesis/f04_power.go index f05b0c746b8..385cc97d25e 100644 --- a/chain/gen/genesis/f04_power.go +++ b/chain/gen/genesis/f04_power.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/specs-actors/actors/util/adt" bstore "github.com/filecoin-project/lotus/blockstore" @@ -29,7 +30,7 @@ func SetupStoragePowerActor(ctx context.Context, bs bstore.Blockstore, av actors return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.PowerKey) + actcid, ok := actors.GetActorCodeID(av, manifest.PowerKey) if !ok { return nil, xerrors.Errorf("failed to get power actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f05_market.go b/chain/gen/genesis/f05_market.go index 28a258c405e..59c61a3ae1d 100644 --- a/chain/gen/genesis/f05_market.go +++ b/chain/gen/genesis/f05_market.go @@ -8,6 +8,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" bstore "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/chain/actors" @@ -28,7 +29,7 @@ func SetupStorageMarketActor(ctx context.Context, bs bstore.Blockstore, av actor return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.MarketKey) + actcid, ok := actors.GetActorCodeID(av, manifest.MarketKey) if !ok { return nil, xerrors.Errorf("failed to get market actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f06_vreg.go b/chain/gen/genesis/f06_vreg.go index 1b3582d4d75..ffddc814f1c 100644 --- a/chain/gen/genesis/f06_vreg.go +++ b/chain/gen/genesis/f06_vreg.go @@ -9,6 +9,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/specs-actors/actors/util/adt" bstore "github.com/filecoin-project/lotus/blockstore" @@ -41,7 +42,7 @@ func SetupVerifiedRegistryActor(ctx context.Context, bs bstore.Blockstore, av ac return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.VerifregKey) + actcid, ok := actors.GetActorCodeID(av, manifest.VerifregKey) if !ok { return nil, xerrors.Errorf("failed to get verifreg actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/f07_dcap.go b/chain/gen/genesis/f07_dcap.go index 235cb0ce3f4..ba7f48e8b13 100644 --- a/chain/gen/genesis/f07_dcap.go +++ b/chain/gen/genesis/f07_dcap.go @@ -10,6 +10,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/specs-actors/actors/util/adt" bstore "github.com/filecoin-project/lotus/blockstore" @@ -41,7 +42,7 @@ func SetupDatacapActor(ctx context.Context, bs bstore.Blockstore, av actorstypes return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.DatacapKey) + actcid, ok := actors.GetActorCodeID(av, manifest.DataCapKey) if !ok { return nil, xerrors.Errorf("failed to get datacap actor code ID for actors version %d", av) } diff --git a/chain/gen/genesis/genesis.go b/chain/gen/genesis/genesis.go index 964dc2f1c00..300571f154c 100644 --- a/chain/gen/genesis/genesis.go +++ b/chain/gen/genesis/genesis.go @@ -17,6 +17,7 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/crypto" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" verifreg0 "github.com/filecoin-project/specs-actors/actors/builtin/verifreg" @@ -380,7 +381,7 @@ func MakeAccountActor(ctx context.Context, cst cbor.IpldStore, av actorstypes.Ve return nil, err } - actcid, ok := actors.GetActorCodeID(av, actors.AccountKey) + actcid, ok := actors.GetActorCodeID(av, manifest.AccountKey) if !ok { return nil, xerrors.Errorf("failed to get account actor code ID for actors version %d", av) } @@ -463,7 +464,7 @@ func CreateMultisigAccount(ctx context.Context, cst cbor.IpldStore, state *state return err } - actcid, ok := actors.GetActorCodeID(av, actors.MultisigKey) + actcid, ok := actors.GetActorCodeID(av, manifest.MultisigKey) if !ok { return xerrors.Errorf("failed to get multisig code ID for actors version %d", av) } diff --git a/chain/vm/fvm.go b/chain/vm/fvm.go index b229c826cae..65311058609 100644 --- a/chain/vm/fvm.go +++ b/chain/vm/fvm.go @@ -23,6 +23,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/exitcode" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/build" @@ -400,7 +401,7 @@ func NewDebugFVM(ctx context.Context, opts *VMOpts) (*FVM, error) { // create actor redirect mapping actorRedirect := make(map[cid.Cid]cid.Cid) - for _, key := range actors.GetBuiltinActorsKeys(av) { + for _, key := range manifest.GetBuiltinActorsKeys(av) { from, ok := actors.GetActorCodeID(av, key) if !ok { log.Warnf("actor missing in the from manifest %s", key) diff --git a/cmd/lotus-shed/migrations.go b/cmd/lotus-shed/migrations.go index f2394232646..ce570c6acd2 100644 --- a/cmd/lotus-shed/migrations.go +++ b/cmd/lotus-shed/migrations.go @@ -24,6 +24,7 @@ import ( miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/specs-actors/v7/actors/migration/nv15" "github.com/filecoin-project/lotus/blockstore" @@ -587,7 +588,7 @@ func checkAllMinersUnsealedCID(stateTreeV9 *state.StateTree, store adt.Store) er } func checkMinerUnsealedCID(act *types.Actor, stateTreeV9 *state.StateTree, store adt.Store) error { - minerCodeCid, found := actors.GetActorCodeID(actorstypes.Version9, actors.MinerKey) + minerCodeCid, found := actors.GetActorCodeID(actorstypes.Version9, manifest.MinerKey) if !found { return xerrors.Errorf("could not find code cid for miner actor") } diff --git a/itests/lite_migration_test.go b/itests/lite_migration_test.go index 541a56b210c..0f846e6fa10 100644 --- a/itests/lite_migration_test.go +++ b/itests/lite_migration_test.go @@ -19,7 +19,6 @@ import ( "github.com/filecoin-project/specs-actors/v8/actors/util/adt" "github.com/filecoin-project/lotus/blockstore" - "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/builtin/system" "github.com/filecoin-project/lotus/chain/consensus/filcns" "github.com/filecoin-project/lotus/chain/state" @@ -95,7 +94,7 @@ func makeTestManifest(t *testing.T, ctxStore adt.Store, av actorstypes.Version) builder := cid.V1Builder{Codec: cid.Raw, MhType: mh.IDENTITY} manifestData := manifest.ManifestData{} - for _, name := range actors.GetBuiltinActorsKeys(av) { + for _, name := range manifest.GetBuiltinActorsKeys(av) { codeCid, err := builder.Sum([]byte(fmt.Sprintf("fil/8/%s", name))) if err != nil { t.Fatal(err) diff --git a/storage/wdpost/wdpost_run_test.go b/storage/wdpost/wdpost_run_test.go index 140e0886ed9..64d470dba4a 100644 --- a/storage/wdpost/wdpost_run_test.go +++ b/storage/wdpost/wdpost_run_test.go @@ -19,6 +19,7 @@ import ( minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/dline" + "github.com/filecoin-project/go-state-types/manifest" "github.com/filecoin-project/go-state-types/network" prooftypes "github.com/filecoin-project/go-state-types/proof" tutils "github.com/filecoin-project/specs-actors/v2/support/testing" @@ -570,7 +571,7 @@ func (m *mockStorageMinerAPI) StateMinerProvingDeadline(ctx context.Context, add } func (m *mockStorageMinerAPI) StateGetActor(ctx context.Context, actor address.Address, ts types.TipSetKey) (*types.Actor, error) { - code, ok := actors.GetActorCodeID(actorstypes.Version7, actors.MinerKey) + code, ok := actors.GetActorCodeID(actorstypes.Version7, manifest.MinerKey) if !ok { return nil, xerrors.Errorf("failed to get miner actor code ID for actors version %d", actors.Version7) }