-
Notifications
You must be signed in to change notification settings - Fork 115
chore(l2): update stable RISC0 patches #5102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables p256 elliptic curve support in the risc0 guest program by activating the previously commented-out p256 patch and updating it to a newer risczero version. The change moves p256 from the "unstable" category to production-ready status.
- Enables p256 elliptic curve cryptography for risc0 zkVM programs
- Updates p256 patch from risczero.0 to risczero.1 version
- Includes required transitive dependencies (risc0-bigint2, bytemuck)
Reviewed Changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/l2/prover/src/guest_program/src/risc0/Cargo.toml | Uncommented and updated p256 patch to risczero.1, formatted ethrex-common features |
| crates/l2/prover/src/guest_program/src/risc0/Cargo.lock | Updated p256 and primeorder dependencies to use git sources with new risc0-bigint2 dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| [patch.crates-io] | ||
| sha2 = { git = "https://github.com/risc0/RustCrypto-hashes", tag = "sha2-v0.10.8-risczero.0" } | ||
| k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.4-risczero.0" } |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The p256 dependency is being moved from the 'unstable' comment section to active patches, but there's no comment explaining why it's now safe for production. Consider adding a comment documenting the change from unstable to stable status, especially since line 41-42 warns that unstable features are 'not suited for production environments.'
| k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.4-risczero.0" } | |
| k256 = { git = "https://github.com/risc0/RustCrypto-elliptic-curves", tag = "k256/v0.13.4-risczero.0" } | |
| # The p256 patch was previously considered unstable and commented out below. | |
| # It is now considered stable and safe for production use, as the required changes | |
| # have been reviewed and tested. See PR/issue tracker for details. |
| # These precompiles require the "unstable" risc0 feature which is not suited | ||
| # for production environments. | ||
| # tiny-keccak = { git = "https://github.com/risc0/tiny-keccak", tag = "tiny-keccak/v2.0.2-risczero.0" } | ||
| # blst = { git = "https://github.com/risc0/blst", tag = "blst/v0.3.14-risczero.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this one deleted but not added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we don't use it anywhere in ethrex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR description.
Motivation
RISC0's
p256patch is not unstable anymore andk256patch has a new version.Description
p256patch in RISC0's guest.k256patch version.blstcommented patch because we don't use it anywhere in ethrex.