py-evm-issue-1466: Added test cases for EIP170
What was wrong?
Check issue-1466 for reference
Double checking this is the intended functionality.
EIP170 states that the contract size limit was changed to
2**14 + 2**13which is 24,576 bytes. The following line implementations the constant for EIP170, but it is off by one.https://github.com/ethereum/py-evm/blob/0ff7bc0f820250d7f15e804bc09870776ea34eb5/eth/vm/forks/spurious_dragon/constants.py#L13
How was it fixed?
- Change
EIP170_CODE_SIZE_LIMITfrom24577to24576 - Add test cases
Cute Animal Picture
:pig2::pig2::pig2::pig2::pig2::pig2::pig2::pig2:
Before we merge this, I'd like to understand why this wasn't caught using consensus tests because this seems like the type of thing that 1) I would be surprised if it wasn't in the tests and 2) if it isn't in the tests it should be added upstream
@pipermerriam the newly added test file is in directory tests/core/vm/.
Should I move it to tests/core/consensus/?
No, I'm referring to these tests: https://github.com/ethereum/tests/
They exist as a submodule in the repository.
Hi @pipermerriam I see a commit which added test cases in fixtures submodules. https://github.com/ethereum/py-evm/pull/1998/files
Should I move newly added .json to the submodule as well? tests/core/vm/fixtures/spurious_dragon_computation_test_code_size_limitation.json