Skip to content

chore(miner): remove deprecated code as a result of FIP-0100 #13049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tediou5
Copy link
Contributor

@tediou5 tediou5 commented Apr 22, 2025

Related Issues

Proposed Changes

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Apr 22, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-project-automation github-project-automation bot moved this from 📌 Triage to ⌨️ In Progress in FilOz Apr 22, 2025
@tediou5 tediou5 changed the title [skip changelog] chore(FIP-0100): remove deprecated code [skip changelog] chore: remove deprecated code(FIP-0100) Apr 22, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tediou5 tediou5 changed the title [skip changelog] chore: remove deprecated code(FIP-0100) [skip changelog]chore(FIP-0100): remove deprecated code Apr 22, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tediou5 tediou5 changed the title [skip changelog]chore(FIP-0100): remove deprecated code [skip changelog] chore: remove deprecated code Apr 22, 2025
@github-actions github-actions bot dismissed their stale review April 22, 2025 02:47

PR title now matches the required format.

@tediou5 tediou5 moved this from ⌨️ In Progress to 🔎 Awaiting Review in FilOz Apr 22, 2025
@BigLep BigLep added the skip/changelog This change does not require CHANGELOG.md update label Apr 22, 2025
@BigLep BigLep changed the title [skip changelog] chore: remove deprecated code chore(miner): remove deprecated code as a result of FIP-0100 Apr 22, 2025
@github-actions github-actions bot dismissed their stale review April 22, 2025 04:45

PR title now matches the required format.

@BigLep BigLep requested a review from Stebalien April 22, 2025 04:45
@BigLep
Copy link
Member

BigLep commented Apr 22, 2025

@Stebalien : can you please look given @rvagg is out?

@BigLep BigLep moved this from 🐱 Todo to 🔎 Awaiting Review in nv25 Track Board Apr 22, 2025
@BigLep
Copy link
Member

BigLep commented Apr 22, 2025

(This is followup to #12919 now that we've upgraded to nv25)

@rjan90 rjan90 dismissed github-actions[bot]’s stale review April 30, 2025 06:50

title has been fixed

@BigLep
Copy link
Member

BigLep commented May 6, 2025

@rvagg : I assume you'll look later this week when you come back online.

@BigLep BigLep requested a review from rvagg May 6, 2025 21:44
@@ -233,13 +233,6 @@ func (b *CommitBatcher) maybeStartBatch(notif bool) ([]sealiface.CommitBatchRes,

individual := (total < cfg.MinCommitBatch) || (total < miner.MinAggregatedSectors) || blackedOut() || !cfg.AggregateCommits
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line concerns me a bit and I think we should consider tweaking it

  1. We could remove all the blackedOut code, it's for Skyr and I don't think we need backward compatibility - if we have failing tests because of it we could just remove those tests; I don't think we have a policy of lotus miner being backward compatible, just lotus.
  2. I'd like to propose we remove AggregateCommits from the config entirely. I can't think of a good reason it should still exist.

But, what I don't have a good handle on is the way that AggregateCommits is used on line 210 where we hold off on a batch if it's true. I worry that the AggregateCommits setting might be confusing two things - whether to use aggregate proofs and how to handle the number of commits in a single PCS3.

@tediou5 would you mind taking a look at this? I'd prefer us to not change the logic that determines when to send a commit message but we want it to default to aggregate proofs whenever possible. I think those two might be entangled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, removing AggregateCommits is a good idea. Let me check the surrounding code.

Copy link
Contributor Author

@tediou5 tediou5 May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rvagg I’ve looked through the code and nothing seems to be blocking.

There’s just one small issue:
if a user really does want to submit only a single ProveCommit (I know that’s unlikely, but it could happen), then with aggregation still forced on they’d have to wait up to 24 hours or manually run publish-now.

Do you think that’s acceptable?

Also, lotus-shed still contains mathProveCommitAggFeesCmd and mathPreCommitAggFeesCmd; I think we could remove those two methods as well, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if a user really does want to submit only a single ProveCommit (I know that’s unlikely, but it could happen), then with aggregation still forced on they’d have to wait up to 24 hours or manually run publish-now.

I´m inclined to say that we are fine with this condition, given that most Lotus-Miner users know the lotus-miner sectors batching commit --publish-now cmd

@tediou5 tediou5 requested a review from rvagg May 13, 2025 06:04
@rjan90
Copy link
Contributor

rjan90 commented May 26, 2025

@rvagg could you look over the latest changes here, and see if things look okay so that we can get it merged?

@BigLep BigLep requested a review from Copilot June 3, 2025 04:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes deprecated batching and fee‐threshold logic introduced for FIP-0100 (nv25), cleaning up related config fields, policy functions, and documentation.

  • Consolidates partition declaration limits using the static policy.DeclarationsMax constant.
  • Removes old precommit/commit aggregation flags (AggregateCommits, AggregateAboveBaseFee, BatchPreCommitAboveBaseFee) and associated base-fee gating logic.
  • Cleans up deprecated policy functions (GetDeclarationsMax, AggregateProveCommitNetworkFee) and prunes unused config/docs entries and test setup.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
storage/wdpost/wdpost_run.go Replaced dynamic GetDeclarationsMax call with static policy.DeclarationsMax
storage/pipeline/terminate_batch.go Removed obsolete nv25‐related TODO and no-op condition
storage/pipeline/precommit_batch.go Dropped base-fee threshold gating before nv25
storage/pipeline/commit_batch.go Removed deprecated aggregation flags and fee computation logic
node/modules/storageminer.go Dropped deprecated seal config fields
node/config/types.go Removed deprecated commit/precommit fee config entries
node/config/doc_gen.go Pruned documentation entries for removed config fields
node/config/def.go Adjusted default sealing config by removing deprecated fields
itests/sector_pledge_test.go Removed test setup that mutated deprecated base-fee fields
itests/sector_miner_collateral_test.go Cleaned up unused deprecated config in test
itests/direct_data_onboard_test.go Removed unused AggregateCommits assignment in test
documentation/en/default-lotus-miner-config.toml Deleted commented‐out config entries for deprecated fields
cli/spcli/sectors.go Switched from policy.GetDeclarationsMax to policy.DeclarationsMax
chain/actors/policy/policy.go.template & .go Removed deprecated GetDeclarationsMax and AggregateProveCommitNetworkFee
Comments suppressed due to low confidence (2)

storage/pipeline/commit_batch.go:228

  • [nitpick] This comment references nv21 and aggregation logic that has been removed; please update or remove it so that the doc matches the new batching behavior post-FIP-0100.
// After nv21, we have a new ProveCommitSectors2 method, which supports

cli/spcli/sectors.go:952

  • [nitpick] Ensure that policy.DeclarationsMax is documented or surfaced in the CLI help text so users understand the new static limit in place of the old dynamic one.
if scount > addrSectors || len(p.Extensions) >= policy.DeclarationsMax {

Comment on lines 547 to 551
// 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
}

Copy link
Preview

Copilot AI Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider cleaning up the surrounding whitespace or updating the preceding comment to reflect that nv25-specific logic has been removed, improving readability.

Copilot uses AI. Check for mistakes.

@BigLep
Copy link
Member

BigLep commented Jun 10, 2025

@rvagg : repinging in case you have bandwidth now for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: 🔎 Awaiting Review
Status: 🔎 Awaiting Review
Development

Successfully merging this pull request may close these issues.

4 participants