lotus/lotus-soup/init.go

53 lines
1.6 KiB
Go

package main
import (
"os"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/go-state-types/abi"
"github.com/ipfs/go-log/v2"
)
func init() {
build.BlockDelaySecs = 2
build.PropagationDelaySecs = 1
_ = log.SetLogLevel("*", "WARN")
_ = log.SetLogLevel("dht/RtRefreshManager", "ERROR") // noisy
_ = log.SetLogLevel("bitswap", "ERROR") // noisy
_ = os.Setenv("BELLMAN_NO_GPU", "1")
build.InsecurePoStValidation = true
build.DisableBuiltinAssets = true
// MessageConfidence is the amount of tipsets we wait after a message is
// mined, e.g. payment channel creation, to be considered committed.
build.MessageConfidence = 1
// The duration of a deadline's challenge window, the period before a
// deadline when the challenge is available.
//
// This will auto-scale the proving period.
policy.SetWPoStChallengeWindow(abi.ChainEpoch(5))
// Number of epochs between publishing the precommit and when the challenge for interactive PoRep is drawn
// used to ensure it is not predictable by miner.
policy.SetPreCommitChallengeDelay(abi.ChainEpoch(10))
policy.SetConsensusMinerMinPower(abi.NewTokenAmount(2048))
policy.SetSupportedProofTypes(abi.RegisteredSealProof_StackedDrg2KiBV1)
policy.SetMinVerifiedDealSize(abi.NewTokenAmount(256))
// Disable upgrades.
build.UpgradeSmokeHeight = -1
build.UpgradeIgnitionHeight = -2
build.UpgradeLiftoffHeight = -3
// We need to _run_ this upgrade because genesis doesn't support v2, so
// we run it at height 0.
build.UpgradeActorsV2Height = 0
}