Skip to content

Commit

Permalink
Update ethereum/tests to v13.1; Merge -> Paris
Browse files Browse the repository at this point in the history
- *ethereum/tests* now correctly labels paris fork tests with "Paris" and not "Merge".
  • Loading branch information
fselmo committed Mar 9, 2024
1 parent 906ee7d commit b4e8a69
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 39 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ jobs:
- image: cimg/python:3.11
environment:
TOXENV: py311-native-blockchain-london
py311-native-blockchain-merge:
py311-native-blockchain-paris:
<<: *common
docker:
- image: cimg/python:3.11
environment:
TOXENV: py311-native-blockchain-merge
TOXENV: py311-native-blockchain-paris
py311-native-blockchain-petersburg:
<<: *common
docker:
Expand Down Expand Up @@ -375,7 +375,7 @@ workflows:
- py311-native-blockchain-homestead
- py311-native-blockchain-istanbul
- py311-native-blockchain-london
- py311-native-blockchain-merge
- py311-native-blockchain-paris
- py311-native-blockchain-petersburg
- py311-native-blockchain-shanghai
- py311-native-blockchain-spurious_dragon
Expand Down
6 changes: 3 additions & 3 deletions eth/tools/fixtures/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def chain_vm_configuration(
return ((0, BerlinVM),)
elif network == "London":
return ((0, LondonVM),)
elif network == "Merge":
elif network == "Paris":
return ((0, ParisVM),)
elif network == "Shanghai":
return ((0, ShanghaiVM),)
Expand Down Expand Up @@ -163,7 +163,7 @@ def chain_vm_configuration(
(0, BerlinVM),
(5, LondonVM),
)
elif network == "ArrowGlacierToMergeAtDiffC0000":
elif network == "ArrowGlacierToParisAtDiffC0000":
# Transition expected at 6 for all tests written thus far
return (
# These tests were written before Gray Glacier was a thing. Use
Expand All @@ -172,7 +172,7 @@ def chain_vm_configuration(
(0, GrayGlacierVM),
(6, ParisVM),
)
elif network == "MergeToShanghaiAtTime15k":
elif network == "ParisToShanghaiAtTime15k":
# Transition expected at 5 (timestamp==15000) for all tests written thus far
return (
(0, ParisVM),
Expand Down
2 changes: 1 addition & 1 deletion fixtures
79 changes: 51 additions & 28 deletions tests/json-fixtures/blockchain/test_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,21 +825,14 @@
"GeneralStateTests/VMTests/vmPerformance/loopExp.json",
"loopExp_d14g0v0_Shanghai",
),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d0g0v0_Istanbul"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d1g0v0_Istanbul"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d2g0v0_Istanbul"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d0g0v0_Berlin"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d1g0v0_Berlin"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d2g0v0_Berlin"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d0g0v0_London"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d1g0v0_London"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d2g0v0_London"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d0g0v0_Merge"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d0g0v0_Shanghai"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d1g0v0_Merge"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d1g0v0_Shanghai"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d2g0v0_Merge"),
("GeneralStateTests/VMTests/vmPerformance/loopMul.json", "loopMul_d2g0v0_Shanghai"),
*(
(
"GeneralStateTests/VMTests/vmPerformance/loopMul.json",
f"loopMul_d{i}g0v0_{fork}",
)
for i in range(3)
for fork in ["Istanbul", "Berlin", "London", "Paris", "Shanghai"]
),
(
"InvalidBlocks/bcForgedTest/bcForkBlockTest.json",
"BlockWrongResetGas",
Expand Down Expand Up @@ -903,7 +896,7 @@
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_Istanbul"),
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_Berlin"),
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_London"),
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_Paris"),
("ValidBlocks/VMTests/vmPerformance/loop-add-10M.json", "loop-add-10M_Shanghai"),
(
"ValidBlocks/VMTests/vmPerformance/loop-divadd-10M.json",
Expand All @@ -917,7 +910,7 @@
"ValidBlocks/VMTests/vmPerformance/loop-divadd-10M.json",
"loop-divadd-10M_London",
),
("ValidBlocks/VMTests/vmPerformance/loop-divadd-10M.json", "loop-divadd-10M_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-divadd-10M.json", "loop-divadd-10M_Paris"),
(
"ValidBlocks/VMTests/vmPerformance/loop-divadd-10M.json",
"loop-divadd-10M_Shanghai",
Expand All @@ -936,7 +929,7 @@
),
(
"ValidBlocks/VMTests/vmPerformance/loop-divadd-unr100-10M.json",
"loop-divadd-unr100-10M_Merge",
"loop-divadd-unr100-10M_Paris",
),
(
"ValidBlocks/VMTests/vmPerformance/loop-divadd-unr100-10M.json",
Expand All @@ -956,7 +949,7 @@
),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-16b-100k.json",
"loop-exp-16b-100k_Merge",
"loop-exp-16b-100k_Paris",
),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-16b-100k.json",
Expand All @@ -968,7 +961,7 @@
),
("ValidBlocks/VMTests/vmPerformance/loop-exp-1b-1M.json", "loop-exp-1b-1M_Berlin"),
("ValidBlocks/VMTests/vmPerformance/loop-exp-1b-1M.json", "loop-exp-1b-1M_London"),
("ValidBlocks/VMTests/vmPerformance/loop-exp-1b-1M.json", "loop-exp-1b-1M_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-exp-1b-1M.json", "loop-exp-1b-1M_Paris"),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-1b-1M.json",
"loop-exp-1b-1M_Shanghai",
Expand All @@ -987,7 +980,7 @@
),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-32b-100k.json",
"loop-exp-32b-100k_Merge",
"loop-exp-32b-100k_Paris",
),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-32b-100k.json",
Expand All @@ -1005,23 +998,23 @@
"ValidBlocks/VMTests/vmPerformance/loop-exp-nop-1M.json",
"loop-exp-nop-1M_London",
),
("ValidBlocks/VMTests/vmPerformance/loop-exp-nop-1M.json", "loop-exp-nop-1M_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-exp-nop-1M.json", "loop-exp-nop-1M_Paris"),
(
"ValidBlocks/VMTests/vmPerformance/loop-exp-nop-1M.json",
"loop-exp-nop-1M_Shanghai",
),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_Istanbul"),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_Berlin"),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_London"),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_Paris"),
("ValidBlocks/VMTests/vmPerformance/loop-mul.json", "loop-mul_Shanghai"),
(
"ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json",
"loop-mulmod-2M_Istanbul",
),
("ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json", "loop-mulmod-2M_Berlin"),
("ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json", "loop-mulmod-2M_London"),
("ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json", "loop-mulmod-2M_Merge"),
("ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json", "loop-mulmod-2M_Paris"),
(
"ValidBlocks/VMTests/vmPerformance/loop-mulmod-2M.json",
"loop-mulmod-2M_Shanghai",
Expand Down Expand Up @@ -1065,12 +1058,19 @@
),
(
"GeneralStateTests/stRevertTest/RevertInCreateInInit.json",
"RevertInCreateInInit_d0g0v0_Merge",
"RevertInCreateInInit_d0g0v0_Paris",
),
(
"GeneralStateTests/stRevertTest/RevertInCreateInInit.json",
"RevertInCreateInInit_d0g0v0_Shanghai",
),
*(
(
"GeneralStateTests/stRevertTest/RevertInCreateInInit_Paris.json",
f"RevertInCreateInInit_Paris_d0g0v0_{fork}",
)
for fork in ["Istanbul", "Berlin", "London", "Paris", "Shanghai"]
),
# The CREATE2 variant seems to have been derived from the one above - it, too,
# has a "synthetic" state, on which py-evm flips.
# * https://github.com/ethereum/py-evm/pull/1181#issuecomment-446330609
Expand All @@ -1096,12 +1096,19 @@
),
(
"GeneralStateTests/stCreate2/RevertInCreateInInitCreate2.json",
"RevertInCreateInInitCreate2_d0g0v0_Merge",
"RevertInCreateInInitCreate2_d0g0v0_Paris",
),
(
"GeneralStateTests/stCreate2/RevertInCreateInInitCreate2.json",
"RevertInCreateInInitCreate2_d0g0v0_Shanghai",
),
*(
(
"GeneralStateTests/stCreate2/RevertInCreateInInitCreate2Paris.json",
f"RevertInCreateInInitCreate2Paris_d0g0v0_{fork}",
)
for fork in ["Istanbul", "Berlin", "London", "Paris", "Shanghai"]
),
# Four variants have been specifically added to test a collision type
# like the above; therefore, they fail in the same manner.
# * https://github.com/ethereum/py-evm/pull/1579#issuecomment-446591118
Expand Down Expand Up @@ -1141,16 +1148,32 @@
f"InitCollision_d{i}g0v0_{fork}",
)
for i in range(4)
for fork in ["Istanbul", "Berlin", "London", "Merge", "Shanghai"]
for fork in ["Istanbul", "Berlin", "London", "Paris", "Shanghai"]
),
# TODO: Investigate if these are still unaddressed and supposed to be off or not
*(
(
"GeneralStateTests/stSStoreTest/InitCollisionParis.json",
f"InitCollisionParis_d{i}g0v0_{fork}",
)
for i in range(4)
for fork in ["Istanbul", "Berlin", "London", "Paris", "Shanghai"]
),
}


def blockchain_fixture_mark_fn(fixture_path, fixture_name, fixture_fork):
fixture_id = (fixture_path, fixture_name)

# -- failures unaccounted for -- #
if ("ExpectedOutput_call_return_code_0x01-returned_data_0x0001") in fixture_name:
# TODO: look into newly failing modexp tests in v13.1
return pytest.mark.skip("New modexp tests that fail since v13.1")
elif ("ExpectedOutput_call_return_code_0x01-returned_data_0x01") in fixture_name:
return pytest.mark.skip("New modexp tests that fail since v13.1")

# -- expected skips and failures -- #
if "bcExploitTest/" in fixture_path:
elif "bcExploitTest/" in fixture_path:
return pytest.mark.skip("Exploit tests are slow")
elif fixture_path.startswith("bcForkStressTest/ForkStressTest.json"):
return pytest.mark.skip("Fork stress tests are slow.")
Expand Down
3 changes: 1 addition & 2 deletions tests/json-fixtures/test_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ def fixture_transaction_class(fixture_data):
return LondonTransactionBuilder
elif fork_name == ForkName.Metropolis:
pytest.skip("Metropolis Transaction class has not been implemented")
elif fork_name == "Merge":
# EL fork name is Paris, `ethereum/tests` calls the Network "Merge"
elif fork_name == ForkName.Paris:
return ParisTransactionBuilder
elif fork_name == ForkName.Shanghai:
return ShanghaiTransactionBuilder
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ envlist=
py311-native-blockchain-{ \
metropolis, transition, frontier, homestead, tangerine_whistle, \
spurious_dragon, byzantium, constantinople, petersburg, istanbul, \
berlin, london, merge, shanghai \
berlin, london, paris, shanghai \
}

[flake8]
Expand Down Expand Up @@ -41,7 +41,7 @@ commands=
native-blockchain-istanbul: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Istanbul}
native-blockchain-berlin: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Berlin}
native-blockchain-london: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork London}
native-blockchain-merge: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Merge}
native-blockchain-paris: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Paris}
native-blockchain-shanghai: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Shanghai}
basepython =
docs: python
Expand Down

0 comments on commit b4e8a69

Please sign in to comment.