-
Notifications
You must be signed in to change notification settings - Fork 760
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
client/vm: fix block builder london transition #3039
Conversation
@@ -85,7 +85,11 @@ export class BlockBuilder { | |||
this.vm.common.isActivatedEIP(1559) === true && | |||
typeof this.headerData.baseFeePerGas === 'undefined' | |||
) { | |||
this.headerData.baseFeePerGas = opts.parentBlock.header.calcNextBaseFee() | |||
if (this.headerData.number === vm.common.hardforkBlock(Hardfork.London)) { | |||
this.headerData.baseFeePerGas = vm.common.param('gasConfig', 'initialBaseFee') |
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 could also be moved back into client, but I think the place for this change is better here?
Note: it doesn't seem that we have access to the parent block in this scope, so cannot check parent gas limit here... (?)
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.
opts.parentBlock
could be available here
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.
added a commit to address this
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. |
I've confirmed the specified test above passes so this LGTM. That said, why does that test not appear in the official hive test results? I spent a while looking for it in the results but I don't see it listed in the most recent |
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 penging @acolytec3 retest because of commit addition
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
EDIT: oh wait, nvm, this is not about cancun |
This fixes the construction of the initial London block. We take the gasLimit from the previous block (this is incorrect in London and should be (approx.) twice the gasLimit of the previous pre-London block at the initial London block) and also do not set the initial base fee correctly.
Found in: ethereum/execution-apis#398
To run:
./hive --client ethereumjs --sim ethereum/engine --sim.limit "engine-withdrawals/Pre-Merge Fork Number" --docker.output