-
Notifications
You must be signed in to change notification settings - Fork 24
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
Trezor shows different address than electrum-nmc #3
Comments
@matso167 Hi, thanks for the bug report. Debugging this will be Fun (TM) since I don't have a Trezor available to test this, but I suspect that this issue is either due to an incorrect prefix, or an incorrect HD wallet chaincode. Can you tell me whether the prefix is correct or incorrect on both the Trezor and in Electrum-NMC? (If you're not sure how to check this, this can be approximated by telling me the first character of each address.) Cheers! |
Trezor displays "BTC Legacy Account" starting with 1 while electrum-nmc address starts with N. |
Thanks @matso167. Do you happen to use any Bitcoin forks besides Namecoin with Electrum + your Trezor? If so, can you point me to the source code of one of them? I'd guess that it should be easy to diff the relevant areas of code to see what I missed. |
Sorry cant help with source codes. |
@matso167 On a hunch, can you try changing the word "Bitcoin" to "Namecoin" in this line? electrum-nmc/plugins/trezor/trezor.py Line 177 in 14d5d24
|
Nothing happens with that change |
Hmm. I'll have to do some more digging; I'll see if I can track down the issue in the next few days. |
I did some more digging. I'm not very familiar with python environment, so I dindn't know I had to run Now when i changed that Bitcoin -> Namecoin, Trezor displays warning: "Wrong address path for selected coin. Continue at your own risk!" Derivation path I'm using is: Not sure what derivation path is best supported on Namecoin. After pressing Continue, I get same address as in electrum-nmc. Account name is still BTC legacy account. |
m/49'/0'/0' and m/84'/0'/0' derivation paths give error "cant encode address". |
@matso167 Ah, excellent, that is progress. Where are you changing the derivation path? I'm not sure exactly where you are in the code. On a hunch, can you try changing the 0 at the end of this line to 7 and tell me what happens? Line 712 in 989c9c2
Thanks for your help so far on this! |
FWIW, I usually run |
Derivation path is asked in UI :) |
After changing that 0 to 7, it works! No more warning on Trezor. |
Excellent! And just to verify, the Trezor and Electrum-NMC GUI are still matching each other after you made that change? (I expect that that modification will change the addresses that are produced, but it should change in the same way on the Trezor and on Electrum-NMC.) |
Yes addresses match. |
Great! Thank you so much for helping debug this. I'll commit the relevant changes to the Git repo when I have a few minutes (sometime before the next release). Would you like me to credit you on the Namecoin.org news section when the fixes are released? If so, what name should I credit you as? |
Not necessary. Nice to get it working with Trezor :) |
Hello, this also works with a Trezor T. Both changes are necessary:
Good work Jeremy. I will play around with some coins in the next few days and will report. |
FYI, I sent some namecoins to an address generated by the Trezor T today and the transaction was recognized by electrum-nmc. Tomorrow or so, I will test, whether I can spent those coins too. |
The more interesting part of the exercise also worked. I spent the coins. Worked like a charm. Transaction is already written to the namecoin blockchain. However, I tried to sent the coins without fee. Electrum-nmc complained, that there were insufficient funds. So I pressed the max-button on the send pane, and it filled in some tiny fee. But I can see in the mempool, that there are also transactions without fee (https://bchain.info/NMC/). Maybe I used the software wrongly, since it was my second transaction with an electrum variant. |
@curiosity81 I wouldn't be surprised if Electrum doesn't let you send zero-fee transactions, since those haven't been allowed on Bitcoin's network for many years. (I have no idea why the Namecoin miners are willing to mine them; if I were mining Namecoin I'd be refusing to mine those.) I don't see much point in trying to patch Electrum-NMC to change Electrum's behavior on this. |
Did it work for you? Because of the failed build (#3) in "Make Trezor work with Namecoin" ... I could test the current code if needed. |
62cfe26 Namecoin: change BIP44 coin type from Bitcoin to Namecoin. (JeremyRand) c50d2a1 Namecoin: Trezor: Use Namecoin as coin name instead of Bitcoin. (JeremyRand) 3e56419 Namecoin: rebrand Trezor UI. (JeremyRand) Pull request description: Fixes #3 I've successfully sent some NMC from Namecoin Core to Electrum-NMC and back with this PR. Note that testing this may be tricky, since master branch currently seems to have some breakage with blockchain validation (unrelated to Trezor). If anyone really wants to test before the master branch is fixed, let me know and I'll try to assist.
On receive tab, when eye icon is clicked, Trezor shows different address on its screen than whats displayed in electrum-nmc.
electrum-nmc 3.1.3-beta1
MacOS
Trezor One
The text was updated successfully, but these errors were encountered: