Conversation
silent-cipher
left a comment
There was a problem hiding this comment.
Everything else LGTM!
| for (const tier in baseFees) { | ||
| const baseFee = baseFees[tier as keyof typeof baseFees] | ||
|
|
||
| const gasFeeSingle = baseFee * gasUnits + 1e-7 * Math.log10(gasUnits / roots) |
There was a problem hiding this comment.
In latest source implementation, log term is removed and fixed gas for nextProvingPeriod is taken into account. So, as per source gas fee calculation for a proof can be replaced with ->
const nextProvingPeriodGas = 55000000
const gasFeeSingle = ( gasUnits + nextProvingPeriodGas ) * baseFee
There was a problem hiding this comment.
Thanks for looking into this @silent-cipher. I think that what you are saying doesn't quite apply because this calculator is looking at the proof fee itself, not total gas spent on maintaining a proofset. The proof fee introspects on the gas it takes to run most of the way through a provePossession message and then discounts from the fee if the total base fee burn is too high.
This calculator is limited in that its missing observability on gas data for adding roots and the fixed cost of nextProvingPeriod and the base fee burn from provePossession. But that's a bigger issue for another day.
There was a problem hiding this comment.
Actually I'm glad you brought this up because the "gas fee per day column is misleading" as is
There was a problem hiding this comment.
Ok I see what we're doing with log_10 now, this is taking the logarithmic scaling of gas with roots. I guess this is good enough for a rough calculator.
There was a problem hiding this comment.
I think we actually should do part of what @silent-cipher is suggesting. We need to provePossession single gas fee separate like this for calculating the pdp proof fee. However we should also add a fixed cost of 55M gas for every proof message.
There was a problem hiding this comment.
The other thing that's a bit misleading is that all of the data in the gasUnits table is actually for messages with 5 proofs. I guess we can say proofMessage or proofCall throughout to make that a bit clearer?
| <td className="p-2 border-b text-xs text-gray-800"> | ||
| {proofCount === 1 && dayCount === 1 | ||
| ? "Daily PDP proof fee (FIL)" | ||
| : `PDP proof fee per day (FIL, for ${proofCount} proof${proofCount > 1 ? 's' : ''} per ${dayCount} day${dayCount > 1 ? 's' : ''})`} |
There was a problem hiding this comment.
The default of 1 proof per 7 days should be 5 proofs per 1 day since that is the default in practice.
There was a problem hiding this comment.
Scratch that -- now that I know that "1 proof" really means 1 message with 5 proofs this default should be 1 proof per 1 day.
|
A few small details to make the calculator more accurate and user friendly. The website change looks good -- deployed it to testing setup here: http://explore-pdp.xyz:5173/gas-calculator |
source https://github.com/lucaniz/pdp-gas-calculator by @ lucaniz
Changes from the source:
See a preview here
