ethereum / tests

Common tests for all Ethereum implementations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

expect section update

winsvega opened this issue · comments

I found a couple of tests that were checking poststate and found what could be an issue with post state verification
When expect section is checking poststate lets say

Expect
{
  "0x00" : "0x00"
}
vs
PostState
{
  "0x01" : "0x01"
}

The verification reported true, because post state has 1 element and expect section is checking 1 element. but that record 0x00 is checked to be 0 which is always true for undefined records. therefor poststate record 0x01 was not checked.
So now it is required to check all the post state records, and this bug is fixed.
But I found 1 test using this bug as a feature and to fix that test I introduce new option:

        cccccccccccccccccccccccccccccccccccccccc: 
          storage:
            0: 0   # RETURNDATASIZE
            1: 'ANY'

if you don't want to check some post section field or you store different values there for many different test vectors you can explicitly disable the verification of a value by putting there string 'ANY'

Need the docs update

also to the docs new retesteth command

rt test_withdrawals.py::test_large_amount   --clients pyt8n --filltests --verbosity PYSPEC

allows to select subtests from inside .py files