From 6b499d9caef51f640535b0a9d48c9782e4ec4ae2 Mon Sep 17 00:00:00 2001 From: tanlang Date: Wed, 12 Apr 2023 08:15:09 +0000 Subject: [PATCH] fix: test for actor --- fixtures/networks/forcenet.go | 2 ++ fixtures/networks/integrationtestnet.go | 5 ++++- pkg/config/config.go | 4 ++-- venus-shared/actors/version.go | 23 +++++++++++------------ venus-shared/utils/method_map.go | 1 + 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/fixtures/networks/forcenet.go b/fixtures/networks/forcenet.go index 858f1c1dd6..38d3214c4a 100644 --- a/fixtures/networks/forcenet.go +++ b/fixtures/networks/forcenet.go @@ -56,6 +56,8 @@ func ForceNet() *NetworkConf { UpgradeSkyrHeight: -19, UpgradeSharkHeight: -20, UpgradeHyggeHeight: 30, + UpgradeLightningHeight: 30, + UpgradeThunderHeight: 1000, }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: config.DrandMainnet}, AddressNetwork: address.Testnet, diff --git a/fixtures/networks/integrationtestnet.go b/fixtures/networks/integrationtestnet.go index 51cc013938..536bfe0492 100644 --- a/fixtures/networks/integrationtestnet.go +++ b/fixtures/networks/integrationtestnet.go @@ -48,7 +48,10 @@ func IntegrationNet() *NetworkConf { UpgradeOhSnapHeight: 1594680, UpgradeSkyrHeight: 1960320, UpgradeSharkHeight: 2383680, - UpgradeHyggeHeight: 99999999999999, + UpgradeHyggeHeight: 2683348, + // TODO: set correct upgrade height + UpgradeLightningHeight: 999999999999999, + UpgradeThunderHeight: 999999999999999 + 1, }, DrandSchedule: map[abi.ChainEpoch]config.DrandEnum{0: 5, 51000: 1}, AddressNetwork: address.Testnet, diff --git a/pkg/config/config.go b/pkg/config/config.go index d3a7b3b815..ea76e4488b 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -327,9 +327,9 @@ var DefaultForkUpgradeParam = &ForkUpgradeConfig{ UpgradeOhSnapHeight: 1594680, UpgradeSkyrHeight: 1960320, UpgradeSharkHeight: 2383680, - UpgradeHyggeHeight: 99999999999999, + UpgradeHyggeHeight: 2683348, UpgradeLightningHeight: 99999999999999, - UpgradeThunderHeight: 99999999999999, + UpgradeThunderHeight: 99999999999999 + 1, } func newDefaultNetworkParamsConfig() *NetworkParamsConfig { diff --git a/venus-shared/actors/version.go b/venus-shared/actors/version.go index 413a4676ed..2606605eb8 100644 --- a/venus-shared/actors/version.go +++ b/venus-shared/actors/version.go @@ -16,23 +16,22 @@ const ({{range .actorVersions}} /* inline-gen start */ - var LatestVersion = 11 -var Versions = []int{ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, } +var Versions = []int{0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} const ( - Version0 Version = 0 - Version2 Version = 2 - Version3 Version = 3 - Version4 Version = 4 - Version5 Version = 5 - Version6 Version = 6 - Version7 Version = 7 - Version8 Version = 8 - Version9 Version = 9 + Version0 Version = 0 + Version2 Version = 2 + Version3 Version = 3 + Version4 Version = 4 + Version5 Version = 5 + Version6 Version = 6 + Version7 Version = 7 + Version8 Version = 8 + Version9 Version = 9 Version10 Version = 10 Version11 Version = 11 ) -/* inline-gen end */ \ No newline at end of file +/* inline-gen end */ diff --git a/venus-shared/utils/method_map.go b/venus-shared/utils/method_map.go index e34871cfee..34f347431f 100644 --- a/venus-shared/utils/method_map.go +++ b/venus-shared/utils/method_map.go @@ -58,6 +58,7 @@ func loadMethodsMap() { actors = append(actors, actorsWithVersion{av: actorstypes.Version8, actors: builtin.MakeRegistry(actorstypes.Version8)}) actors = append(actors, actorsWithVersion{av: actorstypes.Version9, actors: builtin.MakeRegistry(actorstypes.Version9)}) actors = append(actors, actorsWithVersion{av: actorstypes.Version10, actors: builtin.MakeRegistry(actorstypes.Version10)}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version11, actors: builtin.MakeRegistry(actorstypes.Version11)}) for _, awv := range actors { for _, actor := range awv.actors {