2020-07-07 16:31:46 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2022-06-14 15:00:51 +00:00
|
|
|
"github.com/ipfs/go-log/v2"
|
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
|
|
|
|
2022-06-14 15:00:51 +00:00
|
|
|
"github.com/filecoin-project/lotus/build"
|
|
|
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
2020-07-07 16:31:46 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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
|
2021-04-27 14:29:12 +00:00
|
|
|
_ = log.SetLogLevel("badgerbs", "ERROR") // noisy
|
|
|
|
_ = log.SetLogLevel("sub", "ERROR") // noisy
|
|
|
|
_ = log.SetLogLevel("pubsub", "ERROR") // noisy
|
|
|
|
_ = log.SetLogLevel("chain", "ERROR") // noisy
|
|
|
|
_ = log.SetLogLevel("chainstore", "ERROR") // noisy
|
|
|
|
_ = log.SetLogLevel("basichost", "ERROR") // noisy
|
2020-07-07 16:31:46 +00:00
|
|
|
|
|
|
|
_ = 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.
|
2021-06-07 09:27:29 +00:00
|
|
|
// policy.SetWPoStChallengeWindow(abi.ChainEpoch(5)) // commented-out until we enable PoSt faults tests
|
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
|
|
|
}
|