-
Notifications
You must be signed in to change notification settings - Fork 338
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
[BUG] Proof composition fails when env::verify() is invoked twice #1299
Comments
I wonder if this TODO is related: https://github.com/risc0/risc0/blob/main/risc0/zkvm/src/host/recursion/receipt.rs#L101 |
Ok, I've fixed this in a867e0d. The issue is that the assumptions list as tracked by the executor was in reverse order compared to how it is tracked assembled by the guest. I'll make sure to add a test that checks functionality with two or more assumptions, as this is a clear gap in coverage. (Update: test added in 85b9c43) |
This PR adds a basic example of composition. Building upon the proof of known factors, this example exponentiates a number mod a composite with known factors. This takes inspiration from RSA encryption, and is kind of a stripped down (and insecure) version of verifiable encryption such that the message is provably decrypt-able by some party. Resolves: #1299 --------- Co-authored-by: Frank Laub <flaub@risc0.com>
This PR adds a basic example of composition. Building upon the proof of known factors, this example exponentiates a number mod a composite with known factors. This takes inspiration from RSA encryption, and is kind of a stripped down (and insecure) version of verifiable encryption such that the message is provably decrypt-able by some party. Resolves: #1299 --------- Co-authored-by: Frank Laub <flaub@risc0.com>
This PR adds a basic example of composition. Building upon the proof of known factors, this example exponentiates a number mod a composite with known factors. This takes inspiration from RSA encryption, and is kind of a stripped down (and insecure) version of verifiable encryption such that the message is provably decrypt-able by some party. Resolves: #1299 --------- Co-authored-by: Frank Laub <flaub@risc0.com>
Bug Report
If the guest depends on more than 1 assumption, the prover fails with
invalid receipt format
.Steps to Reproduce
tcarstens/victor/composition-example
examples/composition
add_assumption()
andverify()
functions correctly, respectively.default_prover().prove()
:Expected behavior
Expected a receipt to be generated with no outstanding assumptions.
Your Environment
cargo-risczero 0.21.0-alpha.1
(installed from this branch usingcargo install --path risc0/cargo-risczero
)rustc 1.73.0 (cc66ad468 2023-10-03)
Linux pop-os 5.19.0-76051900-generic #202207312230~1663791054~22.04~28340d4 SMP PREEMPT_DYNAMIC Wed S x86_64 x86_64 x86_64 GNU/Linux
Additional context
This issue has also been observed in zkVM
v0.20.0-rc.1
.The text was updated successfully, but these errors were encountered: