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

Clef does not derive ledger accounts consistently; No option to control HD paths #21592

Closed
KPrasch opened this issue Sep 21, 2020 · 3 comments
Closed

Comments

@KPrasch
Copy link

KPrasch commented Sep 21, 2020

System information

Geth version: 1.9.15-stable+
OS & Version: Ubuntu 20.04

Expected behaviour

  • A way to control which HD paths are derived from clef with a CLI option or command.
  • Clef correctly and derives accounts from Ledger hardware wallets everytime it is plugged in an unlocked.

Actual behaviour

  • There is no way to control which key paths are derived from clef. (This is problematic since ledger now has Ledger Live and Legacy differences.)
  • Each time the Ledger Nano S is plugged into the USB port and unlocked, either the warning account derivation failed error="reply lacks public key entry" or "legacy" key paths are derived.

Steps to reproduce the behavior

  1. Start clef clef
  2. Attach and unlock a ledger nano s several times
  3. View warnings / derived addresses in clef's console

Notes

Thanks for all your hard work on clef - Let me know how I can best support this Issue or if there is any additional information I can provide. :-)

@holiman
Copy link
Contributor

holiman commented Sep 22, 2020

Well, it's true that Clef does not derive accounts consistently, the reason being that ledger itself is inconsistent. Some more context is here: #21517 , but the TLDR: is that ledger started using one path, and then switched to another -- which is kind of crazy if you're a hardware wallet.

So what geth does is that it checks both, and "latches on" to those addresses which appears to be used -- have a nonzero nonce/balance.

Clef, however, is meant to be usable fully offline, and is not backed by a chain. And it's extremely bad UX to suddenly not show accounts that were previously present, just because we also changed path. So the middle ground that Clef went with was to derive on both paths.

Yes, we could add another cli option. But that requires the user to be sufficiently knowledgable about derivation paths to know the problem, and such users are very rare, and can probably use the UI interface to tell clef to derive whatever paths they desire.

But if you have a good suggestion for a command line switch, please specify it, and maybe we can fix it.

@KPrasch
Copy link
Author

KPrasch commented Sep 22, 2020

@holiman - Thanks for your answer - it is very helpful for troubleshooting. Let me think it over a bit.

@holiman
Copy link
Contributor

holiman commented Oct 15, 2020

Closing this, I'm open to suggestions as to how to improve the UX.
Please file a separate ticket about the error logs, it's not something I've noticed myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants