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

feat(cardano): add support for babbage features #2354

Closed

Conversation

gabrielKerekes
Copy link
Contributor

Babbage CDDL

Changes:

  • new Babbage transaction elements serialization and the corresponding logic and UI changes
    • collateral_return - an output which can be added to a transaction to contain unspent collateral. It would only be considered a real tx output if Plutus script validation fails and collateral would be spent. Useful so that any input can be used as collateral.
    • total_collateral - if the total ADA amount in collateral inputs doesn't match total collateral the transaction is invalid.
    • reference_inputs - inputs required for script validation.
    • output inline_datum - the whole serialized datum can now be included in the output instead of just the datum hash. Is sent as chunks since it can be quite long. Only first chunk is shown to the user.
    • output reference_script - used for script pre-publishing. Is sent as chunks since it can be quite long. Only first chunk is shown to the user.
  • "post-alonzo" output serialization as a map
    • Outputs can now be serialized in two formats. The legacy, array format or now also as a map. See CDDL.
  • required_signers allowed in ORDINARY and MULTISIG txs - there should be no harm in allowing this and some dapps misuse this field fir whatever they need.
  • datum_hash allowed in non-script outputs - apparently this can be useful to "tag" inputs.

@gabrielKerekes gabrielKerekes requested a review from matejcik as a code owner June 30, 2022 06:30
@matejcik matejcik changed the base branch from cardano-refactors-2 to cardano-babbage July 1, 2022 09:38
@marnova marnova self-requested a review July 1, 2022 09:52
@matejcik
Copy link
Contributor

matejcik commented Jul 1, 2022

Outputs can now be serialized in two formats. The legacy, array format or now also as a map. See CDDL.

are we required to support both?

@gabrielKerekes
Copy link
Contributor Author

are we required to support both?

The result of internal discussions was that yes, we need to support both, at least for the time being so that wallets and other apps would get a chance to migrate at least. Currently there is however no specific plan to drop the support from our side but it should be doable.

Copy link

@marnova marnova left a comment

Choose a reason for hiding this comment

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

With my very limited knowledge about Cardano I have nothing to add that @matejcik didn't already mentioned.

Copy link
Contributor

@matejcik matejcik left a comment

Choose a reason for hiding this comment

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

thanks @marnova

@gabrielKerekes please squash the fixups so that this is ready to merge

@gabrielKerekes
Copy link
Contributor Author

@gabrielKerekes please squash the fixups so that this is ready to merge

Done. I also squashed the make Babbage protobuf elements optional commit with the one adding types (the first one).

@matejcik
Copy link
Contributor

matejcik commented Jul 4, 2022

merged via #2355

@bosomt
Copy link

bosomt commented Aug 4, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants