Added smoke tests for dynamic fee monitoring#2069
Conversation
| const expectedBaseFeePerGasInWei = | ||
| (nextFeeMultiplier.toBigInt() * WEIGHT_FEE * WEIGHT_PER_GAS * supplyFactor) / | ||
| ethers.utils.parseEther("1").toBigInt(); |
There was a problem hiding this comment.
This is the lossy part of the equation, as expected. What could be useful is to show that the loss (the truncation) here is always less than some amount.
There was a problem hiding this comment.
...or maybe not, that might just look very redundant...
There was a problem hiding this comment.
Have added a new test which checks that fee charged = gas used * weight_to_gas const.
I think this isn't what you were exactly asking for, but by inference we have enough coverage of the individual components that fee->gas has been derisked for it to be low concern.
notlesh
left a comment
There was a problem hiding this comment.
LGTM. I'd still like to see a precision test where we take block's extrinsics -> exact fee and compare to on-chain, but we can rethink that later. I also think it's useful to intentionally not care about that and focus on the direction of change (as done here).
What does it do?
Adds new smoke test suite for dynamic-fees added in #1765
What important points reviewers should know?
Run with:
What value does it bring to the blockchain users?
On-going monitoring of baseFee calculation to make sure users are being fairly charged as expected.