Working with wallets with the same seed phrase on multiple devices: what do you need to know
- DO NOT SIMULTANEOUSLY RUN TWO WALLETS INITIATED FROM THE SAME SEED PHRASE. No funds will be lost in any case, please keep reading for details.
- If you really want to run two wallets (read: geek mode), initiated from the same seed phrase, make sure each wallet is connected to the node configured with the owner key (which is derived from the seed phrase). The related configuration process is beyond the scope of this article.
- Even if two wallets are connected with such a node which is properly configured with the owner key, the transaction history will not be syncronized among them (each wallet will see the correct balance but only its own transaction history).
Where should I start?
“Ok, guys, this is not an easy subject, but hear me out first…”
While we are doing our best to build an extremely user-friendly ecosystem around the Mimblewimble protocol (which is great regarding privacy and is also great to keep the blockchain growths in check), some inherent (and hopefully temporary) limitations are yet to be clarified.
I won’t hold your time explaining the “basic” UX aspects such as generating and managing multiple addresses or popping online within a reasonable timeframe to “catch” the incoming transactions. Rather, I’d like to shed some light on what happens when more than one device operates with wallets from the same seed phrase.
The explanations below are intentionally oversimplified so that everyone would get an idea of how things work. Those brave who’d like to understand the technical nuts and bolts are invited to look into the Beam specs and the code of course.
What Wallet is for?
Wallet tasks are actually simple:
- Help the user to create a wallet, verifying a newly-generated seed phrase
- “Talk” directly to other wallets when sending and receiving BEAM (this is where some cryptographic magic is done with spent and received UTXO)
- Manage your info such as transactions, addresses, and UTXO in an effective and eye-pleasing way
That’s mostly it! Being a fairly complex piece of software, a wallet relies on the node in almost everything else.
What Node is for?
Node is the one who helps to manage most of the blockchain-related aspects:
- Register spent and newly-generated UTXO from every transaction with the blockchain. Again, under the hood, after two wallets cryptographically agreed about the transaction details, the transaction result should be validated and registered with the blockchain. I repeat: the transaction result includes only UTXO and no other transaction details: addresses, IPs, etc — that information is only known to the wallet instance, involved in that specific transaction.
- Help the wallet to restore the balance (read: find all your UTXO, related to the master key derived from once generated seed phrase). What happens under the hood: the node receives an owner key from the wallet (which is derived from the seed phase), the node downloads the blockchain snapshot (read: all the UTXO and macroblocks) and performs a full-scan to find UTXO that match your seed phrase. Tadaaaam! This is why it’s extremely important to connect to the node you trust — it knows enough about you to say the least.
What kinds of nodes can I have?
- Integrated node: the best-recommended transparent option for those who want it “secure and simple”. The node is integrated with the wallet (read: it knows wallet’s owner key, derived from the seed phrase), so the sensitive info will not leave your machine.
- Your specific node, configured with the owner key: for those geeky experts who like to drive manual gear bikes. Run your own node anywhere (e.g. your local machine or elsewhere in the cloud), configure the node to work with the wallet (read: retrieve the owner key from the wallet and deploy it in your node) and voila: when done right the node is as powerful as an integrated node. Therefore, deploy your owner key with extreme care as it allows to sees all UTXO that belong to you.
- Your specific node, which is not configured with the owner key. Besides the ownership fact, it not much different from а random node (explained in 3.. 2.. 1..)
- Random node: this node which is not yours runs somewhere in the cloud, therefore it’s much less trustworthy by definition and it won’t have the owner key. The node is only supplied with the minimum cryptographical information to register your active transactions with the blockchain, but nothing more. I repeat: a random node is only aware of transactions of the specific wallet instance, connected to the node. For transactions created with your other wallets (even those stemming from the same seed phrase) — a random node knows nothing about their related UTXO. Therefore, a random node is not aware of any changes in your balance. Now you see where I’m getting at, right?
- Integrated and Specific nodes are wallet’s friends, they know the owner key and can “fish” from the blockchain every single UTXO, related to the wallet seed phrase. They can monitor your actual balance but not transaction history (as it’s not saved on the blockchain).
- A random node knows nothing besides the transactions of the specific wallet instance, currently connected to it, it can’t monitor any UTXO created or spent by other wallets, even configured with the same seed phrase. Therefore it is not aware of any balance changes, produced by these other wallets.
Which type of node a mobile wallet can run?
None. The current implementation of Beam node can run on desktop only, therefore a mobile wallet can be connected either to a random node (somewhere in the cloud) or to a specific node (on one of your dedicated machines).
I dare to say that for less geeky folks, the mobile wallet will be connected to the random node only.
What does it mean for me?
The tradeoff of being connected to the random node is that “external” balance changes (i.e. produced with other wallets of yours) will not be reflected in the current wallet. Your mobile wallet connected to a random node won’t be aware whether your other wallets (configured with the same seed phrase) created or spent any UTXO. That might result in un-updated balance and by-design failing transactions (as your funds are always safe).
Learning by example
Suppose you have two wallets on two different laptops, restored from the single seed phrase AND both wallets use integrated or specific nodes (i.e. they know the owner key). In that case, if one wallet modifies the balance (i.e. sends or receives the UTXO), the other wallet continuously monitors the blockchain and will discover spent or received UTXO. Balances in both wallets are in perfect sync. BUT even in that case, there’s still a significant drawback: the transaction history won’t be shared.
Now, suppose you have a mobile wallet (connected to a random node) and a desktop wallet (connected to the integrated node). In that case, the mobile wallet is absolutely not aware of the desktop wallet transactions. The desktop wallet will always have the most updated balance but will remain unaware of the mobile wallet transaction history.
Bottom line (and best practices)
- A wallet connected to the random node is not aware of anything but transactions, directly related to it. In case there is another wallet, created/restored from the same seed phrase — the mobile wallet won’t have the updated balance and transactions might fail (simply when UTXO have been already spent by the desktop wallet).
- When managing several wallets (desktop and mobile), the best practice is to have each wallet initiated with its own seed phrase. I repeat: do not share seed across simultaneously active devices.
- If you really want to run two wallets with the same seed in a safe and secure manner, you can configure your own node in the cloud: here’s how.
It takes time to attend every usability gap, inherent to Mimblewimble. We are actively exploring several ways on how to properly orchestrate same-seed-phrase wallets so that updated transaction history and balance will stay in sync. While doing our best to clarify the related tradeoffs in a clean and concise way, we are perfectly aware of these “less comfortable” cases and keep doing our best to make our products more simple and transparent with every release.
Stay tuned and help us to make the wallet better. You know where to find us :)
Come discover Beam and join our community!
Download Beam iOS Wallet on App Store
Download Beam Android Wallet on Google Play
QQ Beam 中国官方社区: https://jq.qq.com/?_wv=1027&k=5Mbs8N4