Skip to content

FIP-0118: Additional FIL+ removal & datacap freeze - #1778

Open
rvagg wants to merge 3 commits into
fix/fips1249-1744-review-fixesfrom
rvagg/fip-0118-filplus-fixes
Open

FIP-0118: Additional FIL+ removal & datacap freeze#1778
rvagg wants to merge 3 commits into
fix/fips1249-1744-review-fixesfrom
rvagg/fip-0118-filplus-fixes

Conversation

@rvagg

@rvagg rvagg commented Aug 21, 2026

Copy link
Copy Markdown
Member

This is my pass over #1760. I'm about to dive in to #1775 and will give some feedback there ASAP but it should go on top of this. I'll get a feature branch set up after this and we can push the fil+ changes into one PR (#1760), reward actor changes in another (#1774) targetting that branch. Then we'll get Zen and Kuba to review these PRs respectively as they are able.

Two commits in here the market/miner work, then the datacap/verifreg freeze. Can be reviewed independently, the second is much smaller.

What's been tackled here:

  • verified_deal_weight now holds piece spacetime and deal_weight is zeroed. This matches what the FIP asks for. One problem with deal_weight is that it decays to zero over repeated extensions.
  • extend_non_simple_qap_sector deleted. SIMPLE_QA_POWER no longer branched on anywhere.
  • state checker asserts claimed space over current duration, not weight against term_start. It previously fired on every extended legacy claimed sector.
  • pending_deal_allocation_ids removed from market state; migration will write the new shape (one element shorter).
  • BatchActivateDeals returns Vec<Vec<PieceInfo>>; ActivatedDeal, SectorDealActivation, compute_cid, unsealed_cid all gone. Re-encodes: [size, cid] where it was [cid, size]. But this is a miner-only call so non-breaking from the outside.
  • AllocationID/ClaimID become u64 outside verifreg and datacap; market no longer depends on fil_actor_verifreg at all
  • every state-mutating method on datacap and verifreg rejects; reads still serve frozen state (also verifreg's emit module is completely dead).
  • activate_sectors_pieces becomes validate_and_summarize_pieces, returns outputs directly (no per-sector failure mode remained)
  • ESE2 chain inlined; VERIFIED_DEAL_WEIGHT_MULTIPLIER becomes MAX_QUALITY_MULTIPLIER; validate_deals_for_sector accumulators collapsed.
  • publish_storage_deals: 5N collection-root loads becomes 3 (minus datacap = yay for gas).
  • DealSpaces removed, and two cross-actor state-checker invariants with it: check_market_against_verifreg (its only input was a field that got deleted) and check_verifreg_against_datacap (asserted f06's datacap balance equals the sum of pending allocations, would have failed on every legal migrated state).
  • comment cleanup (focus on why/what, not what changed :shakes-fist-at-ai:).

Tests:

  • 15 orphaned SnapDeals scenarios re-registered. Accidentally unhooked by FIP-0106: Remove of the ProveReplicaUpdates method from the miner actor #1688 in Aug 2025 and unrun since (105 integration tests now, up from 87).
  • preseal path (InternalSectorSetupForPreseal) now covered. We deleted then restored this (renamed) and didn't bring tests with it (FIP-0084: Remove ProveCommit and dependencies #1540), so I put some back.
  • new vintage coverage: legacy CC snap-to-10x, legacy termination, SIMPLE-only extension, via a reusable make_sector_legacy (to do awkward state surgery).
  • daily_fees: original golden kept and scaled by QAP rather than replaced (I don't love touching goldens if we don't have to, and I know the provenance of this one). fees_proportional_to_qap reworked to test unique variants now most got collapsed by QAP.

Here's my list of FIP follow-ups after this exercise:

  • market state: pending_deal_allocation_ids removed + migration
  • BatchActivateDeals trim, including the [size, cid] encoding change
  • SIMPLE_QA_POWER now vestigial; extension power-neutral for all vintages
  • freeze stated as mutate-vs-read, with the method list
  • SnapDeals enumerated as a legacy 10x upgrade path
  • claim term_max no longer bounds extension (removed pre-branch)
  • FULL_QA_POWER absent from normative text (named once, in the TODO section)
  • section 1.5's "exact mechanism TBD" for SnapDeals data-presence
  • supersession statement: name FIP-0045 and FIP-0084; verified_allocation_key is accepted and ignored

@rvagg
rvagg requested review from akaladarshi and wjmelements and a lite review from Copilot August 21, 2026 08:30
@rvagg
rvagg requested a review from ZenGround0 as a code owner August 21, 2026 08:30
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Implements FIP-0118-related changes across miner/market/verifreg/datacap actors and invariant checking, primarily removing FIL+ / datacap-driven flows, freezing verifreg/datacap mutation paths, and updating sector/deal weight semantics to avoid decay across extensions while keeping integration and unit tests aligned.

Changes:

  • Refactors miner/market activation plumbing (e.g., BatchActivateDeals now returns activated PieceInfo per sector group; piece validation/summary logic simplified).
  • Freezes verifreg/datacap state mutation (mutations reject; reads still work) and removes market state’s pending allocation tracking.
  • Updates state invariants + integration/unit tests for the new weight/QAP semantics and new/legacy sector behaviors.

Reviewed changes

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

Show a summary per file
File Description
test_vm/tests/suite/replica_update3_test.rs Expands replica update suite coverage and centralizes scenario wiring.
test_vm/tests/suite/fip0118_test.rs Extends FIP-0118 VM test coverage for legacy/snap/termination/extension behaviors.
state/src/check.rs Updates invariants for new “claimed space over duration” semantics; removes datacap↔verifreg / market↔verifreg cross-checks.
integration_tests/src/util/workflows.rs Removes deprecated verifreg/datacap helper flows; introduces deal_spacetime helper.
integration_tests/src/util/mod.rs Adjusts verifreg claim listing types away from ClaimID aliasing.
integration_tests/src/tests/replica_update3_test.rs Aligns replica update expectations with new weight placement and 10x QAP behavior.
integration_tests/src/tests/prove_commit3_test.rs Updates prove-commit expectations to match deal_weight zeroing and verified_deal_weight usage.
integration_tests/src/tests/fip0118_test.rs Adds/updates FIP-0118 integration tests, including legacy sector rewriting and snap/extend behaviors.
integration_tests/src/tests/extend_sectors_test.rs Updates extension tests to validate “space restatement” behavior and new weight fields.
integration_tests/src/tests/batch_onboarding_deals_test.rs Cleans up now-obsolete AllocationID references in tests.
integration_tests/src/expects.rs Updates verifreg expectations to use u64 claim id type in params.
Cargo.lock Removes market’s dependency on fil_actor_verifreg.
actors/verifreg/tests/verifreg_actor_test.rs Updates tests to assert mutating methods reject under freeze semantics.
actors/verifreg/tests/harness/mod.rs Removes helper APIs for now-disabled mutation flows; keeps direct-state setup helpers.
actors/verifreg/src/lib.rs Removes event emitter module; makes mutating methods reject via datacap_deprecated.
actors/verifreg/src/emit.rs Deletes verifreg event emission helpers (module now dead).
actors/miner/tests/util.rs Updates test harness to new market activation return shape and 10x QAP pledge assumptions; adds preseal activation driver.
actors/miner/tests/terminate_sectors_test.rs Updates termination tests to use PieceInfo activations and new weight semantics.
actors/miner/tests/prove_replica_failures_test.rs Removes AllocationID typing and updates helper signatures accordingly.
actors/miner/tests/prove_commit.rs Adds direct coverage of InternalSectorSetupForPreseal and updates pledge/power expectations.
actors/miner/tests/prove_commit_sector_3_failures_test.rs Removes AllocationID typing from failure test setup.
actors/miner/tests/policy_test.rs Renames verified multiplier constant usage to MAX_QUALITY_MULTIPLIER.
actors/miner/tests/extend_sector_expiration_test.rs Updates sector extension tests to use PieceInfo and new weight placement.
actors/miner/tests/daily_fees_test.rs Updates fee tests for 10x QAP default; splits “deal content independence” vs “size proportionality”.
actors/miner/src/types.rs Updates public type docs/fields for new meaning of deal_weight/verified_deal_weight; makes claim/allocation ids u64.
actors/miner/src/testing.rs Extends miner invariant summaries with power_base_epoch.
actors/miner/src/policy.rs Renames verified multiplier to MAX_QUALITY_MULTIPLIER; updates quality math docs accordingly.
actors/miner/src/lib.rs Major refactor: simplifies piece activation summary, removes claim validation paths, updates extension and weight handling, updates events to use PieceInfo.
actors/miner/src/ext.rs Updates market extension types to match new BatchActivateDeals return payload.
actors/miner/src/emit.rs Updates sector events to emit PieceInfo rather than (Cid, u64) tuples.
actors/market/tests/verify_deals_for_activation_test.rs Updates activation result assertions to match Vec<PieceInfo> return shape.
actors/market/tests/sector_content_changed.rs Removes legacy pending-allocation test coverage after state shape removal.
actors/market/tests/market_actor_test.rs Removes datacap transfer tests and pending-allocation cleanup tests; updates batch activation call sites.
actors/market/tests/harness.rs Removes compute_cid plumbing from activation helpers and params.
actors/market/tests/batch_activate_deals.rs Updates activation tests for the new API and simplifies verified/unverified distinctions.
actors/market/tests/activate_deal_failures.rs Updates activation helper invocation after compute_cid removal.
actors/market/src/types.rs Removes ActivatedDeal/SectorDealActivation/DealSpaces; BatchActivateDealsResult now returns Vec<Vec<PieceInfo>>.
actors/market/src/testing.rs Removes pending allocation invariants and summary tracking.
actors/market/src/state.rs Removes pending_deal_allocation_ids from state and associated helpers.
actors/market/src/lib.rs Optimizes publish path by hoisting state loads; removes pending allocation deletion and compute_cid in activation.
actors/market/src/ext.rs Removes verifreg allocation-id alias module (market no longer depends on verifreg).
actors/market/Cargo.toml Drops fil_actor_verifreg dependency.
actors/datacap/tests/harness/mod.rs Removes destroy/allowance helpers that are now unused under frozen semantics.
actors/datacap/tests/datacap_actor_test.rs Updates destroy tests to assert universal rejection (including governor).
actors/datacap/src/lib.rs Makes destroy/transfer/allowance mutations reject consistently under FIP-0118 freeze.
Suppressed comments (1)

actors/market/src/lib.rs:487

  • Typo in doc comment: “deal peices” should be “deal pieces”.
    /// Activates a set of deals grouped by sector, returning each sector's pieces.
    /// Sectors' deals are activated in parameter-defined order.
    /// Each sector's deals are activated or fail as a group, but independently of other sectors.
    /// Note that confirming all deals fit within a sector is the caller's responsibility
    /// (and is implied by confirming the sector's data commitment is derived from the deal peices).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread actors/market/src/types.rs Outdated
@codecov-commenter

codecov-commenter commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.31034% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.57%. Comparing base (1ff11fe) to head (29d9e14).

Files with missing lines Patch % Lines
actors/miner/src/lib.rs 78.07% 41 Missing ⚠️
actors/datacap/src/lib.rs 28.57% 15 Missing ⚠️
integration_tests/src/util/mod.rs 0.00% 2 Missing ⚠️
actors/market/src/lib.rs 95.65% 1 Missing ⚠️
integration_tests/src/expects.rs 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                        Coverage Diff                         @@
##           fix/fips1249-1744-review-fixes    #1778      +/-   ##
==================================================================
+ Coverage                           88.22%   89.57%   +1.35%     
==================================================================
  Files                                 140      139       -1     
  Lines                               26555    26073     -482     
==================================================================
- Hits                                23428    23356      -72     
+ Misses                               3127     2717     -410     
Files with missing lines Coverage Δ
actors/market/src/state.rs 89.80% <ø> (-2.09%) ⬇️
actors/market/src/testing.rs 93.64% <ø> (+3.13%) ⬆️
actors/miner/src/emit.rs 100.00% <100.00%> (ø)
actors/miner/src/policy.rs 93.75% <100.00%> (-0.06%) ⬇️
actors/miner/src/testing.rs 91.78% <100.00%> (+0.01%) ⬆️
actors/miner/src/types.rs 100.00% <ø> (ø)
actors/verifreg/src/lib.rs 97.00% <100.00%> (+0.59%) ⬆️
integration_tests/src/util/workflows.rs 99.47% <100.00%> (+27.56%) ⬆️
state/src/check.rs 91.09% <100.00%> (+6.23%) ⬆️
actors/market/src/lib.rs 91.07% <95.65%> (+0.15%) ⬆️
... and 4 more

... and 7 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rvagg
rvagg force-pushed the rvagg/fip-0118-filplus-fixes branch from c5f6ba6 to 79ae939 Compare August 21, 2026 10:49
@BigLep

BigLep commented Aug 22, 2026

Copy link
Copy Markdown
Member

@wjmelements and @akaladarshi : please review 2026-08-24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants