-
Notifications
You must be signed in to change notification settings - Fork 168
BM-1730: Integrate Blake3 Groth16 compression type #1234
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
|
🚀 Documentation Preview Deployment URL: https://boundless-documentation-fp8k4gect-boundless-network.vercel.app Updated at: 2025-11-25 16:05:08 UTC |
| bincode = "1.3.3" | ||
| bonsai-sdk = { version = "1.4.1", features = ["non_blocking"] } | ||
| blake3_groth16 = { path = "../blake3_groth16", default-features = false } | ||
| bonsai-sdk = { git = "https://github.com/risc0/risc0", branch = "flaub/shrink-bitvm2", features = [ |
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.
Is there something we require or can we just use the latest bonsai-sdk release?
| true => Some((SelectorExt::FakeReceipt as u32).into()), | ||
| false => Some((SelectorExt::blake3_groth16_latest() as u32).into()), | ||
| }; | ||
| // TODO(ec2): should we automatically set the predicate type to claim digest match here? |
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.
That is a good idea
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.
I've implemented that at the requirements later
crates/test-utils/src/verifier.rs
Outdated
| let mut bn254_control_id = BN254_IDENTITY_CONTROL_ID; | ||
| bn254_control_id.as_mut_bytes().reverse(); | ||
| let verifier_parameters_digest = Digest::from_hex( | ||
| "62f049f606e804744f1fac2485677bf7905c82a8174a55a1555532b0fc5b2ab3", // TODO(ec2): fixme |
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.
Just noticing the comment to be fixed here
Exposes `seal_to_json` for groth16 for #1234
Co-authored-by: Angelo Capossele <[email protected]>
a7eb0aa to
008b3f7
Compare
Allows for requesting and proving of Blake3 Groth16.
Under the current Groth16 compression, there are 5 public outputs which when SHA2 hashed gives the claim digest.
This new compression type introduces a new claim digest, which is the BLAKE3 hash instead.
This new claim_digest cannot be calculated on-chain, which means that proof requests for this BLAKE3 hash cannot be fulfilled with (image_id, journal). What this means is requests with Blake3 compression need to use the ClaimDigestMatch predicate.
NOTE: This compression only works for guest programs what have journal size of 32 bytes.
Example of usage here: https://github.com/ec2/boundless_blake3_example
This project currently forks 2 repos:
risc0: https://github.com/boundless-xyz/risc0/tree/ec2/v3.0.3-backport-3370
risc0-ethereum: https://github.com/ec2/risc0-ethereum/tree/ec2/bitvm2-release-3.0.1
TODO:
[] Clean up changes made to risc0-ethereum
[x] Rename shrink_bitvm2 -> blake3 groth16 everywhere