diff --git a/build/params_2k.go b/build/params_2k.go index 33d9d50ef..485f7bec0 100644 --- a/build/params_2k.go +++ b/build/params_2k.go @@ -10,6 +10,7 @@ import ( "github.com/ipfs/go-cid" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/chain/actors/policy" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" ) @@ -17,6 +18,8 @@ import ( const BootstrappersFile = "" const GenesisFile = "" +const GenesisNetworkVersion = network.Version14 + var UpgradeBreezeHeight = abi.ChainEpoch(-1) const BreezeGasTampingDuration = 0 diff --git a/build/params_butterfly.go b/build/params_butterfly.go index 096446b76..70d1cff95 100644 --- a/build/params_butterfly.go +++ b/build/params_butterfly.go @@ -6,6 +6,7 @@ package build import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/chain/actors/policy" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" @@ -16,6 +17,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, } +const GenesisNetworkVersion = network.Version13 + const BootstrappersFile = "butterflynet.pi" const GenesisFile = "butterflynet.car" @@ -38,7 +41,7 @@ const UpgradeTrustHeight = -13 const UpgradeNorwegianHeight = -14 const UpgradeTurboHeight = -15 const UpgradeHyperdriveHeight = -16 -const UpgradeChocolateHeight = 3950 +const UpgradeChocolateHeight = 6360 func init() { policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30)) diff --git a/build/params_calibnet.go b/build/params_calibnet.go index 31d0e1b86..996a5c924 100644 --- a/build/params_calibnet.go +++ b/build/params_calibnet.go @@ -6,6 +6,7 @@ package build import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/chain/actors/policy" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" @@ -16,6 +17,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, } +const GenesisNetworkVersion = network.Version0 + const BootstrappersFile = "calibnet.pi" const GenesisFile = "calibnet.car" diff --git a/build/params_interop.go b/build/params_interop.go index f3c51d5a6..e928da8a0 100644 --- a/build/params_interop.go +++ b/build/params_interop.go @@ -11,6 +11,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/network" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" @@ -20,6 +21,8 @@ import ( const BootstrappersFile = "interopnet.pi" const GenesisFile = "interopnet.car" +const GenesisNetworkVersion = network.Version13 + var UpgradeBreezeHeight = abi.ChainEpoch(-1) const BreezeGasTampingDuration = 0 diff --git a/build/params_mainnet.go b/build/params_mainnet.go index 9a05e8b7a..e6b730335 100644 --- a/build/params_mainnet.go +++ b/build/params_mainnet.go @@ -7,6 +7,8 @@ import ( "math" "os" + "github.com/filecoin-project/go-state-types/network" + "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -17,6 +19,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ UpgradeSmokeHeight: DrandMainnet, } +const GenesisNetworkVersion = network.Version0 + const BootstrappersFile = "mainnet.pi" const GenesisFile = "mainnet.car" diff --git a/build/params_nerpanet.go b/build/params_nerpanet.go index 6854d3bd3..6a27d8d7f 100644 --- a/build/params_nerpanet.go +++ b/build/params_nerpanet.go @@ -5,6 +5,7 @@ package build import ( "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/ipfs/go-cid" @@ -16,6 +17,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, } +const GenesisNetworkVersion = network.Version0 + const BootstrappersFile = "nerpanet.pi" const GenesisFile = "nerpanet.car" diff --git a/build/params_testground.go b/build/params_testground.go index 69ff19d8c..48b76f82c 100644 --- a/build/params_testground.go +++ b/build/params_testground.go @@ -104,7 +104,9 @@ var ( 0: DrandMainnet, } - NewestNetworkVersion = network.Version11 + GenesisNetworkVersion = network.Version0 + + NewestNetworkVersion = network.Version14 ActorUpgradeNetworkVersion = network.Version4 Devnet = true diff --git a/chain/stmgr/stmgr.go b/chain/stmgr/stmgr.go index 49a90d99f..a3f17cd41 100644 --- a/chain/stmgr/stmgr.go +++ b/chain/stmgr/stmgr.go @@ -112,7 +112,7 @@ func NewStateManager(cs *store.ChainStore, exec Executor, sys vm.SyscallBuilder, stateMigrations := make(map[abi.ChainEpoch]*migration, len(us)) expensiveUpgrades := make(map[abi.ChainEpoch]struct{}, len(us)) var networkVersions []versionSpec - lastVersion := network.Version0 + lastVersion := build.GenesisNetworkVersion if len(us) > 0 { // If we have any upgrades, process them and create a version // schedule. diff --git a/testplans/lotus-soup/go.sum b/testplans/lotus-soup/go.sum index 3fd9de0b3..fb158b5c6 100644 --- a/testplans/lotus-soup/go.sum +++ b/testplans/lotus-soup/go.sum @@ -887,8 +887,9 @@ github.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CE github.com/ipfs/go-graphsync v0.4.2/go.mod h1:/VmbZTUdUMTbNkgzAiCEucIIAU3BkLE2cZrDCVUhyi0= github.com/ipfs/go-graphsync v0.4.3/go.mod h1:mPOwDYv128gf8gxPFgXnz4fNrSYPsWyqisJ7ych+XDY= github.com/ipfs/go-graphsync v0.9.0/go.mod h1:J62ahWT9JbPsFL2UWsUM5rOu0lZJ0LOIH1chHdxGGcw= -github.com/ipfs/go-graphsync v0.9.1 h1:jo7ZaAZ3lal89RhKxKoRkPzIO8lmOY6KUWA1mDRZ2+U= github.com/ipfs/go-graphsync v0.9.1/go.mod h1:J62ahWT9JbPsFL2UWsUM5rOu0lZJ0LOIH1chHdxGGcw= +github.com/ipfs/go-graphsync v0.9.3 h1:oWqUuN3OYqLwu669fxYbgymBrIodB0fD7vFZfF//X7Y= +github.com/ipfs/go-graphsync v0.9.3/go.mod h1:J62ahWT9JbPsFL2UWsUM5rOu0lZJ0LOIH1chHdxGGcw= github.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk= github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= github.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw=