chore: Move cfg getter into PCPolicy; Clamp values on get
This commit is contained in:
+8
-5
@@ -10,6 +10,8 @@ import (
|
||||
"github.com/filecoin-project/go-state-types/big"
|
||||
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors/builtin"
|
||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
|
||||
)
|
||||
@@ -131,11 +133,10 @@ type SealingConfig struct {
|
||||
|
||||
WaitDealsDelay Duration
|
||||
|
||||
// CommittedCapacityDefaultLifetime is the default duration a Committed Capacity (CC)
|
||||
// sector will live before it must be extended or converted into sector containing deals
|
||||
// before it is terminated.
|
||||
// Value must be between 180-540 days inclusive.
|
||||
CommittedCapacityDefaultLifetime Duration
|
||||
// CommittedCapacitySectorLifetime is the duration a Committed Capacity (CC) sector will
|
||||
// live before it must be extended or converted into sector containing deals before it is
|
||||
// terminated. Value must be between 180-540 days inclusive.
|
||||
CommittedCapacitySectorLifetime Duration
|
||||
|
||||
AlwaysKeepUnsealedCopy bool
|
||||
|
||||
@@ -358,6 +359,8 @@ func DefaultStorageMiner() *StorageMiner {
|
||||
PreCommitBatchWait: Duration(24 * time.Hour), // this should be less than 31.5 hours, which is the expiration of a precommit ticket
|
||||
PreCommitBatchSlack: Duration(3 * time.Hour), // time buffer for forceful batch submission before sectors/deals in batch would start expiring, higher value will lower the chances for message fail due to expiration
|
||||
|
||||
CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * policy.GetMaxSectorExpirationExtension()),
|
||||
|
||||
AggregateCommits: true,
|
||||
MinCommitBatch: miner5.MinAggregatedSectors, // per FIP13, we must have at least four proofs to aggregate, where 4 is the cross over point where aggregation wins out on single provecommit gas costs
|
||||
MaxCommitBatch: miner5.MaxAggregatedSectors, // maximum 819 sectors, this is the maximum aggregation per FIP13
|
||||
|
||||
Reference in New Issue
Block a user