Skip to content

Commit a001e87

Browse files
authored
feat(tests): add test case for P256 with r max value (#2229)
This test uses the max value for the `r` element of the `p256verify` precompile input. This is added for completeness only as there is no practical way to generate a semi-valid signature with arbitrary `r`.
1 parent 694590e commit a001e87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/osaka/eip7951_p256verify_precompiles/test_p256verify.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ def test_valid(state_test: StateTestFiller, pre: Alloc, post: dict, tx: Transact
232232
Spec.H0 + R(Spec.N) + Spec.S0 + Spec.X0 + Spec.Y0,
233233
id="r_eq_to_n",
234234
),
235+
pytest.param(
236+
Spec.H0 + R(2**256 - 1) + Spec.S0 + Spec.X0 + Spec.Y0,
237+
id="r_max",
238+
),
235239
pytest.param(
236240
Spec.H0 + Spec.R0 + S(0) + Spec.X0 + Spec.Y0,
237241
id="s_eq_to_zero",

0 commit comments

Comments
 (0)