-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add trait bounds to types in Signature
trait
#145
Comments
this option sounds good to me! I wonder if we could also try to leverage on
I think it's due to |
Thank you for the edit, you beat me to it. Yes, this is where it comes from, and the preferred usage will be the attribute directly from tagged_base64. Also, it's worth noting that we currently have a unified list of known tags in https://github.com/EspressoSystems/espresso-systems-common/blob/main/src/lib.rs, but it might be better (@jbearer) to make separate generalized crates for tags for jf, cap, etc, and export those in espresso-systems-common, so that they can be included directly in crates that don't export espresso-specific assets. |
Thanks both, I'll see what I can do about it. |
Signature
and Vrf
traitsSignature
trait
As pointed out in this PR's discussion, due to downstream considerations it would be cleaner to add trait bounds to the associated types in
Signature
andVrf
traits, e.g.:The challenge currently is that the underlying blst structs used in the BLS Sig/VRF don't implement serde's traits (although they have
serialize/deserialize
free methods).One option to go forward with this is re-introducing newtype structs like in 0.1.2, except that with a different inner field (i.e.
blst::min_sig::{SecretKey, Signature, etc.}
instead of arkworks'GroupAffine
), and implementingserde::Serialize
andDeserialize
by hand, like:I wonder how the downstream repo's bounds were satisfied previously? Namely, I don't understand how
was satisfied, if the implementers' (e.g.
BLSSignatureScheme
) associated types only derived arkworks'Canonical(De)Serialize
and notserde::(De)Serialize
?@alxiong @chancharles92 @mrain
The text was updated successfully, but these errors were encountered: