Add public witness serialization#872
Closed
GraDKh wants to merge 1 commit intodgordon/serialize_constraint_systemfrom
Closed
Add public witness serialization#872GraDKh wants to merge 1 commit intodgordon/serialize_constraint_systemfrom
GraDKh wants to merge 1 commit intodgordon/serialize_constraint_systemfrom
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Aug 29, 2025
Closed
Closed
630049f to
722dbbe
Compare
440c40a to
457165d
Compare
722dbbe to
418523e
Compare
jadnohra
approved these changes
Sep 1, 2025
457165d to
7830e3d
Compare
418523e to
2674f27
Compare
This was referenced Sep 1, 2025
Closed
Merge activity
|
graphite-app bot
pushed a commit
that referenced
this pull request
Sep 2, 2025
# Add PublicWitness struct for zero-knowledge proof verification ### TL;DR Introduces a new `PublicWitness` type to represent the public portion of witness data in zero-knowledge proofs. ### What changed? - Added a new `PublicWitness<'a>` struct that uses `Cow<'a, [Word]>` to efficiently store public witness data - Implemented serialization/deserialization with version compatibility - Added conversion methods from various types (`Vec<Word>`, `&[Word]`, `&ValueVec`) - Added utility methods for accessing and manipulating the witness data - Created a reference binary file `public_witness_v1.bin` for serialization testing - Updated test documentation to include information about the new reference file ### How to test? - Run the test suite to verify the implementation works correctly: - The tests include serialization round-trips, version compatibility checks, and conversion tests ### Why make this change? Public witness data is a critical component in zero-knowledge proof systems, representing the public inputs and constants that both provers and verifiers need to agree on. This implementation provides a standardized way to handle this data with efficient memory usage through `Cow`, allowing both borrowed and owned variants depending on the use case.
lockedloop
pushed a commit
that referenced
this pull request
Sep 8, 2025
# Add PublicWitness struct for zero-knowledge proof verification ### TL;DR Introduces a new `PublicWitness` type to represent the public portion of witness data in zero-knowledge proofs. ### What changed? - Added a new `PublicWitness<'a>` struct that uses `Cow<'a, [Word]>` to efficiently store public witness data - Implemented serialization/deserialization with version compatibility - Added conversion methods from various types (`Vec<Word>`, `&[Word]`, `&ValueVec`) - Added utility methods for accessing and manipulating the witness data - Created a reference binary file `public_witness_v1.bin` for serialization testing - Updated test documentation to include information about the new reference file ### How to test? - Run the test suite to verify the implementation works correctly: - The tests include serialization round-trips, version compatibility checks, and conversion tests ### Why make this change? Public witness data is a critical component in zero-knowledge proof systems, representing the public inputs and constants that both provers and verifiers need to agree on. This implementation provides a standardized way to handle this data with efficient memory usage through `Cow`, allowing both borrowed and owned variants depending on the use case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add PublicWitness struct for zero-knowledge proof verification
TL;DR
Introduces a new
PublicWitnesstype to represent the public portion of witness data in zero-knowledge proofs.What changed?
PublicWitness<'a>struct that usesCow<'a, [Word]>to efficiently store public witness dataVec<Word>,&[Word],&ValueVec)public_witness_v1.binfor serialization testingHow to test?
Why make this change?
Public witness data is a critical component in zero-knowledge proof systems, representing the public inputs and constants that both provers and verifiers need to agree on. This implementation provides a standardized way to handle this data with efficient memory usage through
Cow, allowing both borrowed and owned variants depending on the use case.