Merge pull request #8343 from filecoin-project/feat/more-snap-config
feat: sealing: More SnapDeals config knobs
This commit is contained in:
+17
-2
@@ -714,13 +714,28 @@ Note that setting this number too high in relation to deal ingestion rate may re
|
||||
Name: "MaxSealingSectors",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `Upper bound on how many sectors can be sealing at the same time when creating new CC sectors (0 = unlimited)`,
|
||||
Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when creating new CC sectors (0 = unlimited)`,
|
||||
},
|
||||
{
|
||||
Name: "MaxSealingSectorsForDeals",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `Upper bound on how many sectors can be sealing at the same time when creating new sectors with deals (0 = unlimited)`,
|
||||
Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when creating new sectors with deals (0 = unlimited)`,
|
||||
},
|
||||
{
|
||||
Name: "PreferNewSectorsForDeals",
|
||||
Type: "bool",
|
||||
|
||||
Comment: `Prefer creating new sectors even if there are sectors Available for upgrading.
|
||||
This setting combined with MaxUpgradingSectors set to a value higher than MaxSealingSectorsForDeals makes it
|
||||
possible to use fast sector upgrades to handle high volumes of storage deals, while still using the simple sealing
|
||||
flow when the volume of storage deals is lower.`,
|
||||
},
|
||||
{
|
||||
Name: "MaxUpgradingSectors",
|
||||
Type: "uint64",
|
||||
|
||||
Comment: `Upper bound on how many sectors can be sealing+upgrading at the same time when upgrading CC sectors with deals (0 = MaxSealingSectorsForDeals)`,
|
||||
},
|
||||
{
|
||||
Name: "CommittedCapacitySectorLifetime",
|
||||
|
||||
+11
-2
@@ -228,12 +228,21 @@ type SealingConfig struct {
|
||||
// 0 = no limit
|
||||
MaxWaitDealsSectors uint64
|
||||
|
||||
// Upper bound on how many sectors can be sealing at the same time when creating new CC sectors (0 = unlimited)
|
||||
// Upper bound on how many sectors can be sealing+upgrading at the same time when creating new CC sectors (0 = unlimited)
|
||||
MaxSealingSectors uint64
|
||||
|
||||
// Upper bound on how many sectors can be sealing at the same time when creating new sectors with deals (0 = unlimited)
|
||||
// Upper bound on how many sectors can be sealing+upgrading at the same time when creating new sectors with deals (0 = unlimited)
|
||||
MaxSealingSectorsForDeals uint64
|
||||
|
||||
// Prefer creating new sectors even if there are sectors Available for upgrading.
|
||||
// This setting combined with MaxUpgradingSectors set to a value higher than MaxSealingSectorsForDeals makes it
|
||||
// possible to use fast sector upgrades to handle high volumes of storage deals, while still using the simple sealing
|
||||
// flow when the volume of storage deals is lower.
|
||||
PreferNewSectorsForDeals bool
|
||||
|
||||
// Upper bound on how many sectors can be sealing+upgrading at the same time when upgrading CC sectors with deals (0 = MaxSealingSectorsForDeals)
|
||||
MaxUpgradingSectors uint64
|
||||
|
||||
// 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
|
||||
|
||||
@@ -916,6 +916,8 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error
|
||||
MaxWaitDealsSectors: cfg.MaxWaitDealsSectors,
|
||||
MaxSealingSectors: cfg.MaxSealingSectors,
|
||||
MaxSealingSectorsForDeals: cfg.MaxSealingSectorsForDeals,
|
||||
PreferNewSectorsForDeals: cfg.PreferNewSectorsForDeals,
|
||||
MaxUpgradingSectors: cfg.MaxUpgradingSectors,
|
||||
CommittedCapacitySectorLifetime: config.Duration(cfg.CommittedCapacitySectorLifetime),
|
||||
WaitDealsDelay: config.Duration(cfg.WaitDealsDelay),
|
||||
MakeCCSectorsAvailable: cfg.MakeCCSectorsAvailable,
|
||||
@@ -954,6 +956,8 @@ func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.Se
|
||||
MaxWaitDealsSectors: sealingCfg.MaxWaitDealsSectors,
|
||||
MaxSealingSectors: sealingCfg.MaxSealingSectors,
|
||||
MaxSealingSectorsForDeals: sealingCfg.MaxSealingSectorsForDeals,
|
||||
PreferNewSectorsForDeals: sealingCfg.PreferNewSectorsForDeals,
|
||||
MaxUpgradingSectors: sealingCfg.MaxUpgradingSectors,
|
||||
StartEpochSealingBuffer: abi.ChainEpoch(dealmakingCfg.StartEpochSealingBuffer),
|
||||
MakeNewSectorForDeals: dealmakingCfg.MakeNewSectorForDeals,
|
||||
CommittedCapacitySectorLifetime: time.Duration(sealingCfg.CommittedCapacitySectorLifetime),
|
||||
|
||||
Reference in New Issue
Block a user