Skip to content

Commit 66d3376

Browse files
committed
Add identity precompile ported_from markers
1 parent 35b8f1c commit 66d3376

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

tests/frontier/identity_precompile/test_identity.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,27 @@
1717
from .common import CallArgs, generate_identity_call_bytecode
1818

1919

20+
@pytest.mark.ported_from(
21+
[
22+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentitiy_0.json",
23+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentitiy_1.json",
24+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentity_1_nonzeroValue.json",
25+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentitiy_2.json",
26+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentitiy_3.json",
27+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentity_4.json",
28+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentity_4_gas17.json",
29+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentity_4_gas18.json",
30+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_0.json",
31+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_1.json",
32+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_1_nonzeroValue.json",
33+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_2.json",
34+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_3.json",
35+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_4.json",
36+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_4_gas17.json",
37+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_4_gas18.json",
38+
],
39+
pr=["https://github.com/ethereum/execution-spec-tests/pull/1344"],
40+
)
2041
@pytest.mark.valid_from("Byzantium")
2142
@pytest.mark.parametrize("call_type", [Op.CALL, Op.CALLCODE])
2243
@pytest.mark.parametrize(
@@ -108,6 +129,14 @@ def test_call_identity_precompile(
108129
state_test(env=env, pre=pre, post=post, tx=tx)
109130

110131

132+
@pytest.mark.ported_from(
133+
[
134+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CALLCODEIdentitiy_5.json",
135+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_5.json",
136+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts2/CallIdentitiy_6.json",
137+
],
138+
pr=["https://github.com/ethereum/execution-spec-tests/pull/1344"],
139+
)
111140
@pytest.mark.valid_from("Byzantium")
112141
@pytest.mark.parametrize("call_type", [Op.CALL, Op.CALLCODE])
113142
@pytest.mark.parametrize(

tests/frontier/identity_precompile/test_identity_returndatasize.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
from tests.frontier.identity_precompile.common import Constants
1515

1616

17+
@pytest.mark.ported_from(
18+
[
19+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts/identity_to_bigger.json",
20+
"https://github.com/ethereum/tests/blob/v17.1/GeneralStateTests/stPreCompiledContracts/identity_to_smaller.json",
21+
],
22+
pr=["https://github.com/ethereum/execution-spec-tests/pull/1344"],
23+
)
1724
@pytest.mark.valid_from("Byzantium")
1825
@pytest.mark.parametrize(
1926
["args_size", "output_size", "expected_returndatasize"],

0 commit comments

Comments
 (0)