feat: eth_baseFee#795
Conversation
Assisted-by: Claude:claude-sonnet-4-6
| @@ -0,0 +1,3 @@ | |||
| // gets the current base fee in wei | |||
| >> {"jsonrpc":"2.0","id":1,"method":"eth_baseFee"} | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Assisted-by: Claude:claude-sonnet-4-6
Assisted-by: Claude:claude-sonnet-4-6
Overview
This is documenting the
eth_baseFeemethod that is supported by some enterprise RPCs and also Erigon.I have opened PRs to add it to other execution clients I have found; let me know if I missed one.
The CI check will fail until the go-ethereum PR is merged, so this is a draft for now.
Method Behavior
The method similar to
eth_blobBaseFee.It returns the base fee of the next block.
Related PRs
Ethereum
eth_blobBaseFee,eth_baseFeeand EIP4844 support toeth_feeHistoryerigontech/erigon#11992eth_baseFee, returning next block base fee NethermindEth/nethermind#11522Optimism
Polygon
BSC
Cosmos
Filecoin
eth_baseFeeRPC method returning next block base fee filecoin-project/lotus#13615eth_baseFeerpc method ChainSafe/forest#7028eth_baseFeefilecoin-project/venus#6538Changes