buildconstants

package
v1.32.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: Apache-2.0, MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	BuildDefault = iota
	BuildMainnet
	Build2k
	BuildDebug
	BuildCalibnet
	BuildInteropnet

	BuildButterflynet
)
View Source
const ActorDebugging = false

NOTE: DO NOT change this unless you REALLY know what you're doing. This is consensus critical.

View Source
const AddressMainnetEnvVar = "_mainnet_"
View Source
const AllowableClockDriftSecs = uint64(1)
View Source
const BadBlockCacheSize = 1 << 15

Sync

View Source
const BaseFeeMaxChangeDenom int64 = 8 // 12.5%
View Source
const BlockMessageLimit = 10000
View Source
const BlsSignatureCacheSize = 40000

assuming 4000 messages per round, this lets us not lose any messages across a 10 block reorg.

View Source
const BootstrapPeerThreshold = 4

BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start

View Source
const BootstrappersFile = "mainnet.pi"
View Source
const BreezeGasTampingDuration abi.ChainEpoch = 120
View Source
const Eip155ChainId = 314

ChainId defines the chain ID used in the Ethereum JSON-RPC endpoint. As per https://github.com/ethereum-lists/chains

View Source
const F3BootstrapEpoch abi.ChainEpoch = -1
View Source
const F3Enabled = true
View Source
const FilAllocStorageMining = uint64(1_100_000_000)
View Source
const FilBase = uint64(2_000_000_000)
View Source
const FilReserved = uint64(300_000_000)
View Source
const FilecoinPrecision = uint64(1_000_000_000_000_000_000)
View Source
const GenesisFile = "mainnet.car.zst"
View Source
const GenesisNetworkVersion = network.Version0
View Source
const InitialBaseFee int64 = 100e6
View Source
const MessageConfidence = uint64(5)

Epochs

View Source
const MinimumBaseFee int64 = 100
View Source
const PackingEfficiencyDenom int64 = 5
View Source
const PackingEfficiencyNum int64 = 4
View Source
const SealRandomnessLookback = policy.SealRandomnessLookback

Epochs TODO: unused

View Source
const TestNetworkVersion = network.Version25

Used by tests and some obscure tooling

inline-gen template

const TestNetworkVersion = network.Version{{.latestNetworkVersion}} /* inline-gen start

View Source
const TicketRandomnessLookback = abi.ChainEpoch(1)

Epochs

View Source
const UpgradeAssemblyHeight abi.ChainEpoch = 138720
View Source
const UpgradeBreezeHeight abi.ChainEpoch = 41280
View Source
const UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -3

This fix upgrade only ran on calibrationnet

View Source
const UpgradeCalicoHeight abi.ChainEpoch = 265200
View Source
const UpgradeChocolateHeight abi.ChainEpoch = 1231620

2021-10-26T13:30:00Z

View Source
const UpgradeDragonHeight abi.ChainEpoch = 3855360

2024-04-24T14:00:00Z

View Source
const UpgradeHyggeHeight abi.ChainEpoch = 2683348

2023-03-14T15:14:00Z

View Source
const UpgradeHyperdriveHeight abi.ChainEpoch = 892800

2021-06-30T22:00:00Z

View Source
const UpgradeIgnitionHeight abi.ChainEpoch = 94000
View Source
const UpgradeKumquatHeight abi.ChainEpoch = 170000
View Source
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.

View Source
const UpgradeLightningHeight abi.ChainEpoch = 2809800

2023-04-27T13:00:00Z

View Source
const UpgradeNorwegianHeight abi.ChainEpoch = 665280

2021-04-12T22:00:00Z

View Source
const UpgradeOhSnapHeight abi.ChainEpoch = 1594680

2022-03-01T15:00:00Z

View Source
const UpgradeOrangeHeight abi.ChainEpoch = 336458
View Source
const UpgradePersianHeight abi.ChainEpoch = UpgradeCalicoHeight + (builtin2.EpochsInHour * 60)
View Source
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

View Source
const UpgradeRefuelHeight abi.ChainEpoch = 130800
View Source
const UpgradeSharkHeight abi.ChainEpoch = 2383680

2022-11-30T14:00:00Z

View Source
const UpgradeSkyrHeight abi.ChainEpoch = 1960320

2022-07-06T14:00:00Z

View Source
const UpgradeSmokeHeight abi.ChainEpoch = 51000
View Source
const UpgradeTapeHeight abi.ChainEpoch = 140760
View Source
const UpgradeThunderHeight abi.ChainEpoch = UpgradeLightningHeight + 2880*21

2023-05-18T13:00:00Z

View Source
const UpgradeTrustHeight abi.ChainEpoch = 550321

2021-03-04T00:00:30Z

View Source
const UpgradeTurboHeight abi.ChainEpoch = 712320

2021-04-29T06:00:00Z

View Source
const UpgradeWaffleHeight abi.ChainEpoch = 4154640

2024-08-06T12:00:00Z

View Source
const UpgradeWatermelonFix2Height abi.ChainEpoch = -2

This fix upgrade only ran on calibrationnet

View Source
const UpgradeWatermelonFixHeight abi.ChainEpoch = -1

This fix upgrade only ran on calibrationnet

View Source
const UpgradeWatermelonHeight abi.ChainEpoch = 3469380

2023-12-12T13:30:00Z

View Source
const VerifSigCacheSize = 32000

Size of signature verification cache 32k keeps the cache around 10MB in size, max

View Source
const WRatioDen = uint64(2)
View Source
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

View Source
var (
	DefaultFDLimit uint64 = 16 << 10
	MinerFDLimit   uint64 = 100_000
)
View Source
var BlockGasLimit = int64(10_000_000_000)
View Source
var BlockGasTarget = BlockGasLimit / 2

Blocks (e)

View Source
var BuildType int
View Source
var ConsensusMinerMinPower = abi.NewStoragePower(10 << 40)
View Source
var Devnet = true
View Source
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"}`,
	},
}
View Source
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
	0:                    DrandIncentinet,
	UpgradeSmokeHeight:   DrandMainnet,
	UpgradePhoenixHeight: DrandQuicknet,
}
View Source
var EquivocationDelaySecs = uint64(2)
View Source
var F3InitialPowerTableCID = cid.Undef

The initial F3 power table CID.

View Source
var F3ManifestServerID = MustParseID("12D3KooWENMwUF9YxvQxar7uBWJtZkA6amvK4xWmKXfSiHUo2Qq7")

The F3 manifest server ID, if any.

View Source
var InitialFilReserved *big.Int
View Source
var InitialRewardBalance *big.Int
View Source
var NetworkBundle = "mainnet"
View Source
var PreCommitChallengeDelay = abi.ChainEpoch(150)
View Source
var PropagationDelaySecs = uint64(10)
View Source
var UpgradeClausHeight abi.ChainEpoch = 343200

2020-12-22T02:00:00Z var because of wdpost_test.go

View Source
var UpgradeTeepHeight = abi.ChainEpoch(9999999999)

??????

View Source
var UpgradeTuktukHeight abi.ChainEpoch = 4461240

2024-11-20T23:00:00Z var because of TestMigrationNV24 in itests/migration_test.go to test the FIP-0081 pledge ramp

View Source
var UpgradeTuktukPowerRampDurationEpochs = uint64(builtin.EpochsInYear)

FIP-0081: for the power actor state for pledge calculations. UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after Tuktuk migration. along with a RampStartEpoch matching the upgrade height.

View Source
var WhitelistedBlock = cid.MustParse("bafy2bzaceapyg2uyzk7vueh3xccxkuwbz3nxewjyguoxvhx77malc2lzn2ybi")

WhitelistedBlock skips checks on message validity in this block to sidestep the zero-bls signature

View Source
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 MustParseID added in v1.30.0

func MustParseID(id string) peer.ID

func SetAddressNetwork

func SetAddressNetwork(n address.Network)

Types

type DrandConfig

type DrandConfig struct {
	Servers       []string
	Relays        []string
	ChainInfoJSON string
	IsChained     bool // Prior to Drand quicknet, beacons form a chain, post quicknet they do not (FIP-0063)
}

type DrandEnum

type DrandEnum int
const (
	DrandMainnet DrandEnum = iota + 1
	DrandTestnet

	DrandIncentinet
	DrandQuicknet
)

type DrandPoint

type DrandPoint struct {
	Start  abi.ChainEpoch
	Config DrandConfig
}

func DrandConfigSchedule

func DrandConfigSchedule() []DrandPoint

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL