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

change set_stark_proof_target's witness to WitnessWrite #1592

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

qope
Copy link
Contributor

@qope qope commented May 21, 2024

The witness used in set_stark_proof_target is sufficient with WitnessWrite. Witness (which inherits from WitnessWrite) cannot be used in cases like run_once of SimpleGenerator.

Copy link
Collaborator

@Nashtare Nashtare left a comment

Choose a reason for hiding this comment

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

Hi! Could you share a bit more context / a reproducible example of failure? SimpleGenerator implements both WitnessWrite and Witness, it is unclear to me why this change is necessary.

@qope
Copy link
Contributor Author

qope commented May 21, 2024

I am writing a generator that automatically generates and verifies a starky proof. I need to set the starky proof in the out_buffer, but GeneratedValues<F> only implements WitnessWrite<F> and does not implement Witness<F>.
The link below shows the usage of Starky after applying this PR:
https://github.com/InternetMaximalism/plonky2_keccak/blob/5aecea14a6325f21b57e22e072fd2051bffc0607/src/generators/stark_proof_generator.rs#L155-L251

Even aside from the above issue, I believe it is desirable to change set_stark_proof_target to use WitnessWrite<F> instead of Witness<F> since it does not utilize the Witness<F> trait.

@Nashtare Nashtare merged commit cfccc1b into 0xPolygonZero:main Jun 1, 2024
3 of 4 checks passed
@qope qope deleted the fix-set_stark_proof-witness branch June 21, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants