diff --git a/CHANGELOG.md b/CHANGELOG.md index b9961b039fa..57439861efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,11 @@ - deps(f3): bump go-f3 version to 0.8.6, move power table cache to go-f3 from lotus ([filecoin-project/lotus#13144](https://github.com/filecoin-project/lotus/pull/13144)) - feat(f3): move go-f3 datastore to separate leveldb instance ([filecoin-project/lotus#13174](https://github.com/filecoin-project/lotus/pull/13174)) - chore: bump the pubsub validation queue length to 256 ([filecoin-project/lotus#13176](https://github.com/filecoin-project/lotus/pull/13176)) - +- feat(miner): Adjust PreCommit & ProveCommit logic for optimal nv25 gas usage: + - remove deprecated pre-nv25 code, including batch balancer calculations + - default to PreCommit batching + - default to ProveCommit aggregation + - remove config options: AggregateCommits, AggregateAboveBaseFee, BatchPreCommitAboveBaseFee # Node v1.33.0 / 2025-05-08 The Lotus v1.33.0 release introduces experimental v2 APIs with F3 awareness, featuring a new TipSet selection mechanism that significantly enhances how applications interact with the Filecoin blockchain. This release candidate also adds F3-aware Ethereum APIs via the /v2 endpoint. All of the /v2 APIs implement intelligent fallback mechanisms between F3 and Expected Consensus and are exposed through the Lotus Gateway. diff --git a/chain/actors/policy/policy.go b/chain/actors/policy/policy.go index bb4a4e568e6..b072cbcdf1e 100644 --- a/chain/actors/policy/policy.go +++ b/chain/actors/policy/policy.go @@ -843,129 +843,6 @@ func GetAddressedSectorsMax(nwVer network.Version) (int, error) { } } -// GetDeclarationsMax is deprecated -// -// DEPRECATED: remove after nv25 (FIP 0100) -func GetDeclarationsMax(nwVer network.Version) (int, error) { - v, err := actorstypes.VersionForNetwork(nwVer) - if err != nil { - return 0, err - } - switch v { - - case actorstypes.Version0: - - // TODO: Should we instead error here since the concept doesn't exist yet? - return miner0.AddressedPartitionsMax, nil - - case actorstypes.Version2: - - return miner2.DeclarationsMax, nil - - case actorstypes.Version3: - - return miner3.DeclarationsMax, nil - - case actorstypes.Version4: - - return miner4.DeclarationsMax, nil - - case actorstypes.Version5: - - return miner5.DeclarationsMax, nil - - case actorstypes.Version6: - - return miner6.DeclarationsMax, nil - - case actorstypes.Version7: - - return miner7.DeclarationsMax, nil - - case actorstypes.Version8: - - return miner8.DeclarationsMax, nil - - case actorstypes.Version9: - - return miner9.DeclarationsMax, nil - - case actorstypes.Version10: - - return miner10.DeclarationsMax, nil - - case actorstypes.Version11: - - return miner11.DeclarationsMax, nil - - case actorstypes.Version12: - - return miner12.DeclarationsMax, nil - - case actorstypes.Version13: - - return miner13.DeclarationsMax, nil - - case actorstypes.Version14: - - return miner14.DeclarationsMax, nil - - case actorstypes.Version15: - - return miner15.DeclarationsMax, nil - - case actorstypes.Version16: - - return DeclarationsMax, nil - - default: - return 0, xerrors.Errorf("unsupported network version") - } -} - -func AggregateProveCommitNetworkFee(nwVer network.Version, aggregateSize int, baseFee abi.TokenAmount) (abi.TokenAmount, error) { - v, err := actorstypes.VersionForNetwork(nwVer) - if err != nil { - return big.Zero(), err - } - switch v { - case actorstypes.Version0: - return big.Zero(), nil - case actorstypes.Version2: - return big.Zero(), nil - case actorstypes.Version3: - return big.Zero(), nil - case actorstypes.Version4: - return big.Zero(), nil - case actorstypes.Version5: - return miner5.AggregateNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version6: - return miner6.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version7: - return miner7.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version8: - return miner8.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version9: - return miner9.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version10: - return miner10.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version11: - return miner11.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version12: - return miner12.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version13: - return miner13.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version14: - return miner14.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version15: - return miner15.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - case actorstypes.Version16: - return big.Zero(), nil - default: - return big.Zero(), xerrors.Errorf("unsupported network version") - } -} - func AggregatePreCommitNetworkFee(nwVer network.Version, aggregateSize int, baseFee abi.TokenAmount) (abi.TokenAmount, error) { v, err := actorstypes.VersionForNetwork(nwVer) if err != nil { diff --git a/chain/actors/policy/policy.go.template b/chain/actors/policy/policy.go.template index 18b56a1f381..fe8fa583438 100644 --- a/chain/actors/policy/policy.go.template +++ b/chain/actors/policy/policy.go.template @@ -284,54 +284,6 @@ func GetAddressedSectorsMax(nwVer network.Version) (int, error) { } } -// GetDeclarationsMax is deprecated -// -// DEPRECATED: remove after nv25 (FIP 0100) -func GetDeclarationsMax(nwVer network.Version) (int, error) { - v, err := actorstypes.VersionForNetwork(nwVer) - if err != nil { - return 0, err - } - switch v { - {{range .versions}} - case actorstypes.Version{{.}}: - {{if (eq . 0)}} - // TODO: Should we instead error here since the concept doesn't exist yet? - return miner{{.}}.AddressedPartitionsMax, nil - {{else if (ge . 16)}} - return DeclarationsMax, nil - {{else}} - return miner{{.}}.DeclarationsMax, nil - {{end}} - {{end}} - default: - return 0, xerrors.Errorf("unsupported network version") - } -} - -func AggregateProveCommitNetworkFee(nwVer network.Version, aggregateSize int, baseFee abi.TokenAmount) (abi.TokenAmount, error) { - v, err := actorstypes.VersionForNetwork(nwVer) - if err != nil { - return big.Zero(), err - } - switch v { - {{- range .versions}} - case actorstypes.Version{{.}}: - {{- if (ge . 16)}} - return big.Zero(), nil - {{- else if (ge . 6)}} - return miner{{.}}.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil - {{- else if (eq . 5)}} - return miner{{.}}.AggregateNetworkFee(aggregateSize, baseFee), nil - {{- else}} - return big.Zero(), nil - {{- end -}} - {{- end}} - default: - return big.Zero(), xerrors.Errorf("unsupported network version") - } -} - func AggregatePreCommitNetworkFee(nwVer network.Version, aggregateSize int, baseFee abi.TokenAmount) (abi.TokenAmount, error) { v, err := actorstypes.VersionForNetwork(nwVer) if err != nil { diff --git a/cli/spcli/sectors.go b/cli/spcli/sectors.go index 02c03487898..b15a087fc0f 100644 --- a/cli/spcli/sectors.go +++ b/cli/spcli/sectors.go @@ -864,12 +864,6 @@ func SectorsExtendCmd(getActorAddress ActorAddressGetter) *cli.Command { return err } - // TODO: remove after nv25 (FIP 0100) - declMax, err := policy.GetDeclarationsMax(nv) - if err != nil { - return err - } - addrSectors := sectorsMax if cctx.Int("max-sectors") != 0 { addrSectors = cctx.Int("max-sectors") @@ -955,7 +949,7 @@ func SectorsExtendCmd(getActorAddress ActorAddressGetter) *cli.Command { sectorsInDecl := int(sectorsWithoutClaimsCount) + len(sectorsWithClaims) scount += sectorsInDecl - if scount > addrSectors || len(p.Extensions) >= declMax { + if scount > addrSectors || len(p.Extensions) >= policy.DeclarationsMax { params = append(params, p) p = miner.ExtendSectorExpiration2Params{} scount = sectorsInDecl diff --git a/documentation/en/default-lotus-miner-config.toml b/documentation/en/default-lotus-miner-config.toml index f92591aa578..35fb2106233 100644 --- a/documentation/en/default-lotus-miner-config.toml +++ b/documentation/en/default-lotus-miner-config.toml @@ -351,12 +351,6 @@ # env var: LOTUS_SEALING_PRECOMMITBATCHSLACK #PreCommitBatchSlack = "3h0m0s" - # enable / disable commit aggregation (takes effect after nv13) - # - # type: bool - # env var: LOTUS_SEALING_AGGREGATECOMMITS - #AggregateCommits = true - # minimum batched commit size - batches above this size will eventually be sent on a timeout # # type: int @@ -381,23 +375,6 @@ # env var: LOTUS_SEALING_COMMITBATCHSLACK #CommitBatchSlack = "1h0m0s" - # DEPRECATED: remove after nv25 (FIP 0100) - # network BaseFee below which to stop doing precommit batching, instead - # sending precommit messages to the chain individually. When the basefee is - # below this threshold, precommit messages will get sent out immediately. - # - # type: types.FIL - # env var: LOTUS_SEALING_BATCHPRECOMMITABOVEBASEFEE - #BatchPreCommitAboveBaseFee = "0.00000000032 FIL" - - # DEPRECATED: remove after nv25 (FIP 0100) - # network BaseFee below which to stop doing commit aggregation, instead - # submitting proofs to the chain individually - # - # type: types.FIL - # env var: LOTUS_SEALING_AGGREGATEABOVEBASEFEE - #AggregateAboveBaseFee = "0.00000000032 FIL" - # When submitting several sector prove commit messages simultaneously, this option allows you to # stagger the number of prove commits submitted per epoch # This is done because gas estimates for ProveCommits are non deterministic and increasing as a large diff --git a/itests/direct_data_onboard_test.go b/itests/direct_data_onboard_test.go index 9fafe184918..b44bf7e37fe 100644 --- a/itests/direct_data_onboard_test.go +++ b/itests/direct_data_onboard_test.go @@ -368,7 +368,6 @@ func TestOnboardRawPieceSnap(t *testing.T) { sc.PreferNewSectorsForDeals = false sc.MakeNewSectorForDeals = false sc.MakeCCSectorsAvailable = true - sc.AggregateCommits = false })) ens.InterconnectAll().BeginMiningMustPost(blocktime) diff --git a/itests/sector_miner_collateral_test.go b/itests/sector_miner_collateral_test.go index 5bb2e79df8e..cf30fbe7ade 100644 --- a/itests/sector_miner_collateral_test.go +++ b/itests/sector_miner_collateral_test.go @@ -65,8 +65,6 @@ func TestMinerBalanceCollateral(t *testing.T) { sc.AlwaysKeepUnsealedCopy = true sc.WaitDealsDelay = time.Hour - sc.AggregateCommits = batching - sc.PreCommitBatchWait = time.Hour sc.CommitBatchWait = time.Hour @@ -77,8 +75,6 @@ func TestMinerBalanceCollateral(t *testing.T) { sc.CollateralFromMinerBalance = enabled sc.AvailableBalanceBuffer = big.Zero() sc.DisableCollateralFallback = false - sc.AggregateAboveBaseFee = big.Zero() - sc.BatchPreCommitAboveBaseFee = big.Zero() return sc, nil }, nil diff --git a/itests/sector_pledge_test.go b/itests/sector_pledge_test.go index b9b424c60c3..582df7f67a2 100644 --- a/itests/sector_pledge_test.go +++ b/itests/sector_pledge_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/require" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/go-state-types/big" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" "github.com/filecoin-project/lotus/api" @@ -65,11 +64,7 @@ func TestPledgeBatching(t *testing.T) { kit.QuietMiningLogs() - client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(!aggregate), kit.MutateSealingConfig(func(sc *config.SealingConfig) { - if aggregate { - sc.AggregateAboveBaseFee = types.FIL(big.Zero()) - } - })) + client, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(!aggregate)) ens.InterconnectAll().BeginMiningMustPost(blockTime) client.WaitTillChain(ctx, kit.HeightAtLeast(10)) diff --git a/node/config/def.go b/node/config/def.go index 27c905cb26c..c667992a95b 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -129,15 +129,11 @@ func DefaultStorageMiner() *StorageMiner { CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * uint64(maxSectorExtentsion) * uint64(time.Second)), - 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 CommitBatchWait: Duration(24 * time.Hour), // this can be up to 30 days CommitBatchSlack: Duration(1 * 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 - BatchPreCommitAboveBaseFee: types.FIL(types.BigMul(types.PicoFil, types.NewInt(320))), // 0.32 nFIL - AggregateAboveBaseFee: types.FIL(types.BigMul(types.PicoFil, types.NewInt(320))), // 0.32 nFIL - TerminateBatchMin: 1, TerminateBatchMax: 100, TerminateBatchWait: Duration(5 * time.Minute), diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index 7225d34b69f..870e18817a9 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -1049,12 +1049,6 @@ This is useful for forcing all deals to be assigned as snap deals to sectors mar Comment: `time buffer for forceful batch submission before sectors/deal in batch would start expiring`, }, - { - Name: "AggregateCommits", - Type: "bool", - - Comment: `enable / disable commit aggregation (takes effect after nv13)`, - }, { Name: "MinCommitBatch", Type: "int", @@ -1079,23 +1073,6 @@ This is useful for forcing all deals to be assigned as snap deals to sectors mar Comment: `time buffer for forceful batch submission before sectors/deals in batch would start expiring`, }, - { - Name: "BatchPreCommitAboveBaseFee", - Type: "types.FIL", - - Comment: `DEPRECATED: remove after nv25 (FIP 0100) -network BaseFee below which to stop doing precommit batching, instead -sending precommit messages to the chain individually. When the basefee is -below this threshold, precommit messages will get sent out immediately.`, - }, - { - Name: "AggregateAboveBaseFee", - Type: "types.FIL", - - Comment: `DEPRECATED: remove after nv25 (FIP 0100) -network BaseFee below which to stop doing commit aggregation, instead -submitting proofs to the chain individually`, - }, { Name: "MaxSectorProveCommitsSubmittedPerEpoch", Type: "uint64", diff --git a/node/config/types.go b/node/config/types.go index 8ad2df37e10..7c0dd007afc 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -283,8 +283,6 @@ type SealingConfig struct { // time buffer for forceful batch submission before sectors/deal in batch would start expiring PreCommitBatchSlack Duration - // enable / disable commit aggregation (takes effect after nv13) - AggregateCommits bool // minimum batched commit size - batches above this size will eventually be sent on a timeout MinCommitBatch int // maximum batched commit size - batches will be sent immediately above this size @@ -294,17 +292,6 @@ type SealingConfig struct { // time buffer for forceful batch submission before sectors/deals in batch would start expiring CommitBatchSlack Duration - // DEPRECATED: remove after nv25 (FIP 0100) - // network BaseFee below which to stop doing precommit batching, instead - // sending precommit messages to the chain individually. When the basefee is - // below this threshold, precommit messages will get sent out immediately. - BatchPreCommitAboveBaseFee types.FIL - - // DEPRECATED: remove after nv25 (FIP 0100) - // network BaseFee below which to stop doing commit aggregation, instead - // submitting proofs to the chain individually - AggregateAboveBaseFee types.FIL - // When submitting several sector prove commit messages simultaneously, this option allows you to // stagger the number of prove commits submitted per epoch // This is done because gas estimates for ProveCommits are non deterministic and increasing as a large diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index 7e9482db67f..17e93cec816 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -449,13 +449,10 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error PreCommitBatchWait: config.Duration(cfg.PreCommitBatchWait), PreCommitBatchSlack: config.Duration(cfg.PreCommitBatchSlack), - AggregateCommits: cfg.AggregateCommits, - MinCommitBatch: cfg.MinCommitBatch, - MaxCommitBatch: cfg.MaxCommitBatch, - CommitBatchWait: config.Duration(cfg.CommitBatchWait), - CommitBatchSlack: config.Duration(cfg.CommitBatchSlack), - AggregateAboveBaseFee: types.FIL(cfg.AggregateAboveBaseFee), - BatchPreCommitAboveBaseFee: types.FIL(cfg.BatchPreCommitAboveBaseFee), + MinCommitBatch: cfg.MinCommitBatch, + MaxCommitBatch: cfg.MaxCommitBatch, + CommitBatchWait: config.Duration(cfg.CommitBatchWait), + CommitBatchSlack: config.Duration(cfg.CommitBatchSlack), TerminateBatchMax: cfg.TerminateBatchMax, TerminateBatchMin: cfg.TerminateBatchMin, @@ -499,13 +496,10 @@ func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.Se PreCommitBatchWait: time.Duration(sealingCfg.PreCommitBatchWait), PreCommitBatchSlack: time.Duration(sealingCfg.PreCommitBatchSlack), - AggregateCommits: sealingCfg.AggregateCommits, MinCommitBatch: sealingCfg.MinCommitBatch, MaxCommitBatch: sealingCfg.MaxCommitBatch, CommitBatchWait: time.Duration(sealingCfg.CommitBatchWait), CommitBatchSlack: time.Duration(sealingCfg.CommitBatchSlack), - AggregateAboveBaseFee: types.BigInt(sealingCfg.AggregateAboveBaseFee), - BatchPreCommitAboveBaseFee: types.BigInt(sealingCfg.BatchPreCommitAboveBaseFee), MaxSectorProveCommitsSubmittedPerEpoch: sealingCfg.MaxSectorProveCommitsSubmittedPerEpoch, TerminateBatchMax: sealingCfg.TerminateBatchMax, diff --git a/storage/pipeline/commit_batch.go b/storage/pipeline/commit_batch.go index f2d6d68ff1c..09de54292fd 100644 --- a/storage/pipeline/commit_batch.go +++ b/storage/pipeline/commit_batch.go @@ -207,7 +207,7 @@ func (b *CommitBatcher) maybeStartBatch(notif bool) ([]sealiface.CommitBatchRes, return nil, xerrors.Errorf("getting config: %w", err) } - if notif && total < cfg.MaxCommitBatch && cfg.AggregateCommits { + if notif && total < cfg.MaxCommitBatch { return nil, nil } @@ -223,22 +223,7 @@ func (b *CommitBatcher) maybeStartBatch(notif bool) ([]sealiface.CommitBatchRes, return nil, xerrors.Errorf("getting network version: %s", err) } - blackedOut := func() bool { - const nv16BlackoutWindow = abi.ChainEpoch(20) // a magik number - if ts.Height() <= buildconstants.UpgradeSkyrHeight && buildconstants.UpgradeSkyrHeight-ts.Height() < nv16BlackoutWindow { - return true - } - return false - } - - individual := (total < cfg.MinCommitBatch) || (total < miner.MinAggregatedSectors) || blackedOut() || !cfg.AggregateCommits - - // TODO: remove after nv25 (FIP 0100) - if !individual && !cfg.AggregateAboveBaseFee.Equals(big.Zero()) && nv < network.Version25 { - if ts.MinTicketBlock().ParentBaseFee.LessThan(cfg.AggregateAboveBaseFee) { - individual = true - } - } + individual := (total < cfg.MinCommitBatch) || (total < miner.MinAggregatedSectors) // After nv21, we have a new ProveCommitSectors2 method, which supports // batching without aggregation, but it doesn't support onboarding @@ -384,17 +369,6 @@ func (b *CommitBatcher) processBatchV2(cfg sealiface.Config, sectors []abi.Secto res.Error = err.Error() return []sealiface.CommitBatchRes{res}, xerrors.Errorf("aggregating proofs: %w", err) } - - aggFeeRaw, err := policy.AggregateProveCommitNetworkFee(nv, len(infos), ts.MinTicketBlock().ParentBaseFee) - if err != nil { - res.Error = err.Error() - log.Errorf("getting aggregate commit network fee: %s", err) - return []sealiface.CommitBatchRes{res}, xerrors.Errorf("getting aggregate commit network fee: %s", err) - } - - aggFee := big.Div(big.Mul(aggFeeRaw, aggFeeNum), aggFeeDen) - - needFunds = big.Add(collateral, aggFee) } needFunds, err = collateralSendAmount(b.mctx, b.api, b.maddr, cfg, needFunds) diff --git a/storage/pipeline/precommit_batch.go b/storage/pipeline/precommit_batch.go index d18ffd6c725..e627e2885e6 100644 --- a/storage/pipeline/precommit_batch.go +++ b/storage/pipeline/precommit_batch.go @@ -201,15 +201,9 @@ func (b *PreCommitBatcher) maybeStartBatch(notif bool) ([]sealiface.PreCommitBat return nil, xerrors.Errorf("couldn't get network version: %w", err) } - // TODO: remove after nv25 (FIP 0100) - curBasefeeLow := false - if !cfg.BatchPreCommitAboveBaseFee.Equals(big.Zero()) && ts.MinTicketBlock().ParentBaseFee.LessThan(cfg.BatchPreCommitAboveBaseFee) && nv < network.Version25 { - curBasefeeLow = true - } - // if this wasn't an user-forced batch, and we're not at/above the max batch size, // and we're not above the basefee threshold, don't batch yet - if notif && total < cfg.MaxPreCommitBatch && !curBasefeeLow { + if notif && total < cfg.MaxPreCommitBatch { return nil, nil } diff --git a/storage/pipeline/sealiface/config.go b/storage/pipeline/sealiface/config.go index 69def52042c..81ececdce13 100644 --- a/storage/pipeline/sealiface/config.go +++ b/storage/pipeline/sealiface/config.go @@ -46,17 +46,11 @@ type Config struct { PreCommitBatchWait time.Duration PreCommitBatchSlack time.Duration - AggregateCommits bool MinCommitBatch int MaxCommitBatch int CommitBatchWait time.Duration CommitBatchSlack time.Duration - // DEPRECATED: remove after nv25 (FIP 0100) - AggregateAboveBaseFee abi.TokenAmount - // DEPRECATED: remove after nv25 (FIP 0100) - BatchPreCommitAboveBaseFee abi.TokenAmount - MaxSectorProveCommitsSubmittedPerEpoch uint64 TerminateBatchMax uint64 diff --git a/storage/pipeline/terminate_batch.go b/storage/pipeline/terminate_batch.go index 1964dfad12c..b52cb3d7979 100644 --- a/storage/pipeline/terminate_batch.go +++ b/storage/pipeline/terminate_batch.go @@ -197,7 +197,6 @@ func (b *TerminateBatcher) processBatch(notif, after bool) (*cid.Cid, error) { break } - // TODO: remove after nv25 (FIP 0100) if len(params.Terminations) >= miner.DeclarationsMax { break } diff --git a/storage/wdpost/wdpost_run.go b/storage/wdpost/wdpost_run.go index df3b8f636f6..637a62a8030 100644 --- a/storage/wdpost/wdpost_run.go +++ b/storage/wdpost/wdpost_run.go @@ -544,14 +544,9 @@ func (s *WindowPoStScheduler) BatchPartitions(partitions []api.Partition, nv net return nil, xerrors.Errorf("getting sectors per partition: %w", err) } - // TODO: remove after nv25 (FIP 0100) // Also respect the AddressedPartitionsMax (which is the same as DeclarationsMax (which is all really just MaxPartitionsPerDeadline)) - declMax, err := policy.GetDeclarationsMax(nv) - if err != nil { - return nil, xerrors.Errorf("getting max declarations: %w", err) - } - if partitionsPerMsg > declMax { - partitionsPerMsg = declMax + if partitionsPerMsg > policy.DeclarationsMax { + partitionsPerMsg = policy.DeclarationsMax } // respect user config if set