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

Custom HD Path #2

Closed
ethanfrey opened this issue Mar 8, 2021 · 5 comments
Closed

Custom HD Path #2

ethanfrey opened this issue Mar 8, 2021 · 5 comments
Assignees
Labels
L Large task (4-10 days work) S Small, <1 day work

Comments

@ethanfrey
Copy link
Contributor

We should define our own HD path for the chain. Ask @webmaster128 what it should be, but it should be compatible with the ledger app. Our command line tools should use this path by default for key generation. (And our web tools will customize this in CosmJS)

@ethanfrey ethanfrey added this to the Tgrade 0.1 milestone Mar 8, 2021
@ethanfrey ethanfrey modified the milestones: Tgrade 0.1, Tgrade 0.2 Mar 16, 2021
@ethanfrey ethanfrey added M Medium task, 1-3 days work S Small, <1 day work and removed M Medium task, 1-3 days work labels Mar 17, 2021
@ethanfrey
Copy link
Contributor Author

We assume there is some existing API in the sdk to control the path used in the keychain and cli commands. If there is no access, this will require forking the cosmos sdk and be L or epic

@ethanfrey
Copy link
Contributor Author

ethanfrey commented Mar 17, 2021

Large question is the ledger app. We could probably use m/44'/108'/... prefix with ledger. m/44'/118'/0/x we could be m/44'/118'/107'/x ?

This needs some investigation and planning by @webmaster128 first. We can test this with CosmJS first, then add compatibility

@ethanfrey ethanfrey modified the milestones: Tgrade 0.2, Tgrade 0.3 Mar 17, 2021
@ethanfrey ethanfrey added the L Large task (4-10 days work) label Mar 17, 2021
@webmaster128 webmaster128 self-assigned this Jun 2, 2021
@webmaster128
Copy link
Member

In cosmos/cips#11 a HD derivation path spec for the multi-chain world is proposed. It is currently waiting for review and Ledger implementation.

@alpe alpe modified the milestones: Tgrade 0.3, Tgrade 0.4 Aug 3, 2021
@ethanfrey ethanfrey removed this from the Tgrade 0.4 milestone Aug 23, 2021
@webmaster128
Copy link
Member

webmaster128 commented Dec 1, 2021

TL;DR: Given the state of discussion in the ecosystem with little support for chain specific paths in a shared Ledger app, I would use the Cosmos Hub derivation path.


There is no doubt that we'll want/need to use the Cosmos Ledger app for mainnet launch.

Currently the Cosmos Ledger app sets the path 44'/118' when loading the app onto the device.
This path serves as a prefix such that applications connecting to the Ledger app can only use paths under that prefix. The other path components are then set by the application.
Currently the following restrictions are implemented:

  1. Exactly 5 path components
  2. Component with index 0 is 44'
  3. Component with index 1 is 118'
  4. Component with index 3 is 0'
  5. Component with index 2/4 are small values (x' or x with x <= 100)

Ledger Live iterates over index 2 (account) and other tools iterate over index 4 (address).

With that we have very little flexibility to choose a different path in the current app. It would feel like big time hackery to use some high number in position 2 or 4.

@ethanfrey
Copy link
Contributor Author

Let's just use the standard cosmos hub one

Ebazhanov added a commit that referenced this issue Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L Large task (4-10 days work) S Small, <1 day work
Projects
None yet
Development

No branches or pull requests

3 participants