constants

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0, MIT Imports: 11 Imported by: 38

Documentation

Index

Constants

View Source
const (
	DefaultConfidence          = uint64(5)
	DefaultMessageWaitLookback = abi.ChainEpoch(100) // in most cases, this should be enough to avoid races.
	LookbackNoLimit            = abi.ChainEpoch(-1)
)
View Source
const (
	BlockGasLimit          = 10_000_000_000
	BlockGasTarget         = BlockGasLimit / 2
	BaseFeeMaxChangeDenom  = 8 // 12.5%
	InitialBaseFee         = 100e6
	MinimumBaseFee         = 100
	PackingEfficiencyNum   = 4
	PackingEfficiencyDenom = 5
)

BlockGasLimit is the maximum amount of gas that can be used to execute messages in a single block.

View Source
const (
	NoTimeout = math.MaxInt64
	NoHeight  = abi.ChainEpoch(-1)
)
View Source
const (
	WRatioNum = int64(1)
	WRatioDen = uint64(2)
)

constants for Weight calculation The ratio of weight contributed by short-term vs long-term factors in a given round

View Source
const (
	FilBase               = uint64(2_000_000_000)
	FilAllocStorageMining = uint64(1_100_000_000)
)
View Source
const (
	FilecoinPrecision = uint64(1_000_000_000_000_000_000)
	FilReserved       = uint64(300_000_000)
)
View Source
const (
	VerifSigCacheSize = 32000
	Finality          = policy.ChainFinality
)

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

View Source
const AllowableClockDriftSecs = uint64(1)
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 BuildVersion = "1.8.1"

BuildVersion is the local build version, set by build system

View Source
const DefaultHashFunction = uint64(mh.BLAKE2B_MIN + 31)

The multihash function identifier to use for content addresses.

View Source
const ForkLengthThreshold = Finality

Epochs

View Source
const MainNetBlockDelaySecs = uint64(builtin0.EpochDurationSeconds)
View Source
const MessageConfidence = uint64(5)

Epochs

View Source
const StringEmpty = ""
View Source
const TestNetworkVersion = network.Version17
View Source
const TicketRandomnessLookback = abi.ChainEpoch(1)

Epochs

Variables

View Source
var (
	DevRegisteredWinningPoStProof = abi.RegisteredPoStProof_StackedDrgWinning2KiBV1
	DevRegisteredWindowPoStProof  = abi.RegisteredPoStProof_StackedDrgWindow2KiBV1
)
View Source
var (
	InitialRewardBalance *big.Int
	InitialFilReserved   *big.Int
)
View Source
var Clock = clock.New()

Clock is the global clock for the system. In standard builds, we use a real-time clock, which maps to the `time` package.

Tests that need control of time can replace this variable with clock.NewMock(). Always use real time for socket/stream deadlines. todo move this clock to clock package. constant package should refer other as little as possible

View Source
var CurrentCommit string
View Source
var DefaultCidBuilder = cid.V1Builder{Codec: cid.DagCBOR, MhType: DefaultHashFunction}

A builder for all blockchain CIDs. Note that sector commitments use a different scheme.

just for test

View Source
var DevSectorSize abi.SectorSize

DevSectorSize is a tiny sector useful only for testing.

View Source
var EightMiBSectorSize = abi.SectorSize(1 << 23)

EightMiBSectorSize contains 8MiB after sealing.

View Source
var ExpectedLeadersPerEpoch = builtin0.ExpectedLeadersPerEpoch

expect blocks number in a tipset

View Source
var FiveHundredTwelveMiBSectorSize = abi.SectorSize(512 << 20)

FiveHundredTwelveMiBSectorSize contain 512MiB after sealing.

View Source
var InsecurePoStValidation = false

todo move this value to config

View Source
var ThirtyTwoGiBSectorSize = abi.SectorSize(1 << 35)

ThirtyTwoGiBSectorSize contain 32GiB after sealing.

Functions

func SetAddressNetwork

func SetAddressNetwork(n address.Network)

func UserVersion

func UserVersion() string

software version

Types

This section is empty.

Jump to

Keyboard shortcuts

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