zcash / pasta_curves

Rust implementation for zcash/pasta
Other
81 stars 49 forks source link

Add optional borsh and serde serialization. #36

Closed parazyd closed 2 years ago

parazyd commented 2 years ago

Rebased for latest release.

arthurgreef commented 2 years ago

Hi - any chance of this PR being accepted any time soon? I'd like to use the serde features.

Can we also get Affine serialized/deserialized please?

    /// Represents a point in the affine coordinate space (or the point at
    /// infinity).
    #[derive(Copy, Clone)]
    #[cfg_attr(feature = "repr-c", repr(C))]
    #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
    $($privacy)* struct $name_affine {
        x: $base,
        y: $base,
    }
parazyd commented 2 years ago

@arthurgreef Updated for Affine too.

parazyd commented 2 years ago

@ebfull Thanks. Updated with your suggestion.

arthurgreef commented 2 years ago

Hi there. Any chance we could accept this PR and publish the crate?

parazyd commented 2 years ago

@ebfull ping

arthurgreef commented 2 years ago

Hi all - can someone respond so that we can stop polling for attention if it is not going to help? We would like to use Nova and we need serde to serialize/deserialize proofs and parameters. Nova would like us to use official libraries so this would really help us out. Creating forks of multiple repos is our alternative and it is not that comfortable. Thanks much.

str4d commented 2 years ago

(apologies for the delay in review; the PR was updated right as we were in the final stretch of a bunch of work, and we've been decompressing from that over the past couple of weeks)

arthurgreef commented 2 years ago

Hi @parazyd are you working on this PR? I'm wondering if I should pick up from where you left off to move this along? Thanks.

parazyd commented 2 years ago

Hi @parazyd are you working on this PR? I'm wondering if I should pick up from where you left off to move this along? Thanks.

Feel free to continue. I'm currently very busy with other things so can't focus here.

daira commented 2 years ago

This and #48 appear to conflict. I think we should take #48 because it does not allow violating invariants, I think.

parazyd commented 2 years ago

@daira Agreed. When the serde patch is merged, I can work on top of that to add borsh support. Thanks.