-
Notifications
You must be signed in to change notification settings - Fork 7
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
RLN: implement witness and proof values serialization in serde #21
Comments
I've got serialization working with serde, but implementing deserialization is such a pain |
No strong preferences here. By default it'd probably make sense to use same as arkworks, but maybe fine to use something else if we have good reasons? Not immediately obvious to me what implications would be in terms of ease of interop etc. What are the problems with serde de-serialization and how does borsh make it better? @s1fr0 any specific reason for serde from your POV? |
I know what you mean, and that's one of the reason why I prefer to have our custom and simple de/ser utilities. I don't have any strong preference for We should keep it mind that serialized data is passed to zerokit APIs, hence data serialization has often to be done on the client side. In other words the deserialization implemented in zerokit should match the serialization implemented/available in clients using zerokit. Except for the proof (which is a 128-bytes array that is passed to zerokit APIs "as it is", so needs no further encoding/decoding on the client side), other serialized values are essentially elements in |
Problem
We want to serialize Groth16 witness and proof values (i.e., public inputs of the circuit) using
serde
. These values are embedded in the two data structuresRLNWitnessInput
andRLNProofValues
, containing different data types.From #20, serialization/deserialization of these two data structures is done through custom functions (
serialize_witness
,deserialize_witness
,serialize_proof_values
,deserialize_proof_values
, all in theprotocol
crate).Acceptance criteria
Implement serialization and deserialization of relevant data structures using serde framework.
The text was updated successfully, but these errors were encountered: