Skip to content

feat: eth_baseFee#795

Open
wjmelements wants to merge 3 commits into
ethereum:mainfrom
wjmelements:eth-base-fee
Open

feat: eth_baseFee#795
wjmelements wants to merge 3 commits into
ethereum:mainfrom
wjmelements:eth-base-fee

Conversation

@wjmelements
Copy link
Copy Markdown

@wjmelements wjmelements commented May 9, 2026

Assisted-by: Claude:claude-sonnet-4-6
Comment thread tools/go.mod Outdated
Comment thread tools/go.sum
@@ -0,0 +1,3 @@
// gets the current base fee in wei
>> {"jsonrpc":"2.0","id":1,"method":"eth_baseFee"}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a pre-london testcase

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. eth_blobBaseFee doesn't have similar coverage; however I agree that this is a good idea.

So, I need to come up with a way to test across different block numbers. My best idea was debug_setHead, but then speccheck fails because debug_setHead is not specified.

If we can agree on a good approach for testing this, I'll also do it for eth_blobBaseFee.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a good approach. But I will not block this PR on its implementation. It is requires some refactoring.

Just to spell it out for future reference: we need to generate a pre-london chain via hivechain (in mkchain.sh) and have tools/testgen be configured to spin up a second node instance with that chain. It would mean also that rpc-compat suite which is currently built around a single chain needs to be refactored to run tests selectively against few chains.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the consensus on pre-london right now? return nil or 0? I'd like to merge the geth PR. This is the only open question.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got consensus with the nethermind team to return nil in that case, matching geth's eth_blobBaseFee. I also updated their eth_blobBaseFee to return nil; it previously returned 0.

@wjmelements wjmelements marked this pull request as ready for review May 19, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants