Skip to content
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

Added JSON and CBOR instances to ConwayGenesis #3022

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

Soupstraw
Copy link
Contributor

@Soupstraw Soupstraw commented Sep 6, 2022

This PR adds ToJSON, ToCBOR and FromCBOR instances to ConwayGenesis. It also adds a test suite and round-trip tests to Conway era.

The ToJSON instance for ConwayGenesis currently outputs a JSON object containing a single field genDelegs, which contains the JSON data for the GenDelegs.

ConwayGenesis is encoded in CBOR just as GenDelegs (via the generic ToCBOR and FromCBOR instance for newtypes).

closes #3021

@Soupstraw Soupstraw force-pushed the jj/conway-cbor-instances branch 4 times, most recently from 2cc9bff to 3cf074f Compare September 6, 2022 11:44
Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Soupstraw Soupstraw marked this pull request as ready for review September 6, 2022 13:46
Copy link
Contributor

@JaredCorduan JaredCorduan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@Soupstraw Soupstraw force-pushed the jj/conway-cbor-instances branch 3 times, most recently from 518c675 to 2fecc9f Compare September 15, 2022 12:06
@Soupstraw Soupstraw merged commit 3f5123c into master Sep 16, 2022
@iohk-bors iohk-bors bot deleted the jj/conway-cbor-instances branch September 16, 2022 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ToJSON and To/FromCBOR instances for conway genesis
3 participants