Documentation ¶
Index ¶
Constants ¶
const ( NetworkDefault = 0 NetworkMainnet = 0x1 Network2k = 0x2 NetworkDebug = 0x3 NetworkCalibnet = 0x4 NetworkNerpa = 0x5 NetworkInterop = 0x6 )
const ActorUpgradeNetworkVersion = network.Version4
const AllowableClockDriftSecs = uint64(1)
const BaseFeeMaxChangeDenom = 8 // 12.5%
const BlockGasLimit = 10_000_000_000
BlockGasLimit is the maximum amount of gas that can be used to execute messages in a single block.
const BlockGasTarget = BlockGasLimit / 2
const BlockMessageLimit = 10000
const BlsSignatureCacheSize = 40000
assuming 4000 messages per round, this lets us not lose any messages across a 10 block reorg.
const BuildVersion = "1.0.4"
BuildVersion is the local build version, set by build system
const DefaultConfidence = uint64(5)
const DefaultHashFunction = uint64(mh.BLAKE2B_MIN + 31)
The multihash function identifier to use for content addresses.
const DefaultMessageWaitLookback = abi.ChainEpoch(100) // in most cases, this should be enough to avoid races.
const DevSealProofType = abi.RegisteredSealProof_StackedDrg2KiBV1
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 Finality = policy.ChainFinality
const ForkLengthThreshold = Finality
Epochs
const InitialBaseFee = 100e6
const LookbackNoLimit = abi.ChainEpoch(-1)
const MainNetBlockDelaySecs = uint64(builtin0.EpochDurationSeconds)
const MessageConfidence = uint64(5)
Epochs
const MinimumBaseFee = 100
const NewestNetworkVersion = network.Version13
const NoHeight = abi.ChainEpoch(-1)
const NoTimeout = math.MaxInt64
const PackingEfficiencyDenom = 5
const PackingEfficiencyNum = 4
const PropagationDelaySecs = uint64(6)
const StringEmpty = ""
const TicketRandomnessLookback = abi.ChainEpoch(1)
Epochs
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 ( FullAPIVersion0 = newVer(1, 3, 0) FullAPIVersion1 = newVer(2, 1, 0) )
semver versions of the rpc api exposed
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
var DefaultCidBuilder = cid.V1Builder{Codec: cid.DagCBOR, MhType: DefaultHashFunction}
A builder for all blockchain CIDs. Note that sector commitments use a different scheme.
var DevRegisteredSealProof = abi.RegisteredSealProof_StackedDrg2KiBV1
just for test
var DevRegisteredWindowPoStProof = abi.RegisteredPoStProof_StackedDrgWindow2KiBV1
var DevRegisteredWinningPoStProof = abi.RegisteredPoStProof_StackedDrgWinning2KiBV1
var DevSectorSize abi.SectorSize
DevSectorSize is a tiny sector useful only for testing.
var EightMiBSectorSize = abi.SectorSize(1 << 23)
EightMiBSectorSize contains 8MiB after sealing.
var ExpectedLeadersPerEpoch = builtin0.ExpectedLeadersPerEpoch
expect blocks number in a tipset
var FiveHundredTwelveMiBSectorSize = abi.SectorSize(512 << 20)
FiveHundredTwelveMiBSectorSize contain 512MiB after sealing.
var InitialFilReserved *big.Int
var InitialRewardBalance *big.Int
var InsecurePoStValidation = false
todo move this value to config
var ThirtyTwoGiBSectorSize = abi.SectorSize(1 << 35)
ThirtyTwoGiBSectorSize contain 32GiB after sealing.
Functions ¶
func SetAddressNetwork ¶
func SetAddressNetwork(n address.Network)