Bluewallet: Importing mixed BIP44/49/84 wallets impossible

Created on 31 Aug 2019  Â·  11Comments  Â·  Source: BlueWallet/BlueWallet

A Mycelium HD wallet imported into BlueWallet via the 12 seed words can yield a deviating balance, apparently when some transactions involve Bech32 addresses. See here:

https://github.com/mycelium-com/wallet-android/issues/483

In short, Mycelium uses a mixed approach, combining BIP 44, 49, and 84 into one HD wallet. Some other wallets do this too, but hardware wallets cannot do it, and BlueWallet has apparently also taken a different path, probably separate wallets.

To import a mixed wallet, I should be able to import the same wallet twice, once as a BIP49 wallet and once more as a BIP84 wallet. However, after importing it once, BlueWallet refuses to import from the same seed words again, although I choose different wallet styles (BIP49 and BIP84) for the two imports. This looks like a defect to me.

bug enhancement

All 11 comments

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.85. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Acknowledged. BW imports only single scheme, like BIP84 only, or BIP49 only.
I will add option to import several schemes with same mnemonics when I will be refactoring import procedure.

Is there a current priority or preference that BW takes when importing a mnemonic seed that utilizes multiple derivation paths? Does BIP84 take precedence over BIP44, for example?

First of all, BW tries to fetch transactions list, and whichever first has
non-zero transactions is imported. Its a cascade of ele-ifs and there is
some priority there obviously.

If no transactions were found, then if I remember correctly it is imported
as BIP49 at the moment (will be changed to BIP84 when we will make BIP84
the default wallet type).
The whole code that handles import is messy and I plan to refactor it
massively soon.

On Tue, 19 Nov 2019 at 15:57, clonmac notifications@github.com wrote:

Is there a current priority or preference that BW takes when importing a
mnemonic seed that utilizes multiple derivation paths? Does BIP84 take
precedence over BIP44, for example?

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/BlueWallet/BlueWallet/issues/631?email_source=notifications&email_token=AAOTD6KYCKNFW2W63EH7CL3QUQEEZA5CNFSM4ISTLIY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEOV4XY#issuecomment-555572831,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOTD6MI3BB6RXDKJVXVGXTQUQEEZANCNFSM4ISTLIYQ
.

Thanks for the response. That sounds like what I was hoping you'd say. I'm assuming when you say whichever first has non-zero transactions, that means scanning from the most recent block backward in time, correct (most recent txn)? That would be ideal and can at least be gamed to allow for importing of the proper derivation scheme that is needed or being used most recently.

Sorry for late reply.
Not exactly, BW uses electrum server, so we can instantly see which address
has transactions. So we just take a batch of about 20 addresses in each
hierarchy (BIP84, BIP49, BIP44), and check which hierarchy has any
transactions.

On Sat, 23 Nov 2019 at 01:02, clonmac notifications@github.com wrote:

Thanks for the response. That sounds like what I was hoping you'd say. I'm
assuming when you say whichever first has non-zero transactions, that means
scanning from the most recent block backward in time, correct (most recent
txn)? That would be ideal and can at least be gamed to allow for importing
of the proper derivation scheme that is needed or being used most recently.

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/BlueWallet/BlueWallet/issues/631?email_source=notifications&email_token=AAOTD6KFJZDVUQNVRJV5G3DQVB6JNA5CNFSM4ISTLIY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7JALY#issuecomment-557748271,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOTD6P3OIP5HZLOKECTX2TQVB6JNANCNFSM4ISTLIYQ
.

Sorry for late reply. Not exactly, BW uses electrum server, so we can instantly see which address has transactions. So we just take a batch of about 20 addresses in each hierarchy (BIP84, BIP49, BIP44), and check which hierarchy has any transactions.

No worries. I was having a look around myself as well. It looks like according to here it looks for any current balances first (BIP84, BIP49, BIP44 respectively), then if no balances, it will check for transactions in that order. I can work with that. Thanks!

This also applies to importing mycelium pubkeys. Mycelium uses both xpub, ypub and zpub for public keys (m/44'/0', m/49'/0', m/84'/0'). You can import these individually.

Ideally, these would be shown in the UI as one wallet
And the user should only need to import the key once in the interface

I never used mycelium, do you have a mycelium backup I can use for tests? maybe some old wallet that's empty and not used anymore? --> [email protected]

mycelium has a testnet wallet on the Android playstore that can be used for testing

https://play.google.com/store/apps/details?id=com.mycelium.testnetwallet

that wont work for me

On Fri, 18 Dec 2020 at 13:37, Ben notifications@github.com wrote:

mycelium has a testnet wallet on the Android playstore that can be used
for testing

https://play.google.com/store/apps/details?id=com.mycelium.testnetwallet

—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/BlueWallet/BlueWallet/issues/631#issuecomment-748088388,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOTD6JTOTCHSQYKGEKR56DSVNLK5ANCNFSM4ISTLIYQ
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ncoelho picture ncoelho  Â·  6Comments

Blockgazer picture Blockgazer  Â·  7Comments

mang000 picture mang000  Â·  5Comments

jpthor picture jpthor  Â·  5Comments

TheFuzzStone picture TheFuzzStone  Â·  3Comments