stellar / slingshot

A new blockchain architecture under active development, with a strong focus on scalability, privacy and safety
Apache License 2.0
415 stars 61 forks source link

zkvm|musig: partial serialization support #336

Closed oleganza closed 5 years ago

oleganza commented 5 years ago

This adds serialization support for:

These do not yet have decent hex-encoding for obvious types (e.g. Signature is serialized not as a 64-byte hex string, but as a struct with two fields serialized as arrays of numbers). Will add this later.

More complex structures like VerifiedTx (with its TxLog, which requires serializing Contract, which requires serializing Values and Predicates) will be dealt with later - we will need special annotations and/or helper types for them to be serialized decently.

Another question is how to serialize witness data. We will probably need more thorough to_opaque() APIs in order to guarantee that we don't accidentally serialize secrets.