eth-tester icon indicating copy to clipboard operation
eth-tester copied to clipboard

eth_fee_history works incorrectly

Open Nov1kov opened this issue 1 year ago • 0 comments

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 https://github.com/ethereum/eth-tester/blob/3c76d34beb3ade64ec4569462b36351bdb9a0821/eth_tester/backends/pyevm/main.py#L608

eth-tester Version

0.10.0b1

Python Version

3.10

Operating System

win

Output from pip freeze

No response

Nov1kov avatar Jan 18 '24 20:01 Nov1kov