2021-08-27 19:25:43 +00:00
|
|
|
//go:build debug || 2k
|
2020-04-17 15:58:20 +00:00
|
|
|
// +build debug 2k
|
|
|
|
|
|
|
|
package build
|
|
|
|
|
|
|
|
import (
|
2021-03-31 00:59:15 +00:00
|
|
|
"os"
|
|
|
|
"strconv"
|
|
|
|
|
2022-06-14 16:58:19 +00:00
|
|
|
"github.com/ipfs/go-cid"
|
|
|
|
|
2020-09-07 03:49:10 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2022-09-06 15:49:29 +00:00
|
|
|
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
2021-10-02 16:20:09 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/network"
|
2022-06-14 16:58:19 +00:00
|
|
|
|
2020-09-23 19:24:51 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
2020-04-17 15:58:20 +00:00
|
|
|
)
|
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
const BootstrappersFile = ""
|
|
|
|
const GenesisFile = ""
|
|
|
|
|
2022-05-25 16:16:11 +00:00
|
|
|
var NetworkBundle = "devnet"
|
2022-09-06 15:49:29 +00:00
|
|
|
var BundleOverrides map[actorstypes.Version]string
|
2022-09-02 23:14:22 +00:00
|
|
|
var ActorDebugging = true
|
2021-01-05 05:32:15 +00:00
|
|
|
|
2022-11-09 16:44:36 +00:00
|
|
|
const GenesisNetworkVersion = network.Version18
|
2021-10-02 16:20:09 +00:00
|
|
|
|
2021-03-31 00:59:15 +00:00
|
|
|
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
|
|
|
|
|
2020-09-07 18:46:46 +00:00
|
|
|
const BreezeGasTampingDuration = 0
|
|
|
|
|
2021-03-31 00:59:15 +00:00
|
|
|
var UpgradeSmokeHeight = abi.ChainEpoch(-1)
|
|
|
|
var UpgradeIgnitionHeight = abi.ChainEpoch(-2)
|
|
|
|
var UpgradeRefuelHeight = abi.ChainEpoch(-3)
|
|
|
|
var UpgradeTapeHeight = abi.ChainEpoch(-4)
|
2020-10-07 22:17:24 +00:00
|
|
|
|
2021-05-27 10:27:47 +00:00
|
|
|
var UpgradeAssemblyHeight = abi.ChainEpoch(-5)
|
2021-05-15 01:11:23 +00:00
|
|
|
var UpgradeLiftoffHeight = abi.ChainEpoch(-6)
|
2020-09-10 18:36:30 +00:00
|
|
|
|
2021-05-15 01:11:23 +00:00
|
|
|
var UpgradeKumquatHeight = abi.ChainEpoch(-7)
|
2021-07-15 15:04:24 +00:00
|
|
|
var UpgradeCalicoHeight = abi.ChainEpoch(-9)
|
|
|
|
var UpgradePersianHeight = abi.ChainEpoch(-10)
|
|
|
|
var UpgradeOrangeHeight = abi.ChainEpoch(-11)
|
|
|
|
var UpgradeClausHeight = abi.ChainEpoch(-12)
|
2020-10-17 00:35:46 +00:00
|
|
|
|
2021-07-15 15:04:24 +00:00
|
|
|
var UpgradeTrustHeight = abi.ChainEpoch(-13)
|
2021-03-31 00:59:15 +00:00
|
|
|
|
2021-07-15 15:04:24 +00:00
|
|
|
var UpgradeNorwegianHeight = abi.ChainEpoch(-14)
|
2021-01-19 03:42:23 +00:00
|
|
|
|
2021-07-15 15:04:24 +00:00
|
|
|
var UpgradeTurboHeight = abi.ChainEpoch(-15)
|
2021-04-23 12:29:46 +00:00
|
|
|
|
2021-07-15 15:04:24 +00:00
|
|
|
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
|
2021-05-31 19:43:21 +00:00
|
|
|
|
2021-09-15 15:22:25 +00:00
|
|
|
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
|
|
|
|
|
2022-01-11 22:41:20 +00:00
|
|
|
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
|
2022-06-14 06:35:01 +00:00
|
|
|
|
2022-06-10 14:05:20 +00:00
|
|
|
var UpgradeSkyrHeight = abi.ChainEpoch(-19)
|
2021-11-04 15:59:29 +00:00
|
|
|
|
2022-11-09 16:44:36 +00:00
|
|
|
var UpgradeSharkHeight = abi.ChainEpoch(-20)
|
2022-09-06 15:49:29 +00:00
|
|
|
|
2022-12-22 00:59:34 +00:00
|
|
|
var UpgradeHyggeHeight = abi.ChainEpoch(-21)
|
|
|
|
|
2020-09-09 18:37:12 +00:00
|
|
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
2020-09-10 18:36:30 +00:00
|
|
|
0: DrandMainnet,
|
2020-09-09 18:37:12 +00:00
|
|
|
}
|
|
|
|
|
2022-04-24 05:48:07 +00:00
|
|
|
var SupportedProofTypes = []abi.RegisteredSealProof{
|
|
|
|
abi.RegisteredSealProof_StackedDrg2KiBV1,
|
|
|
|
abi.RegisteredSealProof_StackedDrg8MiBV1,
|
|
|
|
}
|
|
|
|
var ConsensusMinerMinPower = abi.NewStoragePower(2048)
|
|
|
|
var MinVerifiedDealSize = abi.NewStoragePower(256)
|
|
|
|
var PreCommitChallengeDelay = abi.ChainEpoch(10)
|
|
|
|
|
2020-04-17 15:58:20 +00:00
|
|
|
func init() {
|
2022-04-24 05:48:07 +00:00
|
|
|
policy.SetSupportedProofTypes(SupportedProofTypes...)
|
|
|
|
policy.SetConsensusMinerMinPower(ConsensusMinerMinPower)
|
|
|
|
policy.SetMinVerifiedDealSize(MinVerifiedDealSize)
|
|
|
|
policy.SetPreCommitChallengeDelay(PreCommitChallengeDelay)
|
2021-03-10 12:25:52 +00:00
|
|
|
|
2021-03-31 00:59:15 +00:00
|
|
|
getUpgradeHeight := func(ev string, def abi.ChainEpoch) abi.ChainEpoch {
|
|
|
|
hs, found := os.LookupEnv(ev)
|
|
|
|
if found {
|
|
|
|
h, err := strconv.Atoi(hs)
|
|
|
|
if err != nil {
|
|
|
|
log.Panicf("failed to parse %s env var", ev)
|
|
|
|
}
|
|
|
|
|
|
|
|
return abi.ChainEpoch(h)
|
|
|
|
}
|
|
|
|
|
|
|
|
return def
|
|
|
|
}
|
|
|
|
|
|
|
|
UpgradeBreezeHeight = getUpgradeHeight("LOTUS_BREEZE_HEIGHT", UpgradeBreezeHeight)
|
|
|
|
UpgradeSmokeHeight = getUpgradeHeight("LOTUS_SMOKE_HEIGHT", UpgradeSmokeHeight)
|
|
|
|
UpgradeIgnitionHeight = getUpgradeHeight("LOTUS_IGNITION_HEIGHT", UpgradeIgnitionHeight)
|
|
|
|
UpgradeRefuelHeight = getUpgradeHeight("LOTUS_REFUEL_HEIGHT", UpgradeRefuelHeight)
|
|
|
|
UpgradeTapeHeight = getUpgradeHeight("LOTUS_TAPE_HEIGHT", UpgradeTapeHeight)
|
2021-05-06 05:44:11 +00:00
|
|
|
UpgradeAssemblyHeight = getUpgradeHeight("LOTUS_ACTORSV2_HEIGHT", UpgradeAssemblyHeight)
|
2021-03-31 00:59:15 +00:00
|
|
|
UpgradeLiftoffHeight = getUpgradeHeight("LOTUS_LIFTOFF_HEIGHT", UpgradeLiftoffHeight)
|
|
|
|
UpgradeKumquatHeight = getUpgradeHeight("LOTUS_KUMQUAT_HEIGHT", UpgradeKumquatHeight)
|
|
|
|
UpgradeCalicoHeight = getUpgradeHeight("LOTUS_CALICO_HEIGHT", UpgradeCalicoHeight)
|
|
|
|
UpgradePersianHeight = getUpgradeHeight("LOTUS_PERSIAN_HEIGHT", UpgradePersianHeight)
|
|
|
|
UpgradeOrangeHeight = getUpgradeHeight("LOTUS_ORANGE_HEIGHT", UpgradeOrangeHeight)
|
|
|
|
UpgradeClausHeight = getUpgradeHeight("LOTUS_CLAUS_HEIGHT", UpgradeClausHeight)
|
2021-05-06 05:44:11 +00:00
|
|
|
UpgradeTrustHeight = getUpgradeHeight("LOTUS_ACTORSV3_HEIGHT", UpgradeTrustHeight)
|
2021-03-31 00:59:15 +00:00
|
|
|
UpgradeNorwegianHeight = getUpgradeHeight("LOTUS_NORWEGIAN_HEIGHT", UpgradeNorwegianHeight)
|
2021-05-06 05:44:11 +00:00
|
|
|
UpgradeTurboHeight = getUpgradeHeight("LOTUS_ACTORSV4_HEIGHT", UpgradeTurboHeight)
|
|
|
|
UpgradeHyperdriveHeight = getUpgradeHeight("LOTUS_HYPERDRIVE_HEIGHT", UpgradeHyperdriveHeight)
|
2021-09-15 15:22:25 +00:00
|
|
|
UpgradeChocolateHeight = getUpgradeHeight("LOTUS_CHOCOLATE_HEIGHT", UpgradeChocolateHeight)
|
2022-01-24 20:44:20 +00:00
|
|
|
UpgradeOhSnapHeight = getUpgradeHeight("LOTUS_OHSNAP_HEIGHT", UpgradeOhSnapHeight)
|
2022-05-26 22:20:49 +00:00
|
|
|
UpgradeSkyrHeight = getUpgradeHeight("LOTUS_SKYR_HEIGHT", UpgradeSkyrHeight)
|
2022-10-13 19:04:57 +00:00
|
|
|
UpgradeSharkHeight = getUpgradeHeight("LOTUS_SHARK_HEIGHT", UpgradeSharkHeight)
|
2022-12-22 00:59:34 +00:00
|
|
|
UpgradeHyggeHeight = getUpgradeHeight("LOTUS_HYGGE_HEIGHT", UpgradeHyggeHeight)
|
2021-03-31 00:59:15 +00:00
|
|
|
|
2020-06-01 18:43:51 +00:00
|
|
|
BuildType |= Build2k
|
2021-10-01 19:39:45 +00:00
|
|
|
|
2020-04-17 15:58:20 +00:00
|
|
|
}
|
|
|
|
|
2020-09-14 04:25:54 +00:00
|
|
|
const BlockDelaySecs = uint64(4)
|
2020-04-17 15:58:20 +00:00
|
|
|
|
2020-08-07 15:51:35 +00:00
|
|
|
const PropagationDelaySecs = uint64(1)
|
2020-04-17 15:58:20 +00:00
|
|
|
|
|
|
|
// SlashablePowerDelay is the number of epochs after ElectionPeriodStart, after
|
|
|
|
// which the miner is slashed
|
|
|
|
//
|
|
|
|
// Epochs
|
|
|
|
const SlashablePowerDelay = 20
|
|
|
|
|
|
|
|
// Epochs
|
|
|
|
const InteractivePoRepConfidence = 6
|
2020-11-11 04:20:31 +00:00
|
|
|
|
|
|
|
const BootstrapPeerThreshold = 1
|
2021-04-09 06:58:22 +00:00
|
|
|
|
2022-09-12 21:46:15 +00:00
|
|
|
// ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint.
|
|
|
|
// As per https://github.com/ethereum-lists/chains
|
|
|
|
const Eip155ChainId = 31415926
|
|
|
|
|
2021-04-09 06:58:22 +00:00
|
|
|
var WhitelistedBlock = cid.Undef
|