sealer: Config for disabling builtin PoSt
This commit is contained in:
parent
0277ff4239
commit
84881f64ad
@ -309,12 +309,28 @@
|
|||||||
|
|
||||||
|
|
||||||
[Proving]
|
[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
|
# type: int
|
||||||
# env var: LOTUS_PROVING_PARALLELCHECKLIMIT
|
# env var: LOTUS_PROVING_PARALLELCHECKLIMIT
|
||||||
#ParallelCheckLimit = 128
|
#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]
|
[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.
|
# 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",
|
Name: "ParallelCheckLimit",
|
||||||
Type: "int",
|
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{
|
"Pubsub": []DocField{
|
||||||
|
@ -67,6 +67,8 @@ func (c *StorageMiner) StorageManager() sealer.Config {
|
|||||||
|
|
||||||
Assigner: c.Storage.Assigner,
|
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 {
|
type ProvingConfig struct {
|
||||||
// Maximum number of sector checks to run in parallel. (0 = unlimited)
|
// 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
|
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 {
|
type SealingConfig struct {
|
||||||
|
@ -69,8 +69,10 @@ type Manager struct {
|
|||||||
workLk sync.Mutex
|
workLk sync.Mutex
|
||||||
work *statestore.StateStore
|
work *statestore.StateStore
|
||||||
|
|
||||||
parallelCheckLimit int
|
parallelCheckLimit int
|
||||||
disallowRemoteFinalize bool
|
disableBuiltinWindowPoSt bool
|
||||||
|
disableBuiltinWinningPoSt bool
|
||||||
|
disallowRemoteFinalize bool
|
||||||
|
|
||||||
callToWork map[storiface.CallID]WorkID
|
callToWork map[storiface.CallID]WorkID
|
||||||
// used when we get an early return and there's no callToWork mapping
|
// used when we get an early return and there's no callToWork mapping
|
||||||
@ -120,7 +122,9 @@ type Config struct {
|
|||||||
ResourceFiltering ResourceFilteringStrategy
|
ResourceFiltering ResourceFilteringStrategy
|
||||||
|
|
||||||
// PoSt config
|
// PoSt config
|
||||||
ParallelCheckLimit int
|
ParallelCheckLimit int
|
||||||
|
DisableBuiltinWindowPoSt bool
|
||||||
|
DisableBuiltinWinningPoSt bool
|
||||||
|
|
||||||
DisallowRemoteFinalize bool
|
DisallowRemoteFinalize bool
|
||||||
|
|
||||||
@ -156,8 +160,10 @@ func New(ctx context.Context, lstor *paths.Local, stor paths.Store, ls paths.Loc
|
|||||||
|
|
||||||
localProver: prover,
|
localProver: prover,
|
||||||
|
|
||||||
parallelCheckLimit: sc.ParallelCheckLimit,
|
parallelCheckLimit: sc.ParallelCheckLimit,
|
||||||
disallowRemoteFinalize: sc.DisallowRemoteFinalize,
|
disableBuiltinWindowPoSt: sc.DisableBuiltinWindowPoSt,
|
||||||
|
disableBuiltinWinningPoSt: sc.DisableBuiltinWinningPoSt,
|
||||||
|
disallowRemoteFinalize: sc.DisallowRemoteFinalize,
|
||||||
|
|
||||||
work: mss,
|
work: mss,
|
||||||
callToWork: map[storiface.CallID]WorkID{},
|
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) {
|
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")
|
log.Info("GenerateWinningPoSt run at lotus-miner")
|
||||||
return m.localProver.GenerateWinningPoSt(ctx, minerID, sectorInfo, randomness)
|
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) {
|
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")
|
log.Info("GenerateWindowPoSt run at lotus-miner")
|
||||||
return m.localProver.GenerateWindowPoSt(ctx, minerID, sectorInfo, randomness)
|
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) {
|
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("worker-level api shouldn't be called at this level")
|
||||||
panic("implement me")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Manager) GenerateWindowPoStWithVanilla(ctx context.Context, proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, partitionIdx int) (proof.PoStProof, error) {
|
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("worker-level api shouldn't be called at this level")
|
||||||
panic("implement me")
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user