-
Notifications
You must be signed in to change notification settings - Fork 84
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
FIP-0100: whole feature branch #1630
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'd like to disable the merge queue to get this one in with the commits intact so we can preserve the pieces of work separately, along with a clear line of provenance. |
58af5c4
to
e542112
Compare
Stebalien
approved these changes
Mar 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already reviewed commit by commit.
e542112
to
144c5ba
Compare
Just type changes and tests for their serialization forms so far. * `Deadline` - Add `total_power: PowerPair` - Add `daily_fee: TokenAmount` * `SectorOnChainInfo` - Add `daily_fee: TokenAmount` as an optional field - Tests that it can load both 15 and 16 field forms but always saves 16 field form * `ExpirationSet` - Add `fee_deduction: TokenAmount` as an optional field - Tests that it can load both 5 and 6 field forms but always save 6 field form Closes: #1613 Closes: #1614 Closes: #1615
* Adds a `daily_proof_fee(policy: &Policy, circulating_supply: TokenAmount)` for the miner actor * Adds `DAILY_FEE_CIRCULATING_SUPPLY_MULTIPLIER_NUM` and `DAILY_FEE_CIRCULATING_SUPPLY_MULTIPLIER_DENOM` for a 7.4e-15 multiplier as per the FIP: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0100.md#per-sector-fee-added Added a test to sanity check, it also ~matches what was given as a current-day estimate [here](filecoin-project/FIPs#1105 (comment)). Closes: #1612
* fip-0100: initial pass at daily_fee accounting * fip-0100: handle sector termination and expiration * fip-0100: update total power and record a TODO 1. We need to add to the total power when adding sectors, and deduct when deleting partitions. 2. We're going to need to figure out some way to handle fees when we compact partitions. * update the daily fee when faulting/recovering I'm using a negative delta in the recover case because that's what we do elsewhere in that function, but I'm not super happy about it. * fip-0100: remove fees when removing faulty sectors from the expiration queue * fip-0100: make clippy happy, fix bad arg order in ExpirationQueue#remove * fip-0100: account for fee adjustment for fault reschedules * fip-0100: add invariant for fees * fip-0100: more invariants, handle partition removal/compaction cases * fip-0100: document return values * fip-0100: account for power changes when extending/snapping sectors * fip-0100: add state invariant for live deadline power * fip-0100: handle unproven power on termination * fip-0100: handle remaining todos * fip-0100: rename total_power to live_power To match our other power variable names. --------- Co-authored-by: Steven Allen <[email protected]>
* fip-0100: move compact_partitions logic into deadline * fip-0100: remove sectors in AMT not state * fip-0100: Deadline::add_sectors flag to optionally accumulate fees
If we snap/extend across multiple deadlines (which appears to be untested), we would have summed up the power from all proceeding deadlines.
When, on extension, we encounter a legacy sector with a zero fee, update it based on the current circulating supply. fixes #1634
now needs explicit instructions on how much total burn, pledge change and power change it should expect
* test: correctly handle cron vesting in tests 1. In the test harness, check if we should vest every epoch. The queue should already be quantized. 2. Correctly handle the fact that we vest at the _end_ of an epoch in the cron vesting test. * feat: refactor vesting funds into a head and a tail This lets us efficiently take fees from vesting funds without loading/storing this object each time. It also lets us check if there are funds to vest without having to load any additional state, because the "next" batch of vesting funds are always stored in the root state object. If FIP-0100 passes, we'll likely want this change as we'll otherwise read/write the vesting funds queue on every deadline for every miner. fixes #1594 * doc: explain deadline alignment * review: simplify test
* fip-0100: QAP multiplier for daily_fee 7.4e-15 per 32GiB QAP -> 2.1536e-25 per byte QAP Closes: #1637 * fip-0100: more daily_fee inspection in integration tests * fip-0100: properly handle fee adjustment for extensions & updates * fip-0100: use u128 & BigInt in policy, remove scaling from fee calculation * fip-0100: remove fee eqn scaling entirely * fip-0100: address review * fip-0100: add fixed reference fee amount to test To ensure that the numbers we're getting are within expected range—all other tests work on relative amounts.
* PRE_COMMIT_SECTOR_BATCH_MAX_SIZE * PROVE_REPLICA_UPDATES_MAX_SIZE * DECLARATIONS_MAX
* fip-0100: reduce daily_fee to 5.56e-15 / 32GiB Ref: filecoin-project/FIPs#1105 (comment) * fip-0100: add grace period for legacy sector extensions
144c5ba
to
1cc9c2b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ongoing work in
feat/fip-0100