Skip to content

Conversation

@LouisTsai-Csie
Copy link
Collaborator

@LouisTsai-Csie LouisTsai-Csie commented Jun 20, 2025

What was wrong?

Related to Issue #1244.

The previous PR #1249 could be closed, since it based on the devnets/osaka/0.

How was it fixed?

Implement EIP-7951

Description

Note on PR

PR ethereum/execution-spec-tests#1670 adds EEST test cases related to the secp256r1 (p256verify) precompile. Since it involves cryptographic operations, some dependencies on cryptography libraries are required.

If you want to run the tests locally, you should configure the appropriate settings in the ethereum-spec-evm-resolver repository to support the secp256r1 curve.

Additionally, please be aware that—per the ACD meeting on June 19 — the gas cost and return value specification for the p256verify precompile may be subject to change. Updates to the spec may affect test behavior or validity.

Cute Animal Picture

Cute Animal

@LouisTsai-Csie LouisTsai-Csie marked this pull request as draft June 20, 2025 15:53
@LouisTsai-Csie LouisTsai-Csie marked this pull request as ready for review June 20, 2025 16:21
@Carsons-Eels
Copy link
Contributor

Thanks Louis!

@gurukamath gurukamath added this to the Osaka Devnet 2 milestone Jun 25, 2025
@LouisTsai-Csie
Copy link
Collaborator Author

@gurukamath Thank you for your review, I've updated based on the comment, and run the following command for linting!

$ isort src                         # Organizes imports.
$ black src                         # Formats code.
$ flake8                            # Reports style/spelling/documentation errors.
$ mypy src                          # Verifies type annotations.

Comment on lines 114 to 116
result : `ethereum.base_types.Bytes`
return 1 if the signature is valid, empty bytes otherwise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docstring doesn't match the behaviour of the function. This always returns None?

Comment on lines 128 to 129

return
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return


try:
secp256r1_verify(r, s, public_key_x, public_key_y, message_hash)
except Exception:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catching a bare Exception here can mask a lot of problems. You should catch the specific error type that you expect to be thrown.

@SamWilsn SamWilsn force-pushed the eips/osaka/eip-7951 branch from b10d48d to 920bd52 Compare June 27, 2025 16:30
@SamWilsn SamWilsn changed the base branch from devnets/osaka/2 to forks/osaka June 27, 2025 16:30
@SamWilsn SamWilsn force-pushed the eips/osaka/eip-7951 branch from 920bd52 to 1f33b74 Compare June 27, 2025 16:31
@SamWilsn SamWilsn merged commit 54aa418 into ethereum:forks/osaka Jun 27, 2025
1 check passed
Carsons-Eels pushed a commit to Carsons-Eels/execution-specs that referenced this pull request Oct 16, 2025
…reum#1292)

* chore(docs): don't include function pages in site search index ethereum#1291

* docs: update changelog
danceratopz added a commit to danceratopz/execution-specs that referenced this pull request Oct 22, 2025
…reum#1292)

* chore(docs): don't include function pages in site search index ethereum#1291

* docs: update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants