-
Notifications
You must be signed in to change notification settings - Fork 83
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
chore: remove PRE_COMMIT_SECTOR_BATCH_MAX_SIZE and other gas-limited parameters #1586
base: feat/fip-0100
Are you sure you want to change the base?
Conversation
@kamuik16 |
CI is passing now. |
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.
Code seems good to me on a cursory review, but we need to draft a FIP for this because it's a protocol change, even though a minor one. There may be some unforeseen issues that come up during discussion in the FIP process.
So I bundled this up, modified some itest infra in lotus and ran an experiment and I could precommit a little above 1,000 sectors before hitting the message size limit. Gas is 514,759,261 when doing 1,000, although it's a new miner with minimal existing state to mutate so that's the cheapest case. Which all means that this isn't really "gas limited", at least for precommit batching. We'll have to get feedback before proceeding with this. I'll ask on Slack, maybe consider a draft FIP to gather discussion. Either way, @kamuik16, this one isn't going to get resolved very quickly. You might be best to pick another item off the possible list and move on to something productive while we figure this out. Thanks for the work so far (I can at least confirm that it works in for precommits when integrated into lotus). |
Ohh okay. |
We discussed this on slack (TL;DR: probably fine) but I wanted to followup here. At the end of the day:
The only things to watch out for are:
|
To expand on my comment WRT syscalls like |
Also note, this is part of #1268 but doesn't fix it completely. E.g., there's no reason to check |
We're going to let this PR sit until we've got a FIP in for the changes. It should be straightforward but there's some uncertainty about what the FIP process might throw up regarding this change. |
Why are we holding the FIP for this change? I think this is a straightforward protocol improvement. |
I think you've misunderstood. The PR is being held for the introduction of a FIP specifying the changes. It is straightforward, but does have functional effects so needs to follow the process. |
I'm moving this back to draft given it needs the corresponding FIP. We can mark ready for review/merge once the FIP is there. I don't have confirmation, but I heard discussion of doing the FIP work as part of filecoin-project/FIPs#1094 |
let's make sure we tie this with #1584 and close them both when we get it finally resolved |
* Add removal of gas-limited constraints to gas-savings proposal Ref: #1094 Ref: filecoin-project/builtin-actors#1586 Ref: filecoin-project/builtin-actors#1268 Ref: filecoin-project/lotus#10612 * fixup! Add removal of gas-limited constraints to gas-savings proposal
Given we have https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0100.md , I'll mark this ready for review |
Retargeting this to the |
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: filecoin-project#1613 Closes: filecoin-project#1614 Closes: filecoin-project#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: filecoin-project#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]>
…ct#1627) * 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.
Closes #1268