Negative mainnet test for the P256VERIFY precompile.
The signature actually is a valid secp256k1 signature,
so this is an interesting test case.
Source code in tests/osaka/eip7951_p256verify_precompiles/test_eip_mainnet.py
| @pytest.mark.parametrize(
"expected_output", [Spec.INVALID_RETURN_VALUE], ids=[""]
)
@pytest.mark.parametrize(
"input_data",
[
pytest.param(
H( # 'hello world' k1 signed (with eth prefix) with private key 0xd946578401d1980aba1fc85df2a1ddc0d2d618aadd37b213f7f7f91a553b1499 # noqa: E501
0xD9EBA16ED0ECAE432B71FE008C98CC872BB4CC214D3220A36F365326CF807D68
)
+ R(
0x69CCCD84CA870C08D49D596342F464017F2A05B0BE539682EAA7529E4BE2DE36
)
+ S(
0x2CDB85FE13CB7DE39C1C7385BE9F38E8BDE9963CCBECD96281C4DF3ACA38F537
)
+ X(
0x82AE98A95AE76E389354F0EC660CF071309EA2D2CB14ADB6543106B790BE27FD
)
+ Y(
0x77B2CDC82C3AA8F2CF21E6257C197D75F84DCD0BC2FF8875C3E245C0E0874751
),
id="invalid_r1_sig_but_valid_k1_sig",
),
],
)
@pytest.mark.parametrize("precompile_address", [Spec.P256VERIFY], ids=[""])
def test_invalid(
state_test: StateTestFiller, pre: Alloc, post: dict, tx: Transaction
) -> None:
"""
Negative mainnet test for the P256VERIFY precompile.
The signature actually is a valid secp256k1 signature,
so this is an interesting test case.
"""
state_test(pre=pre, post=post, tx=tx)
|