Skip to content
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

Help Needed: Extracting Outputs from Proof in Jolt ZKVM #505

Open
aaytuncc opened this issue Nov 16, 2024 · 3 comments
Open

Help Needed: Extracting Outputs from Proof in Jolt ZKVM #505

aaytuncc opened this issue Nov 16, 2024 · 3 comments

Comments

@aaytuncc
Copy link

I am working on a system where users can generate a proof, store it locally as a binary file, and later upload it to a website I’ve created. The website validates the proof without accessing the raw data, ensuring privacy.

My goal is to extract the computed output (e.g., total distance) from the proof after validation, but I’m struggling to achieve this. While I’ve explored commitments, program inputs, and outputs, I haven’t found a way to link these to the original calculated output.

Details
Here’s the specific workflow of my system:

Users process GPS data (latitude and longitude pairs) to calculate the total distance using my application.
A zero-knowledge proof is generated and saved locally as a binary file.
The proof is later uploaded to the website for validation, where the site confirms its validity without revealing or accessing the raw GPS data.
The problem arises when I try to extract the calculated output (e.g., total distance) from the proof. While the proof confirms the computation's validity, I cannot determine how to retrieve the actual result. I suspect it might be related to how commitments or program outputs are structured in Jolt ZKVM.

Question
How can I extract the calculated output (total distance) directly from the proof? Is there a recommended approach or specific part of the documentation I should focus on? Any guidance or direction would be highly appreciated, as I feel stuck at this point.

Additional Notes
I apologize if this isn’t the right place for this question, but I couldn’t find another communication channel for Jolt ZKVM-related discussions. Please let me know if there’s a more suitable forum or resource.

Thank you in advance for your help!

@HudsonGraeme
Copy link

HudsonGraeme commented Nov 21, 2024

This may be of use; program outputs are stored using postcard. The process for unpacking the values from the proof is illustrated here: https://github.com/inference-labs-inc/omron-subnet/blob/3c25a6d4d20c5fe93864c1965b92d960d3eb3dfc/neurons/deployment_layer/model_1d60d545b7c5123fd60524dcbaf57081ca7dc4a9ec36c892927a3153328d17c0/src/main.rs#L225

@aaytuncc
Copy link
Author

Thank you very much. According to this code, I was able to decode the output as i wanted. I've one more question. Is it possible to make input private ? I went over the provable macro, but couldnt find anything related to private input. @HudsonGraeme

@HudsonGraeme
Copy link

Thank you very much. According to this code, I was able to decode the output as i wanted. I've one more question. Is it possible to make input private ? I went over the provable macro, but couldnt find anything related to private input. @HudsonGraeme

That's a good question. By the looks of it, private is not supported yet. Proof inputs are used in the memory proof during verification

preprocessing.program_io = Some(JoltDevice {

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

No branches or pull requests

2 participants