diff --git a/documentation/en/default-lotus-miner-config.toml b/documentation/en/default-lotus-miner-config.toml index 634da3b9d..efd03a94c 100644 --- a/documentation/en/default-lotus-miner-config.toml +++ b/documentation/en/default-lotus-miner-config.toml @@ -173,14 +173,6 @@ # env var: LOTUS_DEALMAKING_EXPECTEDSEALDURATION #ExpectedSealDuration = "24h0m0s" - # Whether new sectors are created to pack incoming deals - # When this is set to false no new sectors will be created for sealing incoming deals - # This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade - # - # type: bool - # env var: LOTUS_DEALMAKING_MAKENEWSECTORFORDEALS - #MakeNewSectorForDeals = true - # Maximum amount of time proposed deal StartEpoch can be in future # # type: Duration @@ -380,6 +372,14 @@ # env var: LOTUS_SEALING_FINALIZEEARLY #FinalizeEarly = false + # Whether new sectors are created to pack incoming deals + # When this is set to false no new sectors will be created for sealing incoming deals + # This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade + # + # type: bool + # env var: LOTUS_SEALING_MAKENEWSECTORFORDEALS + #MakeNewSectorForDeals = true + # After sealing CC sectors, make them available for upgrading with deals # # type: bool diff --git a/node/config/def.go b/node/config/def.go index edc7ffef5..94b4c0390 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -110,6 +110,7 @@ func DefaultStorageMiner() *StorageMiner { WaitDealsDelay: Duration(time.Hour * 6), AlwaysKeepUnsealedCopy: true, FinalizeEarly: false, + MakeNewSectorForDeals: true, CollateralFromMinerBalance: false, AvailableBalanceBuffer: types.FIL(big.Zero()), @@ -163,7 +164,6 @@ func DefaultStorageMiner() *StorageMiner { ConsiderVerifiedStorageDeals: true, ConsiderUnverifiedStorageDeals: true, PieceCidBlocklist: []cid.Cid{}, - MakeNewSectorForDeals: true, // TODO: It'd be nice to set this based on sector size MaxDealStartDelay: Duration(time.Hour * 24 * 14), ExpectedSealDuration: Duration(time.Hour * 24), diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index ba5ffcc03..c7d339c92 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -253,14 +253,6 @@ Default value: 1 minute.`, Comment: `Maximum expected amount of time getting the deal into a sealed sector will take This includes the time the deal will need to get transferred and published before being assigned to a sector`, - }, - { - Name: "MakeNewSectorForDeals", - Type: "bool", - - Comment: `Whether new sectors are created to pack incoming deals -When this is set to false no new sectors will be created for sealing incoming deals -This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade`, }, { Name: "MaxDealStartDelay", @@ -765,6 +757,14 @@ avoid the relatively high cost of unsealing the data later, at the cost of more Comment: `Run sector finalization before submitting sector proof to the chain`, }, + { + Name: "MakeNewSectorForDeals", + Type: "bool", + + Comment: `Whether new sectors are created to pack incoming deals +When this is set to false no new sectors will be created for sealing incoming deals +This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade`, + }, { Name: "MakeCCSectorsAvailable", Type: "bool", diff --git a/node/config/types.go b/node/config/types.go index b3ba36c7f..73fe7a613 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -128,10 +128,6 @@ type DealmakingConfig struct { // This includes the time the deal will need to get transferred and published // before being assigned to a sector ExpectedSealDuration Duration - // Whether new sectors are created to pack incoming deals - // When this is set to false no new sectors will be created for sealing incoming deals - // This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade - MakeNewSectorForDeals bool // Maximum amount of time proposed deal StartEpoch can be in future MaxDealStartDelay Duration // When a deal is ready to publish, the amount of time to wait for more @@ -259,6 +255,11 @@ type SealingConfig struct { // Run sector finalization before submitting sector proof to the chain FinalizeEarly bool + // Whether new sectors are created to pack incoming deals + // When this is set to false no new sectors will be created for sealing incoming deals + // This is useful for forcing all deals to be assigned as snap deals to sectors marked for upgrade + MakeNewSectorForDeals bool + // After sealing CC sectors, make them available for upgrading with deals MakeCCSectorsAvailable bool diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 2d7a5c181..ae7a4eb0f 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -920,6 +920,7 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error MaxUpgradingSectors: cfg.MaxUpgradingSectors, CommittedCapacitySectorLifetime: config.Duration(cfg.CommittedCapacitySectorLifetime), WaitDealsDelay: config.Duration(cfg.WaitDealsDelay), + MakeNewSectorForDeals: cfg.MakeNewSectorForDeals, MakeCCSectorsAvailable: cfg.MakeCCSectorsAvailable, AlwaysKeepUnsealedCopy: cfg.AlwaysKeepUnsealedCopy, FinalizeEarly: cfg.FinalizeEarly, @@ -959,7 +960,7 @@ func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.Se PreferNewSectorsForDeals: sealingCfg.PreferNewSectorsForDeals, MaxUpgradingSectors: sealingCfg.MaxUpgradingSectors, StartEpochSealingBuffer: abi.ChainEpoch(dealmakingCfg.StartEpochSealingBuffer), - MakeNewSectorForDeals: dealmakingCfg.MakeNewSectorForDeals, + MakeNewSectorForDeals: sealingCfg.MakeNewSectorForDeals, CommittedCapacitySectorLifetime: time.Duration(sealingCfg.CommittedCapacitySectorLifetime), WaitDealsDelay: time.Duration(sealingCfg.WaitDealsDelay), MakeCCSectorsAvailable: sealingCfg.MakeCCSectorsAvailable,