FIP-0118: Additional FIL+ removal & datacap freeze - #1778
Conversation
There was a problem hiding this comment.
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.,
BatchActivateDealsnow returns activatedPieceInfoper 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.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
c5f6ba6 to
79ae939
Compare
|
@wjmelements and @akaladarshi : please review 2026-08-24. |
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_weightnow holds piece spacetime anddeal_weightis zeroed. This matches what the FIP asks for. One problem withdeal_weightis that it decays to zero over repeated extensions.extend_non_simple_qap_sectordeleted.SIMPLE_QA_POWERno longer branched on anywhere.weightagainstterm_start. It previously fired on every extended legacy claimed sector.pending_deal_allocation_idsremoved from market state; migration will write the new shape (one element shorter).BatchActivateDealsreturnsVec<Vec<PieceInfo>>;ActivatedDeal,SectorDealActivation,compute_cid,unsealed_cidall gone. Re-encodes:[size, cid]where it was[cid, size]. But this is a miner-only call so non-breaking from the outside.AllocationID/ClaimIDbecomeu64outside verifreg and datacap; market no longer depends onfil_actor_verifregat allactivate_sectors_piecesbecomesvalidate_and_summarize_pieces, returns outputs directly (no per-sector failure mode remained)VERIFIED_DEAL_WEIGHT_MULTIPLIERbecomesMAX_QUALITY_MULTIPLIER;validate_deals_for_sectoraccumulators collapsed.publish_storage_deals: 5N collection-root loads becomes 3 (minus datacap = yay for gas).DealSpacesremoved, and two cross-actor state-checker invariants with it:check_market_against_verifreg(its only input was a field that got deleted) andcheck_verifreg_against_datacap(asserted f06's datacap balance equals the sum of pending allocations, would have failed on every legal migrated state).Tests:
SnapDealsscenarios re-registered. Accidentally unhooked byFIP-0106: Remove of theProveReplicaUpdatesmethod from the miner actor #1688 in Aug 2025 and unrun since (105 integration tests now, up from 87).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.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_qapreworked to test unique variants now most got collapsed by QAP.Here's my list of FIP follow-ups after this exercise:
pending_deal_allocation_idsremoved + migrationBatchActivateDealstrim, including the[size, cid]encoding changeSIMPLE_QA_POWERnow vestigial; extension power-neutral for all vintagesterm_maxno longer bounds extension (removed pre-branch)FULL_QA_POWERabsent from normative text (named once, in the TODO section)verified_allocation_keyis accepted and ignored