@@ -90,6 +90,34 @@ def test_valid(state_test: StateTestFiller, pre: Alloc, post: dict, tx: Transact
90
90
Spec .H0 + Spec .R0 + Spec .S0 + Spec .X0 + Y (Spec .Y0 .value + 1 ),
91
91
id = "point_not_on_curve_y" ,
92
92
),
93
+ pytest .param (
94
+ Spec .H0 + Spec .R0 + Spec .S0 + Spec .Y0 + Spec .X0 ,
95
+ id = "x_and_y_reversed" ,
96
+ ),
97
+ pytest .param (
98
+ Spec .H0 + Spec .R0 + Spec .S0 + Spec .X0 + Y (Spec .P + 1 ),
99
+ id = "y_greater_than_p" ,
100
+ ),
101
+ pytest .param (
102
+ Spec .H0 + Spec .R0 + Spec .S0 + X (Spec .P + 1 ) + Spec .Y0 ,
103
+ id = "x_greater_than_p" ,
104
+ ),
105
+ pytest .param (
106
+ Spec .H0
107
+ + R (0x813EF79CCEFA9A56F7BA805F0E478584FE5F0DD5F567BC09B5123CCBC9832365 )
108
+ + S (0x900E75AD233FCC908509DBFF5922647DB37C21F4AFD3203AE8DC4AE7794B0F87 )
109
+ + X (0xB838FF44E5BC177BF21189D0766082FC9D843226887FC9760371100B7EE20A6F )
110
+ + Y (0xF0C9D75BFBA7B31A6BCA1974496EEB56DE357071955D83C4B1BADAA0B21832E9 ),
111
+ id = "valid_secp256k1_inputs" ,
112
+ ),
113
+ pytest .param (
114
+ H (0x235060CAFE19A407880C272BC3E73600E3A12294F56143ED61929C2FF4525ABB )
115
+ + R (0x182E5CBDF96ACCB859E8EEA1850DE5FF6E430A19D1D9A680ECD5946BBEA8A32B )
116
+ + S (0x76DDFAE6797FA6777CAAB9FA10E75F52E70A4E6CEB117B3C5B2F445D850BD64C )
117
+ + X (0x3828736CDFC4C8696008F71999260329AD8B12287846FEDCEDE3BA1205B12729 )
118
+ + Y (0x3E5141734E971A8D55015068D9B3666760F4608A49B11F92E500ACEA647978C7 ),
119
+ id = "wrong_endianness" ,
120
+ ),
93
121
],
94
122
)
95
123
@pytest .mark .parametrize ("expected_output" , [Spec .INVALID_RETURN_VALUE ], ids = ["" ])
@@ -98,6 +126,7 @@ def test_valid(state_test: StateTestFiller, pre: Alloc, post: dict, tx: Transact
98
126
@pytest .mark .eip_checklist ("precompile/test/inputs/invalid" )
99
127
@pytest .mark .eip_checklist ("precompile/test/inputs/invalid/crypto" )
100
128
@pytest .mark .eip_checklist ("precompile/test/inputs/invalid/corrupted" )
129
+ @pytest .mark .eip_checklist ("precompile/test/input_lengths/zero" )
101
130
@pytest .mark .eip_checklist ("precompile/test/input_lengths/static/correct" )
102
131
@pytest .mark .eip_checklist ("precompile/test/input_lengths/static/too_short" )
103
132
@pytest .mark .eip_checklist ("precompile/test/input_lengths/static/too_long" )
@@ -123,6 +152,20 @@ def test_invalid(state_test: StateTestFiller, pre: Alloc, post: dict, tx: Transa
123
152
False ,
124
153
id = "insufficient_gas" ,
125
154
),
155
+ pytest .param (
156
+ Spec .H0 + Spec .R0 + Spec .S0 + Spec .X0 + Spec .Y0 ,
157
+ Spec .INVALID_RETURN_VALUE ,
158
+ - 6900 ,
159
+ False ,
160
+ id = "zero_gas" ,
161
+ ),
162
+ pytest .param (
163
+ Spec .H0 + Spec .R0 + Spec .S0 + Spec .X0 + Spec .Y0 ,
164
+ Spec .INVALID_RETURN_VALUE ,
165
+ - 3450 ,
166
+ False ,
167
+ id = "3450_gas" ,
168
+ ),
126
169
],
127
170
)
128
171
@pytest .mark .parametrize ("precompile_address" , [Spec .P256VERIFY ], ids = ["" ])
0 commit comments