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

Babbage era CDDL specification #2654

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Babbage era CDDL specification #2654

merged 1 commit into from
Feb 28, 2022

Conversation

JaredCorduan
Copy link
Contributor

This is a first draft of the Babbage era CDDL specification

Comment on lines +75 to +92
transaction_output = legacy_Transaction_output / post_alonzo_transaction_output ; New

legacy_transaction_output =
[ address
, amount : value
, ? datum_hash : $hash32
]

; Note that in the post_alonzo_transaction_output, we do not allow
; a transaction output to include both a datum hash and a datum.
; In other words, keys 2 and 3 are mutually exclusive.
post_alonzo_transaction_output =
{ 0 => address
, 1 => value
, ? 2 => datum_hash
, ? 3 => datum ; New; inline datum
, ? 4 => script ; New; script reference
}
Copy link
Contributor

Choose a reason for hiding this comment

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

i like this 👍, how does deserializing the TxOut with cborg work though? do we decide how to branch by peekTokenType? cborg doesn't seem to have great machinery for deserializing choices

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately I don't think that there is a way to handle it besides branching on peekTokenType.

@JaredCorduan JaredCorduan marked this pull request as ready for review February 15, 2022 21:12
@JaredCorduan JaredCorduan merged commit f26eea2 into master Feb 28, 2022
@iohk-bors iohk-bors bot deleted the jc/babbage-cddl branch February 28, 2022 18:40
@JaredCorduan JaredCorduan mentioned this pull request Feb 28, 2022
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.

2 participants