Documentation ¶
Index ¶
Constants ¶
const ( DefaultConfidence = uint64(5) DefaultMessageWaitLookback = abi.ChainEpoch(100) // in most cases, this should be enough to avoid races. LookbackNoLimit = abi.ChainEpoch(-1) )
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.
const ( NoTimeout = math.MaxInt64 NoHeight = abi.ChainEpoch(-1) )
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
const ( FilBase = uint64(2_000_000_000) FilAllocStorageMining = uint64(1_100_000_000) )
const ( FilecoinPrecision = uint64(1_000_000_000_000_000_000) FilReserved = uint64(300_000_000) )
const ( VerifSigCacheSize = 32000 Finality = policy.ChainFinality )
Size of signature verification cache 32k keeps the cache around 10MB in size, max
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.16.0"
BuildVersion is the local build version, set by build system
const DefaultHashFunction = uint64(mh.BLAKE2B_MIN + 31)
The multihash function identifier to use for content addresses.
const DevSealProofType = abi.RegisteredSealProof_StackedDrg2KiBV1
const ForkLengthThreshold = Finality
Epochs
const MainNetBlockDelaySecs = uint64(builtin0.EpochDurationSeconds)
const MessageConfidence = uint64(5)
Epochs
const StringEmpty = ""
const TestNetworkVersion = network.Version23
const TicketRandomnessLookback = abi.ChainEpoch(1)
Epochs
Variables ¶
var ( DevRegisteredWinningPoStProof = abi.RegisteredPoStProof_StackedDrgWinning2KiBV1 DevRegisteredWindowPoStProof = abi.RegisteredPoStProof_StackedDrgWindow2KiBV1 )
var ( InitialRewardBalance *big.Int InitialFilReserved *big.Int )
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 CurrentCommit string
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 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 FevmEnableEthRPC = os.Getenv("VENUS_FEVM_ENABLEETHRPC") == "1"
FevmEnableEthRPC enables eth rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
var FiveHundredTwelveMiBSectorSize = abi.SectorSize(512 << 20)
FiveHundredTwelveMiBSectorSize contain 512MiB after sealing.
var InsecurePoStValidation = os.Getenv("INSECURE_POST_VALIDATION") == "1"
InsecurePoStValidation use to attach debug
var NoMigrationResultCache = os.Getenv("VENUS_NO_MIGRATION_RESULT_CACHE") == "1"
NoMigrationResultCache will not use cached migration results
var NoSlashFilter = os.Getenv("VENUS_NO_SLASHFILTER") == "_yes_i_know_and_i_accept_that_may_loss_my_fil"
NoSlashFilter will not check whether the miner's block violates the consensus
var ThirtyTwoGiBSectorSize = abi.SectorSize(1 << 35)
ThirtyTwoGiBSectorSize contain 32GiB after sealing.
Functions ¶
func SetAddressNetwork ¶
func SetAddressNetwork(n address.Network)
Types ¶
This section is empty.