cardano-serialization-lib icon indicating copy to clipboard operation
cardano-serialization-lib copied to clipboard

Regenerate serialization code

Open rooooooooob opened this issue 3 years ago • 0 comments

I've made Emurgo/cddl-codegen#28 that will allow us to respect ALL deserialization formats. This was previously an issue in particular with Plutus datums #317 #313 but would be good to have in general for other structs as well, which would help this library be used for parsing chain data rather than just creating txs.

I've also got another change to cddl-codgen mostly done locally that will change the serialize*() traits to take in a force_canonical: bool parameter to help with the changes made in Emurgo/cddl-codegen#28, as if we used this on cardano-serialization-lib right now we would break tx hashing as that relies on our serialization being canonical just due to the nature of how cddl-codgen was written before (+ that one manual PartialOrd impl for MultiAsset).

This is going to be a fairly big re-generation. It would mostly be in serialization.rs but it would touch other files too - for lib.rs and such I would just copy in the changes as those just add in a couple new private fields so we don't mess up previous changes. It would also get some extra checks during deserialization that were added to cddl-codegen but didn't make it into cardano-serialization-lib since it wasn't worth re-running it just for those checks.

@vsubhuman it would be nice if we could get most of the open PRs merged if possible before I do this to reduce merge conflict pain for everyone.

rooooooooob avatar Mar 04 '22 00:03 rooooooooob