-
-
Notifications
You must be signed in to change notification settings - Fork 669
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 plutus transactions #2114
Conversation
Regarding the Plutus UX issue mentioned in the PR description, we have added two incremental improvements:
If you have any suggestions how to further improve the Plutus UX, we would very much appreciate them. Also, @matejcik is there still a release planned in March please? And if so, is there any chance this could make it into the March release? |
There will not be a release in March. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Some small issues in comments.
General comment -- not a prerequisite for this PR, but work to be done as the next step in Cardano evolution. The An outline of what seems reasonable: Create a ISTM you could subclass
We should get rid of the static exception objects in In general the identifiers are extremely long, we should shorten at least local variable names -- but also things like please let me know if you will be working on any of this, otherwise I'll probably start with the refactor myself. |
@matejcik Thanks for the review.
We could do the refactoring but only as part of a larger workload. Currently we are discussing with IOHK the next steps regarding HW wallets but it’s possible no further features/updates will be needed in the following months. So if it is OK for you to wait until the next workload, then I suppose we could do the refactoring. |
FYI, we are now leaning towards an April relese. still not confirmed but a little more likely than not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on code side, please rebase, squash fixups, add UI tests and changelogs, etc.
Thanks for the info, we will see what happens. Depending on the workload on our side, I might start with the refactor sooner, or wait for your next workload. |
28d7129
to
fb65e15
Compare
bfebbbc
to
ef292c0
Compare
Squashed and rebased; changelog and UI fixtures updated in ef292c0. |
the UI test pipeline is failing -- it seems that you removed or renamed two tests but didn't remove the fixtures entries? feel free to force-push the fix directly |
ef292c0
to
6eb2fd0
Compare
I'm sorry for the inconvenience, it should be fixed now. |
and done. |
This PR adds support for Alonzo-era transactions. CDDL
New features:
PLUTUS_TRANSACTION
) that is to be used with transactions involving Plutus script evaluation. Because of how Plutus scripts work, this requires all tx items to be shown to the user to verify (including tx inputs, since they are no longer interchangeable). New tx items13: collateral_inputs
and14: required_signers
are only allowed in this signing mode.11: script_data_hash
and an output itemdatum_hash
which are used when attaching datums to a tx (when sending funds to a script address). Allowed in all signing modes exceptPOOL_REGISTRATION_AS_OWNER
.key_hash
inPLUTUS_TRANSACTION
.15: network_id
may be serialized into tx body.It turns out that the implemented UX may be suboptimal in some cases (e.g. if the tx uses a Plutus script to mint a token and adds it to a "collector" UTXO which holds all the user's token, the user has to click through all the tokens, since all outputs must be shown, including the device-owned outputs). These cases shouldn’t be too common and can also be avoided by storing/moving the tokens to a different address. At the moment, we are contemplating possible UX improvements (without compromising security) and will eventually propose them as a new PR.
The number of added lines seems daunting, but most of it are tests.
We will update the changelog and UI fixtures after the PR is otherwise approved.
We made corresponding changes in Connect as well, but I suggest opening a PR when this one is approved by you.