-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Plans for Ledger Derivation Path? (Multiple Ledger / Path Issues inside) #407
Comments
Sorry for the hot mess of thoughts but wanted to shed some light even though I'm in the middle of like 10 things.
|
Our dApp wants to be able to use hosted nodes (e.g., Infura) for accessing the chain but allow the user to sign transactions with the ledger. The ledger only stores a master seed (per BIP 32) so in order to ask the ledger to sign things on behalf of our users, using an account/address the user is familiar with (and has ETH), we have to supply the Ledger with a path. If we were to follow the BIP 44 standard, we would supply the Ledger with the path Unfortunately, if the user had previously used MEW to load ETH onto their Ledger, that path would lead us to an account/address that didn't have any ETH, because MEW used the path
I suspect we are saying the same thing, but I want to make sure we are clear. The Ledger only has a master seed. The seed by itself is not an Ethereum account/address, but when combined with a BIP 32 path the Ledger can deterministicly generate an Ethereum account (public address/private key). If you enter the same path into a ledger with a particular master seed, you will get the same account/address every time. If you use a different path, you'll get a different account/address.
Unfortunately, at the moment it seems that there is basically zero consistency across wallets. I drafted up what I could find (may not be 100% correct yet) and you can see that there is really no consistency (even within MEW there are a few different paths used). This, IMO, argues very strongly with just following the existing standards (BIP 43/44) until such time as the community can develop a new Ethereum specific standard.
This isn't really about mnemonics but rather it is about defining how to ask a hardware wallet for an address or addresses. At the moment, everyone is asking for them differently which means everyone is getting a different set of addresses for the same hardware wallet. From the user's point of view, this incredibly confusing because if they open their Ledger in MEW they see one set of addresses/balances but if they open their Ledger in another wallet they see a different set of addresses/balances.
I agree so much with this! 😄
Also agree with this pretty strongly. However, I do think there is significant value in coming to some community consensus around a temporary solution to the HD Wallet paths problem until there is an official Ethereum supported solution. If everyone had rallied around a non BIP 44 compliant solution I would be mildly annoyed, but would go along with it until an EIP gets an official answer. Unfortunately, since the various wallets have all gone different directions we are in a situation where we need to just pick something (anything) and run with it. Given the only real compelling argument for any one of them is that one is a standard, I'm proposing that be what we rally around until an EIP can get pushed through to make things better. |
yes sorry. braindead. really really really braindead. you are 100% correct.
https://github.com/kvhnuke/etherwallet/blob/mercury/app/scripts/controllers/decryptWalletCtrl.js
Supposedly (Jaxx, Metamask, Exodus, imToken, TREZOR) are the same. Well, Trezor is the same sometimes but not for classic / testnet? I dont even know
As the person who answers alllllll the support requests the answer is yes. There are in fact people who have 1 key between a Ledger or Trezor....have sent ETC to their ETH address on Trezor, have send ETC to their ETC Trezor address on Ledger, and generally making my brain fuck itself sideways trying to keep it all straight. Anyways sorry I've had an incredibly rough day. How about our formal answer is "We will follow whatever standard or temporary-standard, we will not create new standards, and we would love to help implement whatever to help make any transitions easier. We really don't care what the standard is so you handle that. " |
Would like to add to this that the Ledger ETC derivation path is: As it stands right now MyEtherWallet will fail on Ledger ETC transactions with an "Invalid Network ID" error. Details are here: http://support.ledgerwallet.com/knowledge_base/topics/general-ledger-nano-s-faq |
The BIP 44 derivation path for ETC SHOULD be |
@pyskell Where do you see that error? In MEW? What are the steps to reproduce it? |
@MicahZoltu Yes the error is in I just realized that this may be two separate issues:
Anyway steps to reproduce the error I'm seeing when accessing
|
I don't believe the drop-down in the top right changes the derivation path used when communicating with a Ledger. I think right now if you talk to a Ledger with MEW it always uses one derivation path which is I believe the |
Yeah I think my attempt was to get MEW to use the same derivation path as the official application when it comes to ETC but none of the derivation paths we've mentioned thus far seem to be it (including the ones noted on Ledger's own website). I'll need to open a separate issue with them I suppose to figure out the actual derivation path. Any idea where comes from for the ETC derivation path? I tried a couple indexes (0, 1) and they don't match what the Ledger application gives either. I'll open a second issue for |
If you have your mnemonic you can experiment with derivation paths that way via MEW. I would expect the path to be either the one they documented or |
Gah. Okay there are like 10 separate issues here. 💀 🔫 @kvhnuke Actionable List
/ rant |
Ok, so I've figured out the "correct" derivation path for Ledger ETC. Using MEW and entering my mnemonic phrase with a Custom derivation path of A more detailed description: In MEW in
I don't know JavaScript well but the comments around this area seem to indicate that MEW tacks on an extra
So my educated guess here is that when specifying the Custom derivation path for Ledger ETC it needs to be input as: However if I input it as I'm wondering if this is desired behavior or not when using a custom derivation path as I don't know how people normally communicate these paths (ie. whether they include the /0 index or not). But perhaps it could do with at least a notification to users? Or perhaps some parsing to determine whether or not the user has indicated the index to start at? |
@tayvano Gotcha, well this user has figured this out, but the problem still exists for actually using my Ledger Nano S, as when I do I'm unable to choose my own derivation path. Entering my mnemonic onto an internet-connected machine is very much the opposite of the purpose of hardware wallets so hopefully you can at least let the user input their own derivation path when using the Ledger Nano S device. |
Okay so the spec is:
The "last 0" that you speak of is the address index. The Ledger CX only shows the first address. We pull all the addresses. I'm not sure what you mean by "adding a zero" though. The first address will be And yes, I think allowing users to enter a cust path when they are interacting with the Ledger should be the top priority. |
Gotcha, thanks. By "adding a zero" I was referring to the Seems that I need to input the derivation path without the |
Interesting, I'm going to add a note to look into that. We should probably just ignore any specified Also, finally found the comment regarding Ledger + ETC:
|
@tayvano Unfortunately you can't do this because everything is terrible. BIP44 says that if the second segment is For a full list of the known bad actors in the community see EIP 84. Also, support EIP 600 and EIP 601 which attempts to make it so that wallets can figure out the correct derivation path from the mnemonic alone. This will resolve this whole fiasco going forward and give Ethereum wallets something to standardize on that doesn't depend on the end-user knowing anything about derivation paths. |
v3.6.6 should allow for customization of all paths. If anyone wants to pull current mercury version and test it, it would be much appreciated. (Except.....maybe you can't because you'd have to set up SSL first?) @kevinmonahan Please let me know how it works with the Ledger and if you find anything un-intuitive @kvhnuke You STILL have our Trezor so um.....if it's broken imma blame you. 👍 |
Yeah can't test without setting up a server w/ SSL first. Will do later if I can get something spun up fast. Also, just curious, why does MEW require SSL when running a local copy? |
@pyskell it's a requirement of U2F, not MEW or Ledger. The reason Ledger uses a Chrome App over and extension is bc the app has access to USB directly and doesn't have to use the U2F functionality. This is also the reason it doesn't work in firefox. U2F is kinda led by Google. |
You can tell chrome to allow U2F from pages served by HTTP. I found this to be easier than setting up a local HTTPS server. |
@MicahZoltu How do you do that? A quick google search doesn't say. Also I've tested it anyway and it works correctly for ETC with the Ledger Nano S. Providing the derivation path And thanks. You devs are the best devs! |
@MicahZoltu If you could share how, it would make a lot of folks lives easier - especially those running locally. Thank you @pyskell. I will test a couple more times and then push live. Considering the amount of issues people are currently having with this, as long as it isn't hopelessly broken, It'll be an improvement. :/ We can make further updates / warnings / instructions based on how the support requests come in. Thank you both for your assistance on this. |
https://github.com/google/u2f-ref-code#option-1-use-the-extension-from-the-webstore (at the end of the readme). I went with option 2 because the extension linked in option 1 is from some random dude on the internet and I didn't trust it (though, it is linked from a Google GitHub repo). |
Note: |
Thank you! Reminds me of cloudflares dev mode: it's on for 3 hours. After 3 hours you about kill yourself trying to figure out why your changes are working and even your 5 alerts on document ready arent firing, before you realize it's cached. |
The issues (besides the issue of having too many damn paths for ETH) is resolved. (I hope) with v3.6.6 which I just pushed live. Feel free to reopen or comment if it ain't. @pyskell I just realized what you were talking about with the index: We are asking for the path, sans address index, as we then display 5 addresses (.... /0, ..... /1, ...../2,.......). Regardless of which way we chose to do things, it would be confusing so I'm going to opt for not changing this, as there are enough variables floating around. |
I'm working on a dApp and when attempting to do what I was hoping would be a fairly straightforward ledger integration I found out that MEW and Ledger Chrome App are both using BIP32 derivation paths that claim to be BIP 44 compliant per BIP 43, but aren't actually BIP 44 compliant. After reading #332 it sounds like Ledger team and MEW are interesting in "fixing" this mistake but I haven't seen any forward movement on that. I have a bit of a rant over in EIP 84 on this topic for those who want a bit more depth.
The question I have for the MEW team is whether or not there are any plans to bring MEW into compliance with BIP 43 and 44?
If so, what time frame are those plans (weeks, months, quarters, years)?
I recognize that the UX for backwards compatibility is going to be a pain, but as a dApp developer I would really like to see this resolved. I'm trying to add ledger integration into our dApp but if I follow the standard and the user used MEW+Ledger to fund their account, they won't see their ETH in my dApp. If I ignore the standard and follow MEW, then the same problem will occur for anyone who used a wallet that did follow the standard.
At the moment there is no Ethereum specific standard (waiting on EIP 84 resolution) so I think following the BIP 43 and/or BIP 44 standard has value for end-users while we wait for something Ethereum specific.
The text was updated successfully, but these errors were encountered: