-
Notifications
You must be signed in to change notification settings - Fork 828
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
Fix: Base Fee Off By One #2015
Fix: Base Fee Off By One #2015
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2015 +/- ##
==========================================
+ Coverage 61.29% 61.49% +0.20%
==========================================
Files 263 264 +1
Lines 24521 24550 +29
==========================================
+ Hits 15030 15097 +67
+ Misses 8369 8324 -45
- Partials 1122 1129 +7
|
|
||
const testCases = [ | ||
["No truncation from max priority fee", gp, gp], | ||
["With truncation from max priority fee", gp, highgp], | ||
["With complete truncation from max priority fee", zero, highgp] | ||
]; | ||
|
||
it("Check base fee on the right block", async function () { |
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.
nice 👍
store := ctx.KVStore(k.storeKey) | ||
bz, err := baseFeePerGas.MarshalJSON() | ||
if err != nil { | ||
panic(err) |
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.
where does this panic end up getting thrown up to?
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 would get thrown in EndBlock
which would halt the chain if thrown, but technically shouldn't get thrown unless something has gone really wrong.
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.
nice testing
Describe your changes and provide context
This PR fixes the issue where the block base fee was the base fee after the execution of the current block's txs, but it should be the base fee before the block's execution. A separate
PrevBlockBaseFeePerGasPrefix
is introduced to store the previous block's base fee per gas to store on the current block.Having base fee on the wrong block impacted tracing. Tracing would fail like this
Testing performed to validate your change
integration test + tested upgrade.