ethereum / tests

Common tests for all Ethereum implementations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I figure out the difference between forks?

giskook opened this issue · comments

Hi,
Is there a way or tool for me to collect the difference between forks?
for example. How can I get the differnece between "Shanghai" and "The Merge"? maybe for a same transaction they will behave differently? how can I find the affectived transactions.
Thanks inadvance.

Currently there is --statediff option that will print out what has changed in the Pre section after transaction execution (in state test) and in blockchain test you can select an intermidiate state.
But to compare the states on different forks I need to implement such an option.
What problem are you trying to solve?

you need analys on what has changed in the test from fork to fork or you need to find all tests that has changed?

you need analys on what has changed in the test from fork to fork or you need to find all tests that has changed?

I want to compare the states on different forks, so we can identify any differences or modifications that occurred from fork to fork. This information can be valuable for understanding the impact of forks on the ethereum.

would smth like
retesteth -t GeneralStateTests/stExample -- --singletest add11 --statediff Berlin--Merge
work?

pushed an option for statetests to print interfork statediff for all transactions (or selected) as in example above

retesteth -t GeneralStateTests/stExample -- --singletest rangesExample --statediff Berlin--Merge
Running test State Diff (Berlin to Merge): (GeneralStateTests/stExample/rangesExample, fork: Merge, TrInfo: d: 2, g: 2, v: 1, TrData: ` 0x01..`) 
{
    "DELETED: 0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
}

retesteth -t GeneralStateTests/stExample -- --singletest rangesExample --statediff Berlin--Merge

Hi @winsvega,
I run the command, but it complains to me with an error.
Error: ERROR(3): EIP-1559 config but missing 'currentBaseFee' in env section.
Am I missing something?

root@eth:/data/zhangkai/tests# retesteth -t GeneralStateTests/stExample -- --singletest rangesExample --statediff Berlin--Merge --testpath ./
retesteth -t GeneralStateTests/stExample -- --singletest rangesExample --statediff Berlin--Merge --testpath ./
Running tests using path: ./
Running 1 test case...
Retesteth config path: /root/.retesteth
Active client configurations: 'default '
Filter: 'rangesExample'
Running tests for config 'Ethereum GO on StateTool' 2
Test Case "stExample": (1 of 1)
100%
Finishing retesteth run
*** Total Tests Run: 0

Error: ERROR(3): EIP-1559 config but missing 'currentBaseFee' in env section
 (GeneralStateTests/stExample/rangesExample, fork: London, TrInfo: d: 0, g: 0, v: 0, TrData: `:label transaction1 0x01..`)

--------
TestOutputHelper detected 1 errors during test execution!
/data/zhangkai/retesteth/retesteth/helpers/TestOutputHelper.cpp(223): error: in "GeneralStateTests/stExample":

*** 1 failure is detected in the test module "EthereumTests"

Whats the geth commit? Is it old version?

Whats the geth commit? Is it old version?

The version is old evm version 1.10.26-stable-e5eb32ac, I will try the latest one.

With the latest evm version, It works fine :P

let me know how this works if need more options.