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

Update Cardano.Api.Tx in preparation for Alonzo #2642

Merged
merged 18 commits into from
May 24, 2021

Conversation

@Jimbo4350 Jimbo4350 force-pushed the jordan/alonzo-prep-api-tx-module branch from 860d2c3 to c38e2c9 Compare April 22, 2021 10:35
@Jimbo4350 Jimbo4350 force-pushed the jordan/alonzo-prep-api-tx-module branch 8 times, most recently from aa10055 to 5ade9b9 Compare May 17, 2021 15:06
@dcoutts dcoutts force-pushed the jordan/alonzo-prep-api-tx-module branch from 07752b8 to 134b792 Compare May 19, 2021 21:03
@dcoutts dcoutts added the WIP Work In Progress (cannot be merged yet) label May 19, 2021
@dcoutts dcoutts force-pushed the jordan/alonzo-prep-api-tx-module branch from 134b792 to 8c34b3c Compare May 19, 2021 23:12
@@ -878,6 +878,9 @@ data TxBody era where
-- witnesses set, since they need to be known when building the body.
-> [Ledger.Script (ShelleyLedgerEra era)]

--TODO: we will probably want to or need to put the Alonzo data and
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@dcoutts dcoutts force-pushed the jordan/alonzo-prep-api-tx-module branch from 51d7684 to 3e7cc16 Compare May 20, 2021 13:52
@newhoggy newhoggy force-pushed the jordan/alonzo-prep-api-tx-module branch 2 times, most recently from d307dec to 14e41aa Compare May 21, 2021 02:06
@newhoggy
Copy link
Contributor

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 21, 2021

👎 Rejected by label

@newhoggy newhoggy added WIP Work In Progress (cannot be merged yet) and removed WIP Work In Progress (cannot be merged yet) labels May 21, 2021
@newhoggy newhoggy force-pushed the jordan/alonzo-prep-api-tx-module branch from 2e3a97b to 14e41aa Compare May 21, 2021 06:48
@Jimbo4350 Jimbo4350 force-pushed the jordan/alonzo-prep-api-tx-module branch from e487ee2 to 2a9e029 Compare May 21, 2021 08:30
newhoggy and others added 18 commits May 24, 2021 11:36
Including Alonzo constructors for the "feature X supported in era" GADTs
used in TxBody.
This manages to keep a single era-generic implementation, rather than
having to do a case split on Alonzo vs the other Shelley-based eras.
The Ledger.Tx is the type family indexed on the era, while Shelley.Tx is
a specific type for the Shelley era (but also used by Allegra and Mary).
Several of the easy straightforward ones.

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
It turns out that the serialiseToCBOR side did not need to do case
analysis on the era at all.
Specifically the Alonzo cases for the getTxBody and getTxWitnesses
helper functions used by the Tx pattern on the destructor side.

Also the Alonzo case for makeSignedTransaction. There are still TODOs
here to construct the dataum and redeemer mappings.

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
A bunch more of the easy ones.
Still a TODO for the Alonzo tx out data hash.
Still TODOs for the aux script data.
Still several TODOs for the new and changed fields.
We will use Hash ScriptData in the tx out datum hash.
But do export the representations from the Byron and Shelley API modules
since those are supposed to expose the representations.
Both depending on the feature GADT ScriptDataSupportedInEra which covers
only the Alonzo era.

The TxOutDatumHash ptionally contains a Hash ScriptData. It will be
added to the TxOut as a 3rd component.

The TxAuxScriptData is like TxAuxScripts but for script data rather than
scripts. It will be added to the TxBodyContent record.

This commit just adds the types but does not yet use them.
Not yet supported in the CLI.
Copy link
Contributor

@dcoutts dcoutts left a comment

Choose a reason for hiding this comment

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

I'm happy with this now.

Follow-up commits are now in #2738, in particular the redeemer map stuff.

@Jimbo4350 Jimbo4350 removed WIP Work In Progress (cannot be merged yet) hydra-dont-build labels May 24, 2021
@dcoutts
Copy link
Contributor

dcoutts commented May 24, 2021

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 24, 2021

@iohk-bors iohk-bors bot merged commit 73ab3e8 into master May 24, 2021
@iohk-bors iohk-bors bot deleted the jordan/alonzo-prep-api-tx-module branch May 24, 2021 14:13
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.

3 participants