2021-08-27 19:25:43 +00:00
|
|
|
//go:build calibnet
|
2021-01-05 05:32:15 +00:00
|
|
|
// +build calibnet
|
|
|
|
|
|
|
|
package build
|
|
|
|
|
|
|
|
import (
|
2022-09-12 14:45:34 +00:00
|
|
|
"os"
|
|
|
|
"strconv"
|
|
|
|
|
2022-06-14 15:00:51 +00:00
|
|
|
"github.com/ipfs/go-cid"
|
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
"github.com/filecoin-project/go-address"
|
|
|
|
"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 15:00:51 +00:00
|
|
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
|
|
|
)
|
|
|
|
|
|
|
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|
|
|
0: DrandMainnet,
|
|
|
|
}
|
|
|
|
|
2021-10-02 16:20:09 +00:00
|
|
|
const GenesisNetworkVersion = network.Version0
|
|
|
|
|
2022-05-25 16:16:11 +00:00
|
|
|
var NetworkBundle = "calibrationnet"
|
2022-09-06 15:49:29 +00:00
|
|
|
var BundleOverrides map[actorstypes.Version]string
|
2023-01-13 19:11:13 +00:00
|
|
|
var ActorDebugging = false
|
2022-05-25 16:16:11 +00:00
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
const BootstrappersFile = "calibnet.pi"
|
|
|
|
const GenesisFile = "calibnet.car"
|
|
|
|
|
|
|
|
const UpgradeBreezeHeight = -1
|
|
|
|
const BreezeGasTampingDuration = 120
|
|
|
|
|
|
|
|
const UpgradeSmokeHeight = -2
|
|
|
|
|
|
|
|
const UpgradeIgnitionHeight = -3
|
|
|
|
const UpgradeRefuelHeight = -4
|
|
|
|
|
2021-05-06 05:44:11 +00:00
|
|
|
var UpgradeAssemblyHeight = abi.ChainEpoch(30)
|
2021-01-05 05:32:15 +00:00
|
|
|
|
|
|
|
const UpgradeTapeHeight = 60
|
|
|
|
|
|
|
|
const UpgradeLiftoffHeight = -5
|
|
|
|
|
|
|
|
const UpgradeKumquatHeight = 90
|
|
|
|
|
2021-06-18 19:45:21 +00:00
|
|
|
const UpgradeCalicoHeight = 120
|
2021-02-19 22:42:16 +00:00
|
|
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 1)
|
2021-01-05 05:32:15 +00:00
|
|
|
|
2021-06-18 19:45:21 +00:00
|
|
|
const UpgradeClausHeight = 270
|
2021-01-05 05:32:15 +00:00
|
|
|
|
2021-02-19 22:42:16 +00:00
|
|
|
const UpgradeOrangeHeight = 300
|
2021-01-05 05:32:15 +00:00
|
|
|
|
2021-06-18 19:45:21 +00:00
|
|
|
const UpgradeTrustHeight = 330
|
2021-01-19 03:42:23 +00:00
|
|
|
|
2021-06-18 19:45:21 +00:00
|
|
|
const UpgradeNorwegianHeight = 360
|
2021-05-06 05:44:11 +00:00
|
|
|
|
2021-06-18 19:45:21 +00:00
|
|
|
const UpgradeTurboHeight = 390
|
|
|
|
|
|
|
|
const UpgradeHyperdriveHeight = 420
|
2021-04-23 12:29:46 +00:00
|
|
|
|
2022-11-01 12:32:18 +00:00
|
|
|
const UpgradeChocolateHeight = 450
|
2021-09-15 15:22:25 +00:00
|
|
|
|
2022-11-01 12:32:18 +00:00
|
|
|
const UpgradeOhSnapHeight = 480
|
2021-11-04 15:59:29 +00:00
|
|
|
|
2022-11-01 12:32:18 +00:00
|
|
|
const UpgradeSkyrHeight = 510
|
2022-03-01 03:57:40 +00:00
|
|
|
|
2022-11-01 16:21:58 +00:00
|
|
|
const UpgradeSharkHeight = 16800 // 6 days after genesis
|
2022-09-06 15:49:29 +00:00
|
|
|
|
2023-02-14 23:48:23 +00:00
|
|
|
// 2023-02-21T16:30:00Z
|
|
|
|
const UpgradeHyggeHeight = 322354
|
2023-01-13 19:11:13 +00:00
|
|
|
|
2023-04-19 14:45:22 +00:00
|
|
|
// 2023-04-20T14:00:00Z
|
|
|
|
const UpgradeLightningHeight = 489094
|
2023-04-13 21:21:24 +00:00
|
|
|
|
2023-04-19 14:45:22 +00:00
|
|
|
// 2023-04-21T16:00:00Z
|
|
|
|
const UpgradeThunderHeight = UpgradeLightningHeight + 3120
|
2023-03-29 16:05:42 +00:00
|
|
|
|
2023-11-01 19:52:31 +00:00
|
|
|
// 2023-10-19T13:00:00Z
|
2023-10-12 23:23:43 +00:00
|
|
|
const UpgradeWatermelonHeight = 1013134
|
2023-07-07 09:56:30 +00:00
|
|
|
|
2023-11-01 19:52:31 +00:00
|
|
|
// 2023-11-07T13:00:00Z
|
2023-10-31 22:29:09 +00:00
|
|
|
const UpgradeWatermelonFixHeight = 1070494
|
|
|
|
|
2023-11-15 18:07:26 +00:00
|
|
|
// 2023-11-21T13:00:00Z
|
|
|
|
const UpgradeWatermelonFix2Height = 1108174
|
|
|
|
|
2022-04-24 05:48:07 +00:00
|
|
|
var SupportedProofTypes = []abi.RegisteredSealProof{
|
|
|
|
abi.RegisteredSealProof_StackedDrg32GiBV1,
|
|
|
|
abi.RegisteredSealProof_StackedDrg64GiBV1,
|
|
|
|
}
|
|
|
|
var ConsensusMinerMinPower = abi.NewStoragePower(32 << 30)
|
|
|
|
var MinVerifiedDealSize = abi.NewStoragePower(1 << 20)
|
|
|
|
var PreCommitChallengeDelay = abi.ChainEpoch(150)
|
|
|
|
|
2021-01-05 05:32:15 +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-01-05 05:32:15 +00:00
|
|
|
|
|
|
|
SetAddressNetwork(address.Testnet)
|
|
|
|
|
|
|
|
Devnet = true
|
2021-01-20 06:47:27 +00:00
|
|
|
|
2022-09-22 15:42:06 +00:00
|
|
|
// NOTE: DO NOT change this unless you REALLY know what you're doing. This is not consensus critical, however,
|
|
|
|
//set this value too high may impacts your block submission; set this value too low may cause you miss
|
|
|
|
//parent tipsets for blocking forming and mining.
|
2022-09-12 14:45:34 +00:00
|
|
|
if len(os.Getenv("PROPAGATION_DELAY_SECS")) != 0 {
|
2022-09-22 15:42:06 +00:00
|
|
|
pds, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64)
|
2022-09-12 14:45:34 +00:00
|
|
|
if err != nil {
|
|
|
|
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
|
|
|
PropagationDelaySecs)
|
|
|
|
} else {
|
2022-09-22 15:42:06 +00:00
|
|
|
PropagationDelaySecs = pds
|
2022-09-12 14:45:34 +00:00
|
|
|
log.Warnw(" !!WARNING!! propagation delay is set to be %s second, "+
|
|
|
|
"this value impacts your message republish interval and block forming - monitor with caution!!", PropagationDelaySecs)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-20 06:47:27 +00:00
|
|
|
BuildType = BuildCalibnet
|
2021-10-01 19:39:45 +00:00
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
|
|
|
|
2022-09-22 15:42:06 +00:00
|
|
|
var PropagationDelaySecs = uint64(10)
|
2021-01-05 05:32:15 +00:00
|
|
|
|
2023-08-11 14:36:17 +00:00
|
|
|
var EquivocationDelaySecs = uint64(2)
|
|
|
|
|
2021-01-05 05:32:15 +00:00
|
|
|
// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
|
|
|
|
const BootstrapPeerThreshold = 4
|
2021-04-09 06:58:22 +00:00
|
|
|
|
2023-01-13 19:11:13 +00:00
|
|
|
// ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint.
|
|
|
|
// As per https://github.com/ethereum-lists/chains
|
|
|
|
const Eip155ChainId = 314159
|
|
|
|
|
2022-06-14 03:29:45 +00:00
|
|
|
var WhitelistedBlock = cid.Undef
|