Skip to content

Gas cost disaccords between ethereumjs/evm and py-evm/geth #3237

Answered by jochem-brouwer
Alleysira asked this question in Q&A

You must be logged in to vote

Ok I think I am sure what causes this. It is this: https://eips.ethereum.org/EIPS/eip-3651

In our EVM we do not know what the coinbase of the block is, therefore it is not warm. However, I just checked PyEVMs code and they set coinbase to the zero address https://github.com/ethereum/py-evm/blob/b5c9fd9651505d1714b5f8a2466633541da81bb0/eth/_utils/headers.py#L63-L64. This is exactly the address you call into at line 931. Therfore, in PyEVM (and I also suspect Geth) this address is warm. However, in EthJS EVM it is cold. As mentioned before this would account for the 2500 gas difference.

In order to test if this is true, you can do two things:

  1. Test if the output is correct in case you use a…

Replies: 12 comments 1 reply

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Answer selected by Alleysira

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@Alleysira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #3236 on January 17, 2024 16:58.