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 384193fee..858a8b3a1 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 042426801..ad9ae4909 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 5a2d55961..4542ad767 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 ef6e7ac3d..2db38eff6 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 9b623519d..55a56de8c 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 f6af2c79c..a41ee3879 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 dbe7c609e..ff87c4212 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 5e2297b4a..db0af77e2 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 4e142bcf7..9e6c71ad0 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 7b1e7f0dd..907896312 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 ad8bed522..8514ab325 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 74c959c5f..16369f38c 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 24d259f33..cd420da92 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 2a4a74ca4..13b478de8 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 97bcd43d7..fc1fc4d14 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 82e80365a..7811aab6c 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 825f6cc07..766279451 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 3abb33e63..7e01483d2 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 3f573789a..43b8c0eaa 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 24739f162..ca82d8be8 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 ef5f6d93e..6dce524f6 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 4e2e1c815..2d20e2401 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 fc45be0de..97b3ffbe0 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 6f8e66a3b..4c0d4f1d9 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 2539f2b1c..a222f0d93 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 8aba47a2b..2487cbbc6 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 f607a409f..673e7588a 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 ef962fd41..cd71bd418 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 377cba060..904de5496 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 b2e1d1265..201348b6c 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 15272d7d1..f1bafc301 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 977c020d3..f94b03704 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 dfb6eaad4..337ee3e25 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 6f4c8593d..7a68879a9 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 6dcf04477..76ce22ed0 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 698029253..d20db6bcb 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 69bd90c42..120ca66f8 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 453aba963..1d19ebb40 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 a97d40297..c38629d2d 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 c31aef6a0..52e223a85 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 61ae3f2db..7e48dda9e 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 761f9dacc..dd8c778dd 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 dfbdde6c9..c107bd52d 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 56a5e4afd..0be11f976 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 b1ecd3188..5ca6bc1c8 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 b8a6438d7..f6450789d 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 aeadc2caf..4d2267aa1 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 e62c56277..052faf985 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 145b75551..c7c7860d3 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 8cba18e7a..a221a4a7c 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 b8d8c987b..a84c04ab9 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 e96484d64..fc057549d 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 ef5dff0a5..bbaa5c775 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 4af5fe9b0..c0a628b47 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 21acf15ac..aaa0ee0f1 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 45a357f33..89ffdde8f 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 ec745f5a0..f4d073ed8 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 03e728c15..422a30cbb 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 98d498258..b30decb03 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 5966f2f8b..377b278ae 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 df910cd4a..cd4607cbe 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 1c0bfd3c5..5cce06d3a 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 9335a235a..095c20850 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 069b74d31..abbcbfeb6 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 4f93ff6a9..1931af3d3 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 5ba5f5463..b322b2283 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 10903b46b..7d5eaf8e0 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 d72f7124a..4d47ba396 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 c9870a124..14341ae38 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 c71c8315a..52808da8c 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 2e3c6ee79..5980ef769 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 28ab438e4..886300ea3 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 9e819e55f..4737b0ee2 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 f98233c37..72803eb75 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 ee3c475ea..3e3739591 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 12e888706..72d9dbd59 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 40e49e702..9bb69a048 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 1e1559968..b5bc6924f 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 944911643..87ee759bd 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 7c79f3f50..4131a1b76 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 be49894fa..f9c8c3103 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 adb2fcfa0..4abdf7bbb 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 457e8cb4d..5d04b94be 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 38cc76411..86bfdaaf3 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 3b9babebe..d87fc5807 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 2d72b3215..77330d513 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 bd45ecdaa..e8659093f 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 1f5f2a9ce..ddaac5470 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 bf4a58cbf..50474d5fd 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 f5c6f66bb..c51404dc4 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 e75865841..9ddce167a 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 677f4ffe9..b28ec5684 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 2700470d3..faa3b7d37 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 4250b4770..e19ac5e29 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 8b8624ac8..3b8881319 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 537ae8d92..0e6a3ca07 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 c00f7dc56..0b0f9f9a1 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 8cdc27c39..facc7f656 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 0527c36d1..edc6c96b6 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 ae94adc17..63a3cc75e 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 5c57ea729..c672c0027 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 b243be2e3..842e52093 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 b3b9ad50e..8f53fe43f 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 a3b80c8e1..0a8a93896 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 bb6721b01..ce0dcba0a 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 fc6853cad..51067e87b 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 817541dfb..8a69e16d4 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 0a4d70f46..ed2d3fa77 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 893a25cd7..6dca61435 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 8c2a8ce97..d37a8b98a 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 56982e77b..4cf550616 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 7359ca947..dd7a9decf 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 b4e253024..bac0fa179 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 2b2b75ae7..bdb66e384 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 c40dad92a..b2dc95347 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 5d740a40b..3a3adaf32 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 45c0db9e8..7e8eb3654 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 314318263..893c58667 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 a462b2600..b15fe4355 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 0e8d5b072..126fbbfbf 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 6b47b0fc7..f591e9e1b 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 0eb061297..76837eef5 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 4fd317c97..81bf91ac3 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 0efbdaf79..01462d680 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 104aefbaf..28ddb80f0 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 332e97128..66736f9e0 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 75c23e1a6..3ffe9a267 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 33f6c120f..6d640f2e9 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 d727a9861..fe8e555c9 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 94ebc43c4..f0decd392 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 563b8f42a..82be12c0a 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 523736766..71884dada 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 79db860e1..bc39f3666 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 a9d6fae69..5f6b96d29 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 34b8a7d34..6118e2b30 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 a6442c6a9..b725f0820 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 62dba041a..c6cab0583 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 747563cc0..c7589efa1 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 17fa9e8c7..d5f0f079e 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 e6d6fbe96..2cdb39682 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 7821bee58..b0c642054 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 0c80218c4..8334f780e 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 e41792110..227104f37 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 a2760b096..bbfb70b51 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 0de085a5e..2319b5929 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 2753251c0..0b10129e8 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 00cafdfed..eca3b0c04 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 8bf96a917..55e073efe 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 97d1417f7..9f9efef92 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 960b2b604..526dff54e 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 4917667ea..8d97ebbc2 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 a510d1970..63b161da3 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 28061c2d1..61c175c7a 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 4096059a6..5ba478500 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 457704504..3ad739f68 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 b1e6db424..1ffe06f3f 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 d66ae105c..9786838d1 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 72235e268..e63e27742 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 b39895bd9..a1edeba34 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 2348007e6..bf6424ba7 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 82c630c0f..1380a9207 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 225c8b990..f58768ca2 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 f3345ea7d..54e507277 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 93849bcc9..5c6ecacbf 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 26062cf27..706328d21 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 4a5ac9fa1..db32517f9 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 16396c437..4c377b191 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 f05b0c746..385cc97d2 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 28a258c40..59c61a3ae 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 1b3582d4d..ffddc814f 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 235cb0ce3..ba7f48e8b 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 964dc2f1c..300571f15 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 b229c826c..653110586 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 f23942326..ce570c6ac 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 541a56b21..0f846e6fa 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 140e0886e..64d470dba 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) }