-
Notifications
You must be signed in to change notification settings - Fork 61
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: ledger blind signing #259
Conversation
cc7265d
to
099900b
Compare
099900b
to
093543a
Compare
ca1442c
to
2cccc87
Compare
@dj8yfo Is there a chance to improve the error message for old Ledger App? |
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.
This PR is great and the only missing bit is the release of near-ledger-rs crate, so we don't depend on git version. I have left my comments on the PR to near-ledger-rs, and once those addressed we will be able to release it and unblock this PR.
- [x] check out and build old version of near-cli-rs ([revision](https://github.com/near/near-cli-rs/tree/0f484b5053f12f3baba66cda5a82252bee916913) before [blind signature pull](#259) ) - [x] near 0.7.2 - [x] test a normal tx on `app-near`: ok https://explorer.near.org/transactions/HSE5jFuKvrDYeaxEqd445PwVsahcYgXV6kZQQY5uDsj2 - [x] test a long tx on `app-near`: error ```bash `near` CLI has a new update available 0.7.2 → 0.8.1 To update `near` CLI use: near extensions self-update Error: 0: Error occurred while signing the transaction: APDUExchangeError("Unknown Ledger APDU retcode: 27024") ❯ pcalc 27024 27024 0x6990 0y110100110010000 ❯ rg 0x6990 workdir/app-near/src/constants.h 37:#define SW_BUFFER_OVERFLOW 0x6990 ``` - [x] test a long tx on `app-near-rs`: ok https://nearblocks.io/txns/5yzwbUckGSWMyYj8hbG3jJjHWLef5atkzc2fiVrf8Loy - [x] current pr near 0.8.1 - [x] test a normal tx on `app-near`: ok https://nearblocks.io/txns/5Ptbx3iGykXKQpxYBhR9YUa5BCmS6jGjyLiE7oGYGXKN - [x] test a long tx on `app-near` : error ```bash Error: 0: Error occurred while signing the transaction: APDUExchangeError("Ledger APDU retcode: 0x6990") ``` - [x] test a long tx on `app-near-rs`: ok https://nearblocks.io/txns/2duat1ripdAxtHJjuNyNT7ZNd6adADs8LGMZ6VsV9FDm - [x] test a deploy contract tx - [x] on `app-near-rs`: ok https://nearblocks.io/txns/GV6Y9TcTMhqBUoYL6M6BxkeCXXkEe8TfmLJCVx64U7ME# ```bash Unsigned transaction: signer_id: 1b11b3b31673033936ad07bddc01f9da27d974811e480fb197c799e23480a489 receiver_id: 1b11b3b31673033936ad07bddc01f9da27d974811e480fb197c799e23480a489 actions: -- deploy contract DC1KnvBEyPhBzBxCBarMgY9ZN68krg449Dk8AxARU2QN ... ``` - [x] https://nearblocks.io/address/1b11b3b31673033936ad07bddc01f9da27d974811e480fb197c799e23480a489#contract - [x] on `app-near`: error, same behaviour as long tx (12288 bytes) ```bytes 12288 ./examples/adder/res/adder.wasm ```
resolves #33
verify:
tx link exactly from flow on screens above