e773b37921
* F3-370: integrate F3 dynamic manifest * F3-370: make linter happy * Set manifest sender identities * Decode manifest sender peer ID from string before using it Peer ID is of type string internally but the internal string representation is not the same as the encoded string representation. Therefore, the latter needs to be decoded and cannot be casted to the former. Otherwise, it will represent a different ID. * `make gen` the pain of my life --------- Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com> Co-authored-by: Masih H. Derkani <m@derkani.org>
175 lines
5.2 KiB
Go
175 lines
5.2 KiB
Go
//go:build !debug && !2k && !testground && !calibnet && !butterflynet && !interopnet
|
|
// +build !debug,!2k,!testground,!calibnet,!butterflynet,!interopnet
|
|
|
|
package build
|
|
|
|
import (
|
|
"math"
|
|
"os"
|
|
"strconv"
|
|
|
|
"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/network"
|
|
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
|
|
)
|
|
|
|
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
|
|
0: DrandIncentinet,
|
|
UpgradeSmokeHeight: DrandMainnet,
|
|
UpgradePhoenixHeight: DrandQuicknet,
|
|
}
|
|
|
|
var NetworkBundle = "mainnet"
|
|
|
|
// NOTE: DO NOT change this unless you REALLY know what you're doing. This is consensus critical.
|
|
var BundleOverrides map[actorstypes.Version]string
|
|
|
|
// NOTE: DO NOT change this unless you REALLY know what you're doing. This is consensus critical.
|
|
const ActorDebugging = false
|
|
|
|
const GenesisNetworkVersion = network.Version0
|
|
|
|
const BootstrappersFile = "mainnet.pi"
|
|
const GenesisFile = "mainnet.car"
|
|
|
|
const UpgradeBreezeHeight = 41280
|
|
|
|
const BreezeGasTampingDuration = 120
|
|
|
|
const UpgradeSmokeHeight = 51000
|
|
|
|
const UpgradeIgnitionHeight = 94000
|
|
const UpgradeRefuelHeight = 130800
|
|
|
|
const UpgradeAssemblyHeight = 138720
|
|
|
|
const UpgradeTapeHeight = 140760
|
|
|
|
// This signals our tentative epoch for mainnet launch. Can make it later, but not earlier.
|
|
// Miners, clients, developers, custodians all need time to prepare.
|
|
// We still have upgrades and state changes to do, but can happen after signaling timing here.
|
|
const UpgradeLiftoffHeight = 148888
|
|
|
|
const UpgradeKumquatHeight = 170000
|
|
|
|
const UpgradeCalicoHeight = 265200
|
|
const UpgradePersianHeight = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60)
|
|
|
|
const UpgradeOrangeHeight = 336458
|
|
|
|
// 2020-12-22T02:00:00Z
|
|
// var because of wdpost_test.go
|
|
var UpgradeClausHeight = abi.ChainEpoch(343200)
|
|
|
|
// 2021-03-04T00:00:30Z
|
|
const UpgradeTrustHeight = 550321
|
|
|
|
// 2021-04-12T22:00:00Z
|
|
const UpgradeNorwegianHeight = 665280
|
|
|
|
// 2021-04-29T06:00:00Z
|
|
const UpgradeTurboHeight = 712320
|
|
|
|
// 2021-06-30T22:00:00Z
|
|
const UpgradeHyperdriveHeight = 892800
|
|
|
|
// 2021-10-26T13:30:00Z
|
|
const UpgradeChocolateHeight = 1231620
|
|
|
|
// 2022-03-01T15:00:00Z
|
|
const UpgradeOhSnapHeight = 1594680
|
|
|
|
// 2022-07-06T14:00:00Z
|
|
const UpgradeSkyrHeight = 1960320
|
|
|
|
// 2022-11-30T14:00:00Z
|
|
const UpgradeSharkHeight = 2383680
|
|
|
|
// 2023-03-14T15:14:00Z
|
|
const UpgradeHyggeHeight = 2683348
|
|
|
|
// 2023-04-27T13:00:00Z
|
|
const UpgradeLightningHeight = 2809800
|
|
|
|
// 2023-05-18T13:00:00Z
|
|
const UpgradeThunderHeight = UpgradeLightningHeight + 2880*21
|
|
|
|
// 2023-12-12T13:30:00Z
|
|
const UpgradeWatermelonHeight = 3469380
|
|
|
|
// 2024-04-24T14:00:00Z
|
|
const UpgradeDragonHeight = 3855360
|
|
|
|
// This epoch, 120 epochs after the "rest" of the nv22 upgrade, is when we switch to Drand quicknet
|
|
// 2024-04-11T15:00:00Z
|
|
const UpgradePhoenixHeight = UpgradeDragonHeight + 120
|
|
|
|
// ??????
|
|
var UpgradeWaffleHeight = abi.ChainEpoch(9999999999)
|
|
|
|
// This fix upgrade only ran on calibrationnet
|
|
const UpgradeWatermelonFixHeight = -1
|
|
|
|
// This fix upgrade only ran on calibrationnet
|
|
const UpgradeWatermelonFix2Height = -2
|
|
|
|
// This fix upgrade only ran on calibrationnet
|
|
const UpgradeCalibrationDragonFixHeight = -3
|
|
|
|
var SupportedProofTypes = []abi.RegisteredSealProof{
|
|
abi.RegisteredSealProof_StackedDrg32GiBV1,
|
|
abi.RegisteredSealProof_StackedDrg64GiBV1,
|
|
}
|
|
var ConsensusMinerMinPower = abi.NewStoragePower(10 << 40)
|
|
var PreCommitChallengeDelay = abi.ChainEpoch(150)
|
|
var PropagationDelaySecs = uint64(10)
|
|
|
|
var EquivocationDelaySecs = uint64(2)
|
|
|
|
func init() {
|
|
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
|
|
SetAddressNetwork(address.Mainnet)
|
|
}
|
|
|
|
if os.Getenv("LOTUS_DISABLE_WAFFLE") == "1" {
|
|
UpgradeWaffleHeight = math.MaxInt64 - 1
|
|
}
|
|
|
|
// 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.
|
|
if len(os.Getenv("PROPAGATION_DELAY_SECS")) != 0 {
|
|
pds, err := strconv.ParseUint(os.Getenv("PROPAGATION_DELAY_SECS"), 10, 64)
|
|
if err != nil {
|
|
log.Warnw("Error setting PROPAGATION_DELAY_SECS, %v, proceed with default value %s", err,
|
|
PropagationDelaySecs)
|
|
} else {
|
|
PropagationDelaySecs = pds
|
|
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)
|
|
}
|
|
}
|
|
|
|
Devnet = false
|
|
|
|
BuildType = BuildMainnet
|
|
}
|
|
|
|
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
|
|
|
|
// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
|
|
const BootstrapPeerThreshold = 4
|
|
|
|
// ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint.
|
|
// As per https://github.com/ethereum-lists/chains
|
|
const Eip155ChainId = 314
|
|
|
|
// WhitelistedBlock skips checks on message validity in this block to sidestep the zero-bls signature
|
|
var WhitelistedBlock = MustParseCid("bafy2bzaceapyg2uyzk7vueh3xccxkuwbz3nxewjyguoxvhx77malc2lzn2ybi")
|
|
|
|
const f3Enabled = false
|
|
const ManifestServerID = "12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7"
|
|
const F3BootstrapEpoch abi.ChainEpoch = -1
|