sealer: Config for disabling builtin PoSt
This commit is contained in:
parent
0277ff4239
commit
84881f64ad
@ -309,12 +309,28 @@
|
||||
|
||||
|
||||
[Proving]
|
||||
# Maximum number of sector checks to run in parallel. (0 = unlimited)
|
||||
# WARNING: Setting this value too high may make the node crash by running out of stack
|
||||
# WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due
|
||||
# to late submission.
|
||||
#
|
||||
# type: int
|
||||
# env var: LOTUS_PROVING_PARALLELCHECKLIMIT
|
||||
#ParallelCheckLimit = 128
|
||||
|
||||
# WARNING: If no windowPoSt workers are connected, window PoSt WILL FAIL resulting in faulty sectors which will need
|
||||
# to be recovered. Before enabling this option, make sure your PoSt workers work correctly.
|
||||
#
|
||||
# type: bool
|
||||
# env var: LOTUS_PROVING_DISABLEBUILTINWINDOWPOST
|
||||
#DisableBuiltinWindowPoSt = false
|
||||
|
||||
# WARNING: If no WinningPoSt workers are connected, Winning PoSt WILL FAIL resulting in lost block rewards.
|
||||
# Before enabling this option, make sure your PoSt workers work correctly.
|
||||
#
|
||||
# type: bool
|
||||
# env var: LOTUS_PROVING_DISABLEBUILTINWINNINGPOST
|
||||
#DisableBuiltinWinningPoSt = false
|
||||
|
||||
|
||||
[Sealing]
|
||||
# Upper bound on how many sectors can be waiting for more deals to be packed in it before it begins sealing at any given time.
|
||||
|
@ -627,7 +627,23 @@ over the worker address if this flag is set.`,
|
||||
Name: "ParallelCheckLimit",
|
||||
Type: "int",
|
||||
|
||||
Comment: `Maximum number of sector checks to run in parallel. (0 = unlimited)`,
|
||||
Comment: `WARNING: Setting this value too high may make the node crash by running out of stack
|
||||
WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due
|
||||
to late submission.`,
|
||||
},
|
||||
{
|
||||
Name: "DisableBuiltinWindowPoSt",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `WARNING: If no windowPoSt workers are connected, window PoSt WILL FAIL resulting in faulty sectors which will need
|
||||
to be recovered. Before enabling this option, make sure your PoSt workers work correctly.`,
|
||||
},
|
||||
{
|
||||
Name: "DisableBuiltinWinningPoSt",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `WARNING: If no WinningPoSt workers are connected, Winning PoSt WILL FAIL resulting in lost block rewards.
|
||||
Before enabling this option, make sure your PoSt workers work correctly.`,
|
||||
},
|
||||
},
|
||||
"Pubsub": []DocField{
|
||||
|
@ -67,6 +67,8 @@ func (c *StorageMiner) StorageManager() sealer.Config {
|
||||
|
||||
Assigner: c.Storage.Assigner,
|
||||
|
||||
ParallelCheckLimit: c.Proving.ParallelCheckLimit,
|
||||
ParallelCheckLimit: c.Proving.ParallelCheckLimit,
|
||||
DisableBuiltinWindowPoSt: c.Proving.DisableBuiltinWindowPoSt,
|
||||
DisableBuiltinWinningPoSt: c.Proving.DisableBuiltinWinningPoSt,
|
||||
}
|
||||
}
|
||||
|
@ -221,9 +221,23 @@ type RetrievalPricingDefault struct {
|
||||
|
||||
type ProvingConfig struct {
|
||||
// Maximum number of sector checks to run in parallel. (0 = unlimited)
|
||||
//
|
||||
// WARNING: Setting this value too high may make the node crash by running out of stack
|
||||
// WARNING: Setting this value too low may make sector challenge reading much slower, resulting in failed PoSt due
|
||||
// to late submission.
|
||||
ParallelCheckLimit int
|
||||
|
||||
// todo disable builtin post
|
||||
// Disable Window PoSt computation on the lotus-miner process even if no window PoSt workers are present.
|
||||
//
|
||||
// WARNING: If no windowPoSt workers are connected, window PoSt WILL FAIL resulting in faulty sectors which will need
|
||||
// to be recovered. Before enabling this option, make sure your PoSt workers work correctly.
|
||||
DisableBuiltinWindowPoSt bool
|
||||
|
||||
// Disable Winning PoSt computation on the lotus-miner process even if no winning PoSt workers are present.
|
||||
//
|
||||
// WARNING: If no WinningPoSt workers are connected, Winning PoSt WILL FAIL resulting in lost block rewards.
|
||||
// Before enabling this option, make sure your PoSt workers work correctly.
|
||||
DisableBuiltinWinningPoSt bool
|
||||
}
|
||||
|
||||
type SealingConfig struct {
|
||||
|
@ -69,8 +69,10 @@ type Manager struct {
|
||||
workLk sync.Mutex
|
||||
work *statestore.StateStore
|
||||
|
||||
parallelCheckLimit int
|
||||
disallowRemoteFinalize bool
|
||||
parallelCheckLimit int
|
||||
disableBuiltinWindowPoSt bool
|
||||
disableBuiltinWinningPoSt bool
|
||||
disallowRemoteFinalize bool
|
||||
|
||||
callToWork map[storiface.CallID]WorkID
|
||||
// used when we get an early return and there's no callToWork mapping
|
||||
@ -120,7 +122,9 @@ type Config struct {
|
||||
ResourceFiltering ResourceFilteringStrategy
|
||||
|
||||
// PoSt config
|
||||
ParallelCheckLimit int
|
||||
ParallelCheckLimit int
|
||||
DisableBuiltinWindowPoSt bool
|
||||
DisableBuiltinWinningPoSt bool
|
||||
|
||||
DisallowRemoteFinalize bool
|
||||
|
||||
@ -156,8 +160,10 @@ func New(ctx context.Context, lstor *paths.Local, stor paths.Store, ls paths.Loc
|
||||
|
||||
localProver: prover,
|
||||
|
||||
parallelCheckLimit: sc.ParallelCheckLimit,
|
||||
disallowRemoteFinalize: sc.DisallowRemoteFinalize,
|
||||
parallelCheckLimit: sc.ParallelCheckLimit,
|
||||
disableBuiltinWindowPoSt: sc.DisableBuiltinWindowPoSt,
|
||||
disableBuiltinWinningPoSt: sc.DisableBuiltinWinningPoSt,
|
||||
disallowRemoteFinalize: sc.DisallowRemoteFinalize,
|
||||
|
||||
work: mss,
|
||||
callToWork: map[storiface.CallID]WorkID{},
|
||||
|
@ -17,7 +17,9 @@ import (
|
||||
)
|
||||
|
||||
func (m *Manager) GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) {
|
||||
if !m.winningPoStSched.CanSched(ctx) {
|
||||
if !m.disableBuiltinWinningPoSt && !m.winningPoStSched.CanSched(ctx) {
|
||||
// if builtin PoSt isn't disabled, and there are no workers, compute the PoSt locally
|
||||
|
||||
log.Info("GenerateWinningPoSt run at lotus-miner")
|
||||
return m.localProver.GenerateWinningPoSt(ctx, minerID, sectorInfo, randomness)
|
||||
}
|
||||
@ -76,7 +78,9 @@ func (m *Manager) generateWinningPoSt(ctx context.Context, minerID abi.ActorID,
|
||||
}
|
||||
|
||||
func (m *Manager) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) (proof []proof.PoStProof, skipped []abi.SectorID, err error) {
|
||||
if !m.windowPoStSched.CanSched(ctx) {
|
||||
if !m.disableBuiltinWindowPoSt && !m.windowPoStSched.CanSched(ctx) {
|
||||
// if builtin PoSt isn't disabled, and there are no workers, compute the PoSt locally
|
||||
|
||||
log.Info("GenerateWindowPoSt run at lotus-miner")
|
||||
return m.localProver.GenerateWindowPoSt(ctx, minerID, sectorInfo, randomness)
|
||||
}
|
||||
@ -230,11 +234,9 @@ func (m *Manager) generatePartitionWindowPost(ctx context.Context, spt abi.Regis
|
||||
}
|
||||
|
||||
func (m *Manager) GenerateWinningPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte) ([]proof.PoStProof, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
panic("worker-level api shouldn't be called at this level")
|
||||
}
|
||||
|
||||
func (m *Manager) GenerateWindowPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, partitionIdx int) (proof.PoStProof, error) {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
panic("worker-level api shouldn't be called at this level")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user