-
Hi, I am using reth-revm crates to write a program that executes/verify an Ethereum Mainnet block. I am having an strange behaviour when executing the block 16424145 (it belongs to London fork spec) and also for other blocks. When using default Eth Mainnet specs to execute the block (using BlockExecutorProvider) I am getting a new wrong balance for address "0x0000...0000". Using RPC provider it returns that the "original" balance of this address for block 16424144 is 11528877942331271390880 and the "new" value for block 16424145 is 11528882596530224209333, but the evm execution (BlockExecutionOutput) is returning as new computed value 11530882596530224209333 and that is wrong. If I do the same execution but patching the mainnet spec to force use Shangai spec to execute the block 16424145, then I am getting the correct new balance value and that is weird. I attach an ZIP file (I don't know if it's the best way to do it) with the code that tests this scenario: That is the output when executing the program:
Could be the issue I am having is related with the problem described here: Any help on this will be appreciate. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
hm, fee recepient is Null: 0x000...000` https://etherscan.io/block/16424145 Maybe it is related to block reward that is given at the end of the block. London had PoW and end block reward while Shangai is after merge (Paris hardfork) and does not have this reward. https://github.com/ethereum/execution-specs Diff between values: |
Beta Was this translation helpful? Give feedback.
-
Hi, I have fixed the issue, the problem was the totaldifficulty parameter passed in function:
I was passing the block difficulty parameter instead of passing the totaldifficulty of the block. I have fixed this and now the fork used to process the block 16424144 is Merge (instead of London) and the balance for address "0x0000...0000" is returned correctly. |
Beta Was this translation helpful? Give feedback.
Hi, I have fixed the issue, the problem was the totaldifficulty parameter passed in function:
BlockExecutionInput::new(&block_executor, block.header.difficulty);
I was passing the block difficulty parameter instead of passing the totaldifficulty of the block. I have fixed this and now the fork used to process the block 16424144 is Merge (instead of London) and the balance for address "0x0000...0000" is returned correctly.