lotus-miner: add config for disabling winning post

This commit is contained in:
Łukasz Magiera 2023-11-11 12:19:58 +01:00
parent 8b4101360a
commit f2ef006abd
2 changed files with 13 additions and 2 deletions

View File

@ -121,8 +121,12 @@ func ConfigStorageMiner(c interface{}) Option {
// Mining / proving // Mining / proving
Override(new(*slashfilter.SlashFilter), modules.NewSlashFilter), Override(new(*slashfilter.SlashFilter), modules.NewSlashFilter),
Override(new(*miner.Miner), modules.SetupBlockProducer),
Override(new(gen.WinningPoStProver), storage.NewWinningPoStProver), If(!cfg.Subsystems.DisableWinningPoSt,
Override(new(*miner.Miner), modules.SetupBlockProducer),
Override(new(gen.WinningPoStProver), storage.NewWinningPoStProver),
),
Override(PreflightChecksKey, modules.PreflightChecks), Override(PreflightChecksKey, modules.PreflightChecks),
Override(new(*sealing.Sealing), modules.SealingPipeline(cfg.Fees)), Override(new(*sealing.Sealing), modules.SealingPipeline(cfg.Fees)),

View File

@ -162,6 +162,13 @@ type MinerSubsystemConfig struct {
// to window post, including scheduling, submitting proofs, and recovering // to window post, including scheduling, submitting proofs, and recovering
// sectors. // sectors.
DisableWindowPoSt bool DisableWindowPoSt bool
// When winning post is disabled, the miner process will NOT attempt to mine
// blocks. This should only be set when there's an external process mining
// blocks on behalf of the miner.
// When disabled and no external block producers are configured, all potential
// block rewards will be missed!
DisableWinningPoSt bool
} }
type DealmakingConfig struct { type DealmakingConfig struct {