-
Notifications
You must be signed in to change notification settings - Fork 82
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: initial pass at daily_fee accounting #1622
Conversation
cccfdfb
to
d014397
Compare
1570235
to
ad9059e
Compare
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.
aeb15d4
to
607b9b8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
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.
I'm fixing multiple issues while trying to track down this bug. To say the least, I'm not feeling great about this FIP. |
44b268f
to
bb764b3
Compare
Test failure problem turned out to be a bad argument order specified in |
17cf92d
to
d2fc3de
Compare
47364f4
to
5a5b285
Compare
Let me know if you can see opportunity for more invariant checks in here. I've got deadline total checks and expiration queue checks. Didn't see a point in adding anything at the miner level since it'd need to figure out live sectors from the deadlines anyway and then be comparing to the fees in the deadlines. The most awkward bit of this I think is partition compaction. There's a big note in |
Just realising your TODO in |
a1507de
to
4431ba3
Compare
6080f1d
to
4431ba3
Compare
To match our other power variable names.
* 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]>
Draft. Doesn't even pass all the existing tests yet, but I wanted to try and bang this out to at least get started to see what it might look like. I need to put a bit more thought into precisely where we're handling it and what we're doing.