feat(eth-rpc): implement eth_baseFee, returning next block base fee#11522
feat(eth-rpc): implement eth_baseFee, returning next block base fee#11522wjmelements wants to merge 1 commit intoNethermindEth:masterfrom
eth_baseFee, returning next block base fee#11522Conversation
Assisted-by: Claude:claude-sonnet-4-6
|
@claude review |
|
Claude finished @svlachakis's task in 3m 37s —— View job PR Review:
|
| return await ctx.Test.TestEthRpc("eth_baseFee"); | ||
| } | ||
|
|
||
| public static IEnumerable<TestCaseData> GetBaseFeeTestCases |
There was a problem hiding this comment.
Low — missing null-head test case
All four test cases supply a non-empty block tree, so the if (head is null) guard in the implementation is never exercised. Consider adding:
yield return new TestCaseData(UInt256.Zero, 0L, 0L, false)
{
TestName = "Empty blockchain returns null",
ExpectedResult = NullResult
};with a corresponding ctx.Test built from an empty block tree (or simply leaving the default block tree with no explicit head). The guard is correct — this is just an untested branch.
|
This endpoint is not implemented in geth, not sure if it's worth supporting |
|
|
Please make sure it's consistent with I think it's missing fork-transition test. The most error-prone scenario is "last pre-London block N (no |
The
eth_baseFeemethod is a nonstandard eth jsonrpc method that returns the base fee of the next block.It is similar to
eth_blobBaseFee, and already implemented by erigon and some third-party RPC services.Changes
eth_baseFeeRPC methodTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Documentation
Requires documentation update
I think the docs for eth_baseFee will be auto-generated by the DocGen tool from the
[JsonRpcMethod]tagRequires explanation in Release Notes
Yes
No
Remarks
I have no prior experience with dotnet.