Skip to content
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

eth_fee_history works incorrectly #278

Open
Nov1kov opened this issue Jan 18, 2024 · 0 comments
Open

eth_fee_history works incorrectly #278

Nov1kov opened this issue Jan 18, 2024 · 0 comments

Comments

@Nov1kov
Copy link

Nov1kov commented Jan 18, 2024

What happened?

The fee_history implementation return

{'oldestBlock': 1, 'baseFeePerGas': [769353759], 'gasUsedRatio': [0.02452759025055744], 'reward': []}

Accordingly:

https://ethereum.github.io/execution-apis/api-documentation/

An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.

baseFeePerGas must return one more values in array.

Code that produced the error

For full unit test implementation, need to add "eth_fee_history" implementation to web3 eth-tester middleware.

Why that providers and middlewares isn't here?

Full error output

No response

Fill this section in if you know how this could or should be fixed

The logic here must be improved

base_fee_per_gas.append(ancestor.header.base_fee_per_gas)

eth-tester Version

0.10.0b1

Python Version

3.10

Operating System

win

Output from pip freeze

No response

@Nov1kov Nov1kov changed the title fee_history works incorrectly eth_fee_history works incorrectly Jan 18, 2024
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

No branches or pull requests

1 participant