canoe icon indicating copy to clipboard operation
canoe copied to clipboard

Add support for seed sharing - so called foreign blocks

Open ThunderFD opened this issue 6 years ago • 11 comments

when doing transactions from a different wallet canoe can get out of sync.

canoe should detect this automatically and start the repair process automatically or launch a prompt to start the repair process.

-- or change the behavior to looking at the network by default.

ThunderFD avatar Mar 12 '18 15:03 ThunderFD

Not sure if it is a good idea running the same seed in different wallets, don't think average user will this do.

stefonarch avatar Mar 12 '18 16:03 stefonarch

well, I ran into this issue multiple times by now doing just that, and I think alot of people will use some desktop wallet e.g. nanovault and the same seed on mobile via canoe.

and even if it's just 10% of the possible userbase, that'd still be alot. and it doesn't worsen the experience for anyone

ThunderFD avatar Mar 12 '18 16:03 ThunderFD

I still think nobody should do this - just run different wallets on different devices, there is an address book where you can move funds from one to another, and it's also better for privacy.

stefonarch avatar Mar 12 '18 16:03 stefonarch

I have to side with @ThunderFD on this one. This is not good usability. Fixing this will also save us the headache of explaining this to freaked out users.

rtaibah avatar Mar 13 '18 08:03 rtaibah

I am not going to add an autorepair, that's a kludge. But I will add handling of "foreign" blocks - in other words - blocks coming from the outside that really shouldn't come from the outside. I also advice we should WARN the user in this case because it could also mean someone is USING YOUR SEED.

gokr avatar Mar 13 '18 14:03 gokr

oh yeah, a popup that the seed was used somewhere else when they launch the app is a good idea 🤔

like "either you or someone else used your seed outside of this wallet - ok"

ThunderFD avatar Mar 13 '18 14:03 ThunderFD

I did this. I have the same seed on my OSX and Android wallet. I did a "repair" on my Android wallet, after which the new transactions showed up. However, when I after that sent some money into the wallet, it only showed up on my OSX wallet. So it looks like I need to do a "repair" every time from then onwards on the wallet where the seed was installed first.

Fully agree on the popup warning.

Eothred avatar Apr 10 '18 06:04 Eothred

@Eothred Yeah... thanks for noting that, because that reminded me I also need to fix another issue to get this to work (the server side mapping account->CanoeId). It can then of course map to multiple Canoes, not just one.

gokr avatar Apr 23 '18 13:04 gokr

I think this is what we need:

  • Add multiple wallets instead of just one in canoed (the Redis map)
  • Handle incoming blocks that do not exist in Wallet, as if imported via resetChain
  • Add partial resetChain to fetchPendingBlocks - so that it doesn't only scan for sends, but also smartly scans for blocks in the chains that we do not have.

gokr avatar Apr 29 '18 12:04 gokr

I have now implemented multi-wallet support in canoed (using a Redis Set instead) plus proper logic. Next step is "Handle incoming blocks that do not exist in Wallet, as if imported via resetChain".

I also realized Canoe will need to be prepared for "pocketing races", since if you have two Canoes sharing the seed - they will now both (if both running) receive the incoming send - and both will try to pocket. Ideally only one should try, but... we may be sharing seed with Nanovault or whatever - so we can't really be smart about it. We can just try and be prepared to fail?

gokr avatar May 01 '18 21:05 gokr

Yes, and if Canoe fails, It tries to synch (like repair) right ?

ceddup avatar May 01 '18 21:05 ceddup