ckb-cli icon indicating copy to clipboard operation
ckb-cli copied to clipboard

Compatibility issue with Ledger

Open Keith-CY opened this issue 2 years ago • 11 comments

CKB Cli is expected to be able to work with Ledger via ckb-plugin-ledger, but the plugin was declared out-of-date by @TheWaWaR, also confirmed by user @191855 (https://github.com/nervosnetwork/neuron/issues/2583#issuecomment-1418268986). An update on ckb-plugin-ledger is desired to re-enable this feature.

PS: This issue is opened here instead of https://github.com/obsidiansystems/ckb-plugin-ledger for better tracking, suggested by @quake

Keith-CY avatar Feb 06 '23 13:02 Keith-CY

Hi there, ckb-cli is the default signer of Kuai to deploy contracts.

Now we are going to support ledger for contract deployment, so I wonder if there's a plan to fix the compatibility issue.

If there isn't such a plan, we will add ledger support in Lumos first.

Keith-CY avatar Nov 15 '23 06:11 Keith-CY

I tried to compile the ckb-plugin-ledger project using both cargo build and nix-build and found that the required version of the ckb-cli is too old, leading to compilation failures.

nix-build:

vbnet
Copy code
error: failed to sync

Caused by:
  failed to load pkg lockfile

Caused by:
  failed to get `ckb-cli-plugin-protocol` as a dependency of package `ckb-plugin-ledger v0.2.1 (/build/source)`

Caused by:
  failed to load source for dependency `ckb-cli-plugin-protocol`

Caused by:
  Unable to update https://github.com/nervosnetwork/ckb-cli?rev=babc52ae593474f7fddb80f7c229374203310d6a#babc52ae

Caused by:
  object not found - no match for id (babc52ae593474f7fddb80f7c229374203310d6a); class=Odb (9); code=NotFound (-3)
...
cargo build:

vbnet
Copy code
error: failed to get ckb-cli-plugin-protocol as a dependency of package ckb-plugin-ledger v0.2.1 (/workspace/ckb-plugin-ledger)

Caused by:
  failed to load source for dependency ckb-cli-plugin-protocol

Caused by:
  Unable to update https://github.com/nervosnetwork/ckb-cli?rev=babc52ae593474f7fddb80f7c229374203310d6a#babc52ae

Caused by:
  object not found - no match for id (babc52ae593474f7fddb80f7c229374203310d6a); class=Odb (9); code=NotFound (-3)

Afterward, I attempted to use the same Cargo.toml as ckb-cli, and I found that some internal implementations in ckb-plugin-ledger need to be adapted to the new development dependencies.

15168316096 avatar Nov 15 '23 09:11 15168316096

I think maybe the branch of committed id belong to already deleted, but the commit can browser in github page. You can try clone the repo and checkout the commit and push a special branch in you forked repo. Then you reference the commit id in your repo, it might works.

TheWaWaR avatar Nov 15 '23 12:11 TheWaWaR

Hi @15168316096 @TheWaWaR Any update on the plugin?

Keith-CY avatar Nov 21 '23 02:11 Keith-CY

Hi @15168316096 @TheWaWaR Any update on the plugin?

I have no idea, please contact the current maintainer.

TheWaWaR avatar Nov 21 '23 07:11 TheWaWaR

@code-monad said he will take a look at this problem

doitian avatar Nov 21 '23 07:11 doitian

I've made changes that makes this repo compiles without error. Need some testing tho. Trying to test with my handing ledge nano s now.

code-monad avatar Nov 21 '23 22:11 code-monad

I've made changes that makes this repo compiles without error. Need some testing tho. Trying to test with my handing ledge nano s now.

Just noticed I forgot to paste the PR link. Here it is: https://github.com/code-monad/ckb-plugin-ledger/pull/1

Also, this is tested and worked fine on my own Ledge Nano S.

See following example video

https://github.com/nervosnetwork/ckb-cli/assets/45656526/5f4c3401-abca-45cc-9ff3-48b59cf7a962

code-monad avatar Nov 28 '23 20:11 code-monad

update: it is recommended to move to cryptape's fork: https://github.com/cryptape/ckb-plugin-ledger since the original repo is inactive, and we'll take over the maintenance work

code-monad avatar Dec 05 '23 06:12 code-monad

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 28 '24 01:07 github-actions[bot]

update: it is recommended to move to cryptape's fork: cryptape/ckb-plugin-ledger since the original repo is inactive, and we'll take over the maintenance work

Issues are open open in repo https://github.com/cryptape/ckb-plugin-ledger

Keith-CY avatar Jul 28 '24 10:07 Keith-CY

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 28 '24 01:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 02 '24 01:09 github-actions[bot]