Skip to content

Commit 13e4f48

Browse files
committed
tests: don't skip fixtures for 'Constantinople{,fix}' + mark SLOW_TESTS and xfails.
The `xfail`s are a 1:1 copy of what's in py-evm's pinned commit; SLOW_TESTS are also very similar...
1 parent 1146f83 commit 13e4f48

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

tests/json-fixtures-over-rpc/test_rpc_fixtures.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,36 @@
105105
# at the commit currently checked out in submodule `fixtures`.
106106
# Ideally, this list should be empty.
107107
# WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION!
108+
# TODO: import from `py-evm` if possible
108109
INCORRECT_UPSTREAM_TESTS = {
109110
# The test considers a "synthetic" scenario (the state described there can't
110111
# be arrived at using regular consensus rules).
111112
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512
112113
# The result is in conflict with the yellow-paper:
113114
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369
114115
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501
116+
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Constantinople'), # noqa: E501
117+
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_ConstantinopleFix'), # noqa: E501
118+
119+
# The CREATE2 variant seems to have been derived from the one above - it, too,
120+
# has a "synthetic" state, on which py-evm flips.
121+
# * https://github.com/ethereum/py-evm/pull/1181#issuecomment-446330609
122+
('GeneralStateTests/stCreate2/RevertInCreateInInitCreate2_d0g0v0.json', 'RevertInCreateInInitCreate2_d0g0v0_Constantinople'), # noqa: E501
123+
('GeneralStateTests/stCreate2/RevertInCreateInInitCreate2_d0g0v0.json', 'RevertInCreateInInitCreate2_d0g0v0_ConstantinopleFix'), # noqa: E501
124+
125+
# Four variants have been specifically added to test a collision type
126+
# like the above; therefore, they fail in the same manner.
127+
# * https://github.com/ethereum/py-evm/pull/1579#issuecomment-446591118
128+
# Interestingly, d2 passes in Constantinople after a py-evm refactor of storage handling,
129+
# the same test is already passing in ConstantinopleFix. Since the situation is synthetic,
130+
# not much research went into why, yet.
131+
('GeneralStateTests/stSStoreTest/InitCollision_d0g0v0.json', 'InitCollision_d0g0v0_Constantinople'), # noqa: E501
132+
('GeneralStateTests/stSStoreTest/InitCollision_d1g0v0.json', 'InitCollision_d1g0v0_Constantinople'), # noqa: E501
133+
('GeneralStateTests/stSStoreTest/InitCollision_d2g0v0.json', 'InitCollision_d2g0v0_Constantinople'), # noqa: E501
134+
('GeneralStateTests/stSStoreTest/InitCollision_d3g0v0.json', 'InitCollision_d3g0v0_Constantinople'), # noqa: E501
135+
('GeneralStateTests/stSStoreTest/InitCollision_d0g0v0.json', 'InitCollision_d0g0v0_ConstantinopleFix'), # noqa: E501
136+
('GeneralStateTests/stSStoreTest/InitCollision_d1g0v0.json', 'InitCollision_d1g0v0_ConstantinopleFix'), # noqa: E501
137+
('GeneralStateTests/stSStoreTest/InitCollision_d3g0v0.json', 'InitCollision_d3g0v0_ConstantinopleFix'), # noqa: E501
115138
}
116139

117140
RPC_STATE_NORMALIZERS = {
@@ -376,8 +399,8 @@ async def validate_uncles(rpc, block_fixture, at_block):
376399
@pytest.fixture
377400
def chain_fixture(fixture_data):
378401
fixture = load_fixture(*fixture_data)
379-
if fixture['network'] == 'Constantinople':
380-
pytest.skip('Constantinople VM rules not yet supported')
402+
if fixture['network'] == 'Istanbul':
403+
pytest.skip('Istanbul VM rules not yet supported')
381404
return fixture
382405

383406

0 commit comments

Comments
 (0)