-
Notifications
You must be signed in to change notification settings - Fork 159
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
Ns/versionize zk #1482
Merged
Merged
Ns/versionize zk #1482
Conversation
This file contains 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
3148b87
to
2aac910
Compare
a8944a8
to
6c68ae8
Compare
e4f0564
to
1d78ad8
Compare
132ca0e
to
50322d0
Compare
d7f9f46
to
f955b3f
Compare
Base automatically changed from
am/chore/zk-v2-manage-upper-bound-params
to
main
September 13, 2024 08:24
4 tasks
b967bec
to
c96e301
Compare
c96e301
to
5425f32
Compare
tmontaigu
approved these changes
Sep 27, 2024
efc6954
to
f6119ad
Compare
tmontaigu
approved these changes
Sep 27, 2024
43ceb70
to
ed3d310
Compare
ed3d310
to
274c7ec
Compare
tmontaigu
approved these changes
Sep 27, 2024
BREAKING CHANGE: - The `CiphertextList` trait needs to be in scope to use the common methods of the `CompressedCiphertextList` and `CompactCiphertextListExpander` - The `.get` of the `CompactCiphertextListExpander` now returns a `Result<Option>` instead of an `Option<Result>`
274c7ec
to
19ea462
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
closes: please link all relevant issues
PR content/description
Versionize the ProvenCompactCiphertextList.
Arkworks serialization
For this I changed a bit the way the serialization of arkworks data is handled.
Arkworks use a custom serialization framework (not serde). The reason they state for this is that they want to be able to compress the elliptic curve data during serialization.
However, their serialization scheme is "code oriented" (whereas serde is more "data oriented" because the code serialization is generated automatically based only on type definitions). It means that for backward compatibility we need to check not only the types but also the serialization functions, where subtle breaking changes can occur.
This PR changes this by defining serializable counterparts to arkworks types. These types then simply derive "serialize/deserialize" so they can be easily versioned.
The compression is still optionally supported. the "SerializableAffine" type is defined as an enum:
The "compression" happens when this type is created from arkwork's
Affine
type. Using an enum is easier for versioning than the bitflags system used by arkworks, and is directly compatible with serde.To handle compression, I added a trait
Compressible
. Now to serialize a compressed version we do:The dependency to
ark_serialize
has been removed.pke/pke_v2
Both have been versioned in this PR, a commit has been added to use pke_v2. It can be removed if needed.
Verify
The
Verify
option of ark_serialize is currently not supported, which is a regression. I think it should be moved to the conformance API for uniformization.Check-list: