Skip to content

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
@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