Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: lukew on November 04, 2018, 06:01:28 PM



Title: Payment to one Core wallet received by another?!?!
Post by: lukew on November 04, 2018, 06:01:28 PM
I have a test network setup and currently I'm on Testnet as I can't get a connection to my Regtest node from an Android wallet.

I have my development machine running a testnet node, and another machine running it's own testnet node. I've got the second machine (a prototype kiosk) connected to the network as normal with my development machine as a preferred peer (to download a few years of data faster). I've just made a payment from mobile wallet to the kiosk and it's been recieved by both machines. Tried the other way too, payment requested on my development machine is received by both nodes. The only command line args are "-testnet -addnode=192.168.1.8" on the kiosk and "-testnet" on dev machine.

I have also taken one node offline, sent payment to the other and when the first is started again, it receives the payment too.

The kiosk node up until last night hadn't been online for over 2 years, there's no way they are sharing a wallet.dat and I'm really confused.

Any ideas?

Edit: just noticed they both have the same balance and same transaction history.

Edit2: Made payment on one node, and a minute or so later, the other node also gave a transaction sent notification, but not recieved twice in mobile wallet.


Title: Re: Payment to one Core wallet received by another?!?!
Post by: HCP on November 05, 2018, 02:36:25 AM
Basically, both of your nodes are identifying transactions that belong to particular public keys that are contained within their respective wallet files. So, it would appear that you either have the same "wallet.dat" on each node... or the wallet files on each node contain the same public (or private) keys.

The way you have setup your network really makes no difference, neither does the "addnode" commandline args etc... The only way for this to happen, is that both nodes have the same keys.


Edit: just noticed they both have the same balance and same transaction history.
This pretty much confirms it.


Quote
Edit2: Made payment on one node, and a minute or so later, the other node also gave a transaction sent notification, but not recieved twice in mobile wallet.
It isn't making a second transaction... it is just "seeing" the original transaction.

Think of it like looking at your internet banking on your desktop computer (node 1)... and sending money to a friend.... then you look at the internet banking on your mobile device (node 2)... it'll show the same transaction, but doesn't mean that you have sent the money to your friend twice! :P


Title: Re: Payment to one Core wallet received by another?!?!
Post by: lukew on November 05, 2018, 09:15:26 PM
Basically, both of your nodes are identifying transactions that belong to particular public keys that are contained within their respective wallet files. So, it would appear that you either have the same "wallet.dat" on each node... or the wallet files on each node contain the same public (or private) keys.

The way you have setup your network really makes no difference, neither does the "addnode" commandline args etc... The only way for this to happen, is that both nodes have the same keys.


Edit: just noticed they both have the same balance and same transaction history.
This pretty much confirms it.


Quote
Edit2: Made payment on one node, and a minute or so later, the other node also gave a transaction sent notification, but not recieved twice in mobile wallet.
It isn't making a second transaction... it is just "seeing" the original transaction.

Think of it like looking at your internet banking on your desktop computer (node 1)... and sending money to a friend.... then you look at the internet banking on your mobile device (node 2)... it'll show the same transaction, but doesn't mean that you have sent the money to your friend twice! :P

I think what's happened is years back I'd have copied the entire Bitcoin folder from one machine to another as syncing with an Atom D510 was extremely slow. I may use this odd situation to my advantage and see if I can use it to try double spending on Testnet. I know it wont do it, but I could do with testing my application out in that situation, both sending and receiving a double spent coin.


Title: Re: Payment to one Core wallet received by another?!?!
Post by: Thirdspace on November 05, 2018, 11:56:17 PM
I think what's happened is years back I'd have copied the entire Bitcoin folder from one machine to another as syncing with an Atom D510 was extremely slow. ...
that's the reason both nodes have the same transaction history,
you copied the whole folder and made duplicate wallet on different machine
HCP's example of internet banking on desktop computer and mobile device perfectly explained it