Skip to content

Commit

Permalink
Merge pull request #11406 from filecoin-project/feat/lp-disable-wdpost
Browse files Browse the repository at this point in the history
feat: lotus miner config to entirely disable WindowPoSt
  • Loading branch information
snadrus authored Nov 10, 2023
2 parents 2d192c4 + 2bb4940 commit 3178388
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 14 deletions.
15 changes: 15 additions & 0 deletions documentation/en/default-lotus-miner-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@
# env var: LOTUS_SUBSYSTEMS_SECTORINDEXAPIINFO
#SectorIndexApiInfo = ""

# When window post is enabled, the miner will automatically submit window post proofs
# for all sectors that are eligible for window post
# IF WINDOW POST IS DISABLED, THE MINER WILL NOT SUBMIT WINDOW POST PROOFS
# THIS WILL RESULT IN FAULTS AND PENALTIES IF NO OTHER MECHANISM IS RUNNING
# TO SUBMIT WINDOW POST PROOFS.
# Note: This option is entirely disabling the window post scheduler,
# not just the builtin PoSt computation like Proving.DisableBuiltinWindowPoSt.
# This option will stop lotus-miner from performing any actions related
# to window post, including scheduling, submitting proofs, and recovering
# sectors.
#
# type: bool
# env var: LOTUS_SUBSYSTEMS_DISABLEWINDOWPOST
#DisableWindowPoSt = false


[Dealmaking]
# When enabled, the miner can accept online deals
Expand Down
13 changes: 0 additions & 13 deletions node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,19 +345,6 @@ func Repo(r repo.Repo) Option {
}
}

func Provider(r repo.Repo) Option {
return func(settings *Settings) error {
return Options(
func(s *Settings) error { s.Base = true; return nil }, // mark Base as applied
ApplyIf(func(s *Settings) bool { return s.Config },
Error(errors.New("the Base() option must be set before Config option")),
),
//ApplyIf(IsType(repo.WdPost), ConfigWdPost(c)),
//ApplyIf(IsType(repo.WinPost), ConfigWinPost(c)),
)(settings)
}
}

type StopFunc func(context.Context) error

// New builds and starts new Filecoin node
Expand Down
2 changes: 1 addition & 1 deletion node/builder_miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func ConfigStorageMiner(c interface{}) Option {
Override(PreflightChecksKey, modules.PreflightChecks),
Override(new(*sealing.Sealing), modules.SealingPipeline(cfg.Fees)),

Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(cfg.Fees, cfg.Proving)),
If(!cfg.Subsystems.DisableWindowPoSt, Override(new(*wdpost.WindowPoStScheduler), modules.WindowPostScheduler(cfg.Fees, cfg.Proving))),
Override(new(sectorblocks.SectorBuilder), From(new(*sealing.Sealing))),
),

Expand Down
15 changes: 15 additions & 0 deletions node/config/doc_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions node/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,18 @@ type MinerSubsystemConfig struct {

SealerApiInfo string // if EnableSealing == false
SectorIndexApiInfo string // if EnableSectorStorage == false

// When window post is enabled, the miner will automatically submit window post proofs
// for all sectors that are eligible for window post
// IF WINDOW POST IS DISABLED, THE MINER WILL NOT SUBMIT WINDOW POST PROOFS
// THIS WILL RESULT IN FAULTS AND PENALTIES IF NO OTHER MECHANISM IS RUNNING
// TO SUBMIT WINDOW POST PROOFS.
// Note: This option is entirely disabling the window post scheduler,
// not just the builtin PoSt computation like Proving.DisableBuiltinWindowPoSt.
// This option will stop lotus-miner from performing any actions related
// to window post, including scheduling, submitting proofs, and recovering
// sectors.
DisableWindowPoSt bool
}

type DealmakingConfig struct {
Expand Down

0 comments on commit 3178388

Please sign in to comment.