2020-07-07 16:31:46 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/filecoin-project/lotus/build"
|
2020-10-06 12:13:03 +00:00
|
|
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
2020-07-07 16:31:46 +00:00
|
|
|
|
2020-09-16 10:51:23 +00:00
|
|
|
"github.com/filecoin-project/go-state-types/abi"
|
2020-07-07 16:31:46 +00:00
|
|
|
|
|
|
|
"github.com/ipfs/go-log/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2020-12-07 14:11:41 +00:00
|
|
|
build.BlockDelaySecs = 3
|
2020-07-07 16:31:46 +00:00
|
|
|
build.PropagationDelaySecs = 1
|
|
|
|
|
2020-12-07 14:11:41 +00:00
|
|
|
_ = log.SetLogLevel("*", "DEBUG")
|
|
|
|
_ = log.SetLogLevel("dht", "WARN")
|
|
|
|
_ = log.SetLogLevel("swarm2", "WARN")
|
|
|
|
_ = log.SetLogLevel("addrutil", "WARN")
|
|
|
|
_ = log.SetLogLevel("stats", "WARN")
|
2020-07-07 16:31:46 +00:00
|
|
|
_ = 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
|
|
|
|
|
2020-10-06 12:13:03 +00:00
|
|
|
// 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))
|
2020-07-27 11:57:01 +00:00
|
|
|
|
|
|
|
// 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.
|
2020-10-06 12:13:03 +00:00
|
|
|
policy.SetPreCommitChallengeDelay(abi.ChainEpoch(10))
|
|
|
|
|
|
|
|
policy.SetConsensusMinerMinPower(abi.NewTokenAmount(2048))
|
2020-11-27 18:36:02 +00:00
|
|
|
policy.SetSupportedProofTypes(abi.RegisteredSealProof_StackedDrg8MiBV1)
|
|
|
|
|
2020-10-06 12:13:03 +00:00
|
|
|
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.
|
2021-05-06 05:44:11 +00:00
|
|
|
build.UpgradeAssemblyHeight = 0
|
2020-07-07 16:31:46 +00:00
|
|
|
}
|