-
Notifications
You must be signed in to change notification settings - Fork 105
fix: align eth_feeHistory with geth #246
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
Conversation
resolve EarliestBlockNumber from 0 to -5 for more info, ethereum/go-ethereum@bc36f2d
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.
Hey, thanks for the contribution! One small fix on my end - using block 0 will yield the latest block, and not the earliest block, as it's coded right now. Let's fix the code for that and add a test case for the correct behaviour. Rest lgtm!
|
|
||
| switch lastBlock { | ||
| case rpc.EarliestBlockNumber: | ||
| blockEnd = 0 |
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.
Earliest should be 1 here. If we use 0, then line 242's call to TendermintBlockByNumber will return the latest block:
Lines 164 to 168 in e6fe094
| if height <= 0 { | |
| // fetch the latest block number from the app state, more accurate than the tendermint block store state. | |
| n, err := b.BlockNumber() | |
| if err != nil { | |
| return nil, 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.
Height in TendermintBlockByNumber returns 1 on 0 to handle earliest block case
| }, | ||
| }, | ||
| } | ||
|
|
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.
Let's add a testcase for earliest block time (0).
* fix: align eth_feeHistory with geth resolve EarliestBlockNumber from 0 to -5 for more info, ethereum/go-ethereum@bc36f2d * cleanup * Apply suggestions from code review --------- Co-authored-by: Alex | Interchain Labs <[email protected]>
Description
earliest/latestblock tag handlingblockCountashexOrDecimal64for EIP-1559 compatibility that breaks contract deploy in FoundrybaseFeePerGasarray length calculationsoldestBlockreturn value (-1 discrepancy) with go-ethereumCloses: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
mainbranchReviewers Checklist
All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.
I have...
Unreleasedsection inCHANGELOG.md