-
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
fip-0100: QAP multiplier for daily_fee #1641
Conversation
af5b4bb
to
6b49e1a
Compare
316be46
to
ba4c34d
Compare
a81bf04
to
af442ce
Compare
Calling this one done; I've added and extended some tests, I think the coverage is OK for what this does. |
af442ce
to
c6f4a90
Compare
What's the rational behind storing the total fee in the sector info instead of storing the fee-per-qap?
We'd have to multiply the fee-per-qap by the qap when updating the fee, but that seems relatively simple (we can even provide a method on the sector info). |
Ugh, now I remember why this didn't feel complete - I need to mess with extensions and snaps in here which do the multiplication thing. Which does go to your point about storing the multiplier rather than the final fee. The complication I can see would be storing an appropriate QAP multipler daily_fee in the deadline since we're going to have a messy mix of different sector-level QAP. But are you suggesting storing the full fee value in the deadline but only the multiplier in the sector?
|
A |
Exactly. |
Another downside here is that it's not as nice for end users if we return SectorOnChainInfo as it is. Unless we do the calculation and present a modified version with the actual fee. Kind of annoying. |
Storing full fee in
Storing fee multiplier in
On the size:
On the accuracy:
|
86658a1
to
a480906
Compare
a480906
to
46186c4
Compare
Updated the branch with adjustment for snaps and extensions. As far as I can tell the only case where power changes with extensions is if you |
56e1f11
to
9edd353
Compare
7.4e-15 per 32GiB QAP -> 2.1536e-25 per byte QAP Closes: #1637
9edd353
to
481e181
Compare
To ensure that the numbers we're getting are within expected range—all other tests work on relative amounts.
In the latest commit, 946784f, I added a sanity check in the basic fee test: we should get within 1/5th of a nanoFIL of 5155.58 nanoFil for a fee on 32GiB QAP given a CS of 696.7M. This comes from the original 7.4e-15 multiplier from the FIP, so it's also checking my per-byte multiplier. The rest of the tests do relative amounts so this one helps make sure we're not spinning off wildly without realising it. |
7.4e-15 per 32GiB QAP -> 2.1536e-25 per byte QAP
Closes: #1637
(Draft while I add tests that properly cover this—existing tests that care about fees are all 32GiB QAP)