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: Reference scripts #2645

Merged
merged 3 commits into from
Feb 9, 2022
Merged

Babbage: Reference scripts #2645

merged 3 commits into from
Feb 9, 2022

Conversation

goolord
Copy link
Contributor

@goolord goolord commented Feb 5, 2022

resolves #2465

| TxOutCompactRefScript'
{-# UNPACK #-} !(CompactAddr (Crypto era))
!(CompactForm (Core.Value era))
!(Datum era)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is kind of a compromise between performance and having a nice API + not polluting the CBOR with a bunch of extra constructors to represent every possible new permutation of Addr × Value × (Datum | DataHash)? × Script?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep, I like this. we are indeed on a combinatorially explosive path that has to be dampened somehow.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My previous comment was wrong. This looks good, I like it too! 😉

Copy link

Choose a reason for hiding this comment

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

Does this mean that inline data and ref script can't be used in the same output?

Copy link
Collaborator

Choose a reason for hiding this comment

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

On the contrary, it means that inline datum is optional with a ref script

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TxOutCompactRefScript' caddr value (Datum inlineDatum) refScript is valid

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.

Looks good to me! We are still trying to decide on the final serialization schema for the Babbage era transaction outputs, but I think this PR does not need to be blocked by that decision.

@JaredCorduan
Copy link
Contributor

I'm not sure what is going on with ormolu, I'll try to restart the github action

@goolord goolord force-pushed the zc/babbage-refscripts branch 4 times, most recently from 6eefa8d to ce0ecdd Compare February 9, 2022 22:28
@goolord goolord merged commit 9d4d82b into master Feb 9, 2022
@iohk-bors iohk-bors bot deleted the zc/babbage-refscripts branch February 9, 2022 23:38
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.

Babbage TxOut
4 participants