-
Notifications
You must be signed in to change notification settings - Fork 346
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...or maybe not, that might just look very redundant...
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.
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.
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.
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.