Documentation ¶
Index ¶
Constants ¶
const ( BuildDefault = iota BuildMainnet Build2k BuildDebug BuildCalibnet BuildInteropnet BuildButterflynet )
const ActorDebugging = false
NOTE: DO NOT change this unless you REALLY know what you're doing. This is consensus critical.
const AddressMainnetEnvVar = "_mainnet_"
const AllowableClockDriftSecs = uint64(1)
const BadBlockCacheSize = 1 << 15
Sync
const BaseFeeMaxChangeDenom int64 = 8 // 12.5%
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
const BlockMessageLimit = 10000
const BlsSignatureCacheSize = 40000
assuming 4000 messages per round, this lets us not lose any messages across a 10 block reorg.
const BootstrapPeerThreshold = 4
BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
const BootstrappersFile = "mainnet.pi"
const BreezeGasTampingDuration abi.ChainEpoch = 120
const Eip155ChainId = 314
ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint. As per https://github.com/ethereum-lists/chains
const F3BootstrapEpoch abi.ChainEpoch = -1
const F3Enabled = true
const FilAllocStorageMining = uint64(1_100_000_000)
const FilBase = uint64(2_000_000_000)
const FilReserved = uint64(300_000_000)
const FilecoinPrecision = uint64(1_000_000_000_000_000_000)
const GenesisFile = "mainnet.car"
const GenesisNetworkVersion = network.Version0
const InitialBaseFee int64 = 100e6
const ManifestServerID = "12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7"
const MessageConfidence = uint64(5)
Epochs
const MinimumBaseFee int64 = 100
const PackingEfficiencyDenom int64 = 5
const PackingEfficiencyNum int64 = 4
const SealRandomnessLookback = policy.SealRandomnessLookback
Epochs TODO: unused
const TestNetworkVersion = network.Version23
Used by tests and some obscure tooling
inline-gen template
const TestNetworkVersion = network.Version{{.latestNetworkVersion}} /* inline-gen start
const TicketRandomnessLookback = abi.ChainEpoch(1)
Epochs
const UpgradeAssemblyHeight abi.ChainEpoch = 138720
const UpgradeBreezeHeight abi.ChainEpoch = 41280
const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -3
This fix upgrade only ran on calibrationnet
const UpgradeCalicoHeight abi.ChainEpoch = 265200
const UpgradeChocolateHeight abi.ChainEpoch = 1231620
2021-10-26T13:30:00Z
const UpgradeDragonHeight abi.ChainEpoch = 3855360
2024-04-24T14:00:00Z
const UpgradeHyggeHeight abi.ChainEpoch = 2683348
2023-03-14T15:14:00Z
const UpgradeHyperdriveHeight abi.ChainEpoch = 892800
2021-06-30T22:00:00Z
const UpgradeIgnitionHeight abi.ChainEpoch = 94000
const UpgradeKumquatHeight abi.ChainEpoch = 170000
const UpgradeLiftoffHeight abi.ChainEpoch = 148888
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 UpgradeLightningHeight abi.ChainEpoch = 2809800
2023-04-27T13:00:00Z
const UpgradeNorwegianHeight abi.ChainEpoch = 665280
2021-04-12T22:00:00Z
const UpgradeOhSnapHeight abi.ChainEpoch = 1594680
2022-03-01T15:00:00Z
const UpgradeOrangeHeight abi.ChainEpoch = 336458
const UpgradePersianHeight abi.ChainEpoch = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60)
const UpgradePhoenixHeight abi.ChainEpoch = UpgradeDragonHeight + 120
This epoch, 120 epochs after the "rest" of the nv22 upgrade, is when we switch to Drand quicknet 2024-04-11T15:00:00Z
const UpgradeRefuelHeight abi.ChainEpoch = 130800
const UpgradeSharkHeight abi.ChainEpoch = 2383680
2022-11-30T14:00:00Z
const UpgradeSkyrHeight abi.ChainEpoch = 1960320
2022-07-06T14:00:00Z
const UpgradeSmokeHeight abi.ChainEpoch = 51000
const UpgradeTapeHeight abi.ChainEpoch = 140760
const UpgradeThunderHeight abi.ChainEpoch = UpgradeLightningHeight + 2880*21
2023-05-18T13:00:00Z
const UpgradeTrustHeight abi.ChainEpoch = 550321
2021-03-04T00:00:30Z
const UpgradeTurboHeight abi.ChainEpoch = 712320
2021-04-29T06:00:00Z
const UpgradeWatermelonFix2Height abi.ChainEpoch = -2
This fix upgrade only ran on calibrationnet
const UpgradeWatermelonFixHeight abi.ChainEpoch = -1
This fix upgrade only ran on calibrationnet
const UpgradeWatermelonHeight abi.ChainEpoch = 3469380
2023-12-12T13:30:00Z
const VerifSigCacheSize = 32000
Size of signature verification cache 32k keeps the cache around 10MB in size, max
const WRatioDen = uint64(2)
const WRatioNum = int64(1)
constants for Weight calculation The ratio of weight contributed by short-term vs long-term factors in a given round
Variables ¶
var ( DefaultFDLimit uint64 = 16 << 10 MinerFDLimit uint64 = 100_000 )
var BlockGasLimit = int64(10_000_000_000)
var BlockGasTarget = BlockGasLimit / 2
var BlocksPerEpoch = uint64(builtin2.ExpectedLeadersPerEpoch)
Blocks (e)
var BuildType int
var ConsensusMinerMinPower = abi.NewStoragePower(10 << 40)
var Devnet = true
var DrandConfigs = map[DrandEnum]DrandConfig{ DrandQuicknet: { Servers: []string{ "https://api.drand.sh", "https://api2.drand.sh", "https://api3.drand.sh", "https://drand.cloudflare.com", "https://api.drand.secureweb3.com:6875", }, Relays: []string{ "/dnsaddr/api.drand.sh/", "/dnsaddr/api2.drand.sh/", "/dnsaddr/api3.drand.sh/", }, IsChained: false, ChainInfoJSON: `{"public_key":"83cf0f2896adee7eb8b5f01fcad3912212c437e0073e911fb90022d3e760183c8c4b450b6a0a6c3ac6a5776a2d1064510d1fec758c921cc22b0e17e63aaf4bcb5ed66304de9cf809bd274ca73bab4af5a6e9c76a4bc09e76eae8991ef5ece45a","period":3,"genesis_time":1692803367,"hash":"52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971","groupHash":"f477d5c89f21a17c863a7f937c6a6d15859414d2be09cd448d4279af331c5d3e","schemeID":"bls-unchained-g1-rfc9380","metadata":{"beaconID":"quicknet"}}`, }, DrandTestnet: { Servers: []string{ "https://pl-eu.testnet.drand.sh", "https://pl-us.testnet.drand.sh", }, Relays: []string{ "/dnsaddr/pl-eu.testnet.drand.sh/", "/dnsaddr/pl-us.testnet.drand.sh/", }, IsChained: true, ChainInfoJSON: `{"public_key":"922a2e93828ff83345bae533f5172669a26c02dc76d6bf59c80892e12ab1455c229211886f35bb56af6d5bea981024df","period":25,"genesis_time":1590445175,"hash":"84b2234fb34e835dccd048255d7ad3194b81af7d978c3bf157e3469592ae4e02","groupHash":"4dd408e5fdff9323c76a9b6f087ba8fdc5a6da907bd9217d9d10f2287d081957"}`, }, DrandIncentinet: { IsChained: true, ChainInfoJSON: `{"public_key":"8cad0c72c606ab27d36ee06de1d5b2db1faf92e447025ca37575ab3a8aac2eaae83192f846fc9e158bc738423753d000","period":30,"genesis_time":1595873820,"hash":"80c8b872c714f4c00fdd3daa465d5514049f457f01f85a4caf68cdcd394ba039","groupHash":"d9406aaed487f7af71851b4399448e311f2328923d454e971536c05398ce2d9b"}`, }, DrandMainnet: { IsChained: true, ChainInfoJSON: `{"public_key":"868f005eb8e6e4ca0a47c8a77ceaa5309a47978a7c71bc5cce96366b5d7a569937c529eeda66c7293784a9402801af31","period":30,"genesis_time":1595431050,"hash":"8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce","groupHash":"176f93498eac9ca337150b46d21dd58673ea4e3581185f869672e59fa4cb390a"}`, }, }
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandIncentinet, UpgradeSmokeHeight: DrandMainnet, UpgradePhoenixHeight: DrandQuicknet, }
var EquivocationDelaySecs = uint64(2)
var InitialFilReserved *big.Int
var InitialRewardBalance *big.Int
var NetworkBundle = "mainnet"
var PreCommitChallengeDelay = abi.ChainEpoch(150)
var PropagationDelaySecs = uint64(10)
var SupportedProofTypes = []abi.RegisteredSealProof{ abi.RegisteredSealProof_StackedDrg32GiBV1, abi.RegisteredSealProof_StackedDrg64GiBV1, }
var UpgradeClausHeight abi.ChainEpoch = 343200
2020-12-22T02:00:00Z var because of wdpost_test.go
var UpgradeWaffleHeight abi.ChainEpoch = 4154640
2024-08-06T12:00:00Z
var WhitelistedBlock = cid.MustParse("bafy2bzaceapyg2uyzk7vueh3xccxkuwbz3nxewjyguoxvhx77malc2lzn2ybi")
WhitelistedBlock skips checks on message validity in this block to sidestep the zero-bls signature
var ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a")
the 'f' prefix doesn't matter
Functions ¶
func BuildTypeString ¶
func BuildTypeString() string
func IsNearUpgrade ¶
func IsNearUpgrade(epoch, upgradeEpoch abi.ChainEpoch) bool
func MustParseAddress ¶
func MustParseAddress(addr string) address.Address
func SetAddressNetwork ¶
func SetAddressNetwork(n address.Network)
Types ¶
type DrandConfig ¶
type DrandPoint ¶
type DrandPoint struct { Start abi.ChainEpoch Config DrandConfig }
func DrandConfigSchedule ¶
func DrandConfigSchedule() []DrandPoint