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

Set the default derivation path for HD wallets on classic network #452

Closed
wants to merge 1 commit into from

Conversation

ziogaschr
Copy link
Member

@ziogaschr ziogaschr commented Jan 31, 2022

This PR suggests setting the default derivation path for HD wallets to point on ETC classic wallets instead of ETH ones.
This is a first direction on handling the derivation path, based on the fact that core-geth is mostly used for ETC networks.

Also I am starting the discussion here on wether we should make this configurable based on each chain we support at core-geth. Though it seems that nobody else used it (no issues so far), and we might put that in low prio.

Fixes #451

List of canonical derivation paths: https://github.com/satoshilabs/slips/blob/master/slip-0044.md

@ziogaschr ziogaschr requested a review from meowsbits January 31, 2022 19:24
@ziogaschr ziogaschr force-pushed the feat/classic-hd-derivation-path branch from 90b8a6f to 9238082 Compare February 1, 2022 07:42
@meowsbits
Copy link
Contributor

Hm, this is a tough one.

A change from 60 to 61 as the default seems to me like a breaking API change.
Implementing configuration seems useful, but will have maintenance costs long term.

@ziogaschr
Copy link
Member Author

Indeed, it will have a lot of maintenance cost and I don't see this getting merged at foundation.

On the other hand, it's hard to use an HD wallet on ETC. What else I am thinking now, is that on every wallet invocation we will just print a warning that an ETH derivation path is used, with an example on how to use the correct one (if possible)

{"m/44'/61'/0'/128", DerivationPath{0x80000000 + 44, 0x80000000 + 61, 0x80000000 + 0, 128}},
{"m/44'/61'/0'/0'", DerivationPath{0x80000000 + 44, 0x80000000 + 61, 0x80000000 + 0, 0x80000000 + 0}},
{"m/44'/61'/0'/128'", DerivationPath{0x80000000 + 44, 0x80000000 + 61, 0x80000000 + 0, 0x80000000 + 128}},
{"m/2147483692/2147483709/2147483648/0", DerivationPath{0x80000000 + 44, 0x80000000 + 61, 0x80000000 + 0, 0}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note to self:

  • fromhex(0x8000003d) => 2147483709

https://github.com/satoshilabs/slips/blob/master/slip-0044.md

@ziogaschr
Copy link
Member Author

Closing this for now, later we might invest time on it, so as it is configurable with a flag or any other non breaking change.

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

Successfully merging this pull request may close these issues.

HD wallet to have default DerivationPath for ETC apps m/44'/61'/0'/0
2 participants