Bitcoin Forum
April 30, 2017, 11:06:02 AM *
News: If the forum does not load normally for you, please send me a traceroute.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [PULL] monitor incoming transactions for spends from self  (Read 2076 times)
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
April 14, 2011, 12:42:49 PM
 #1

Bitcoin currently does not check whether transactions received from the P2P network contain spends from your own addresses. Presumably because this was considered an impossible situation, but it happens when people copy wallet.dat files around.

This checking is done anyway when rescanning, and a full rescan of the entire realnet blockchain currently takes 11s on my old laptop, so I think the overhead of doing this check on incoming transactions as well, is very limited.

This issue was mentioned here before: http://bitcointalk.org/index.php?topic=3638.msg52145#msg52145.

Pull request is here: https://github.com/bitcoin/bitcoin/pull/157

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
1493550362
Hero Member
*
Offline Offline

Posts: 1493550362

View Profile Personal Message (Offline)

Ignore
1493550362
Reply with quote  #2

1493550362
Report to moderator
There are several different types of Bitcoin clients. Server-assisted clients like blockchain.info rely on centralized servers to do their network verification for them. Although the server can't steal the client's bitcoins directly, it can easily execute double-spending-style attacks against the client.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
khal
Hero Member
*****
Offline Offline

Activity: 538


NamecoinID: id/khal


View Profile WWW
April 14, 2011, 01:28:47 PM
 #2

Your patch is usefull when you have two copies of your wallet running at the same time ?

For an offline wallet, a partial rescan is needed with your complementary patch : https://github.com/bitcoin/bitcoin/pull/152

Good job Smiley

NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9 | NamecoinID: id/khal | Register .bit domain
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T | My bitcoin Identity: send messages to bitcoin users
Free bitcoins: Surf4Bitcoin.com | Charity Ad: Make a good deed without paying a cent
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
April 14, 2011, 01:37:10 PM
 #3

Basically yes, both cover part of the problem of using the same key(s) on different installations.

One problem still remains though: if you try to spend coins from node A, while node B already spent them without A knowing about it, it will happily create a transaction and assume it will be accepted by the network, which it won't, possibly leaving you with a corrupted wallet forever. So, even though some wallet-sharing issues are already covered, it can still be dangerous.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!