-
-
Notifications
You must be signed in to change notification settings - Fork 672
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 multisig #1772
Conversation
So here goes the Cardano multi-sig PR I've mentioned already before. I know you've just finished reviewing a large Cardano PR, but do you have an idea when you will be able to review this one please? Thanks! |
we're freezing the September release on Monday, so this will be reviewed at some point before the October freeze |
@matejcik what is the status on this please? Do you have an idea when this PR could be reviewed? Do you think this can make it into the October release? |
It is currently unclear if we will be releasing in October. |
@matejcik any updates please? |
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.
Hello, here is the review that was promised, sorry for taking so long.
As already communicated in Slack, there will not be an October release, so this will most likely be released in November.
On a related note, I am taking a vacation the next week so I will only be available in a very limited capacity.
Overall comment: what is the purpose of the distinction between "ordinary" and "script" transaction? Is there something that a script transaction is allowed to do but it's not clearly communicated to the user?
The code looks nice overall. Only thing worrying me is the growing size of the Cardano application -- there's a LOT of business logic. We might want to split up |
@matejcik thanks for the review! @davidmisiak will take care of finalising this PR.
True, perhaps it could have been confusing with The distinction is there to protect the user from signing something he doesn't want to sign, since the user can't verify the inputs. E.g. accidentally signing a multisig transaction with his 1852 keys and then losing some funds. In a We could perhaps use
Indeed it's grown quite a lot. Currently I'm not sure how it could be split up. We are planing on splitting the Cardano Ledger app into a "lite" app and a full app so that the "lite" app doesn't take up 80% of Ledger storage for ordinary users who don't need all the features. But IMHO it doesn't really apply here, it's more just FYI. I thinks there's not much that could be isolated into separate/independent features since most of the "features" can be used together in a single transaction. The separation into signing modes is something that comes the closest and perhaps it would just need to be a bit restructured. Or could you perhaps elaborate a bit on what you have in mind with the "features"? |
Hi, I'm taking over Trezor Cardano development after @gabrielKerekes. Apart from the review fixes, we've just added two small things: |
I believe the next step is to convert (btw the file No changes requested here, just thinking forward. |
Alright, new take on the CredentialPolicy thing. I notice that the return value of
on high level, i'd suggest:
the only thing that doesn't seem clear to me is what to do about the usage in I think this sort of converges on your "very explicit" idea of |
The changes should be implemented in 248328f. I think |
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.
Very nice, it seems much easier to follow this way. A couple small nits.
probably, yes. feel free to make that change. |
|
looking good. |
0027ea9
to
497d639
Compare
Squashed and rebased. Changelog, README and ui test fixtures updated in 497d639. Hopefully everything ends up green. |
@parametrize_using_common_fixtures( | ||
"cardano/get_native_script_hash.json", | ||
) | ||
def test_cardano_get_native_script_hash(client, parameters, result): |
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.
@pytest.mark.skip_t1
and altcoin
and cardano
markers are missing here
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.
Oh. Added in 813eb72.
it appears that |
Yes, indeed, sorry. I ran In addition I added display format to the tests so that something is actually captured by the ui tests and it also makes sense to test with the display formats. |
that's because the |
Well, that makes sense 🤦 |
and we're done. |
@matejcik just to make sure - will there be the November release please? |
@davidmisiak unfortunately no. we decided to postpone the release until December |
Ok, thanks for info. |
This PR contains changes to support Cardano's native scripts (multi-sig) and token minting.
Important points:
get-public-key
has also been updated to support 1854 and 1855 paths.get-native-script-hash
call has been added which allows the user to verify the hash of a native script while showing all its components to the user.get-address
andsign_tx
change output UI flow would become too complicated. The UI flow was thus refactored and changed a bit - hopefully simplifying it. You can take a look at the designs here.CardanoTxSigningMode.SCRIPT_TRANSACTION
has been added. Only when using this signing mode can script hashes and 1854 witness paths be used. 1852 witnesses are forbidden.key_hash
or ascript_hash
(it was justkey_hash
previously). CDDL.9: mint
field in the body. CDDL. Token minting is signed by keys derived from 1855 paths.additional_witness_requests
which will be forwarded to Trezor as awitness_request
. Witness requests with "usual" 1852 paths are not shown to the user. Witness requests with 1854 and 1855 paths as well as "unusual" 1852 paths are always shown to the user.I plan on generating the ui test fixtures as well as adding changelog entries and updating the Cardano README after the review process is finished. We have also updated Trezor Connect with respect to these changes, but I'd rather create a PR for that after this one is merged.