paritytech / paritytech/host-rust-core
Coinage on 2 mobile devices: simple warning/handover
@valentunn is already working on this.
Since Sep 11, 2026.
- Dominant language
- Swift
- Stars
- 10
- Forks
- 3
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 148
Description
Problem
In the rare case where one user logs in with the same account to 2 mobile devices, their coinage balances will not be in sync, which will cause loss of trust to the app.
Raised by @gp0p3:
The balance in the app, the $CASH amount.
How I see this issue.
I set up phone A and use it for a while.
I set up phone B on the same mnemonic. At setup, it reads the installations from the contract, scans A's subtree, and saves what it finds. Both phones agree at this point. My balance is synced.
Someone pays me in chat. Both phones see the message, and both try to claim. A wins, the coins land in A's subtree, B shows a failed reception for money that did arrive.
A shows the new total, B still shows the old one, because it only scans another subtree at setup.
So B drifts as soon as anything happens on A. Paying from either phone desyncs them further. So now I have two different balances displayed, living completely separately.And the first phone is worse off than the second. The scan runs at setup, so A never scanned B at all, since B didn't exist yet. A is blind to that subtree from the start.
So at some point neither phone shows the real total. A is missing B's subtree entirely, B is holding a stale picture of A's, and each is only right about its own coins.
If the plan is to re-scan the other installations periodically rather than only at setup, that answers all of it.
Simple solution by @valentunn
The most practical thing to me would be to show some warning near coinage balance after second install saying "Please dont use app concurrently"
Or better, only allow 1 device to use coinage by having a "handover" button similar to what Spotify had before they figured out multi-session. Then re-sync can naturally happen after current device becomes active
P.S. Not strictly a blocker for R2, but a nice-to-have.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.