2
3
One article I am reading said that proof of work system is used in Bitcoin to prevent double spending. More particularly:
Imagine we are protecting against double spending in following way. When Bob receives transaction from Alice saying that "Alice transfers some 1234 BTC to Bob", bob would broadcast this to entire network to ask them to verify whether this is a legitimate transaction. In the mean time say if Alice had sent also same message to Charlie (saying that she is transfering same 1234 BTC to Charlie), Charlie would have also broadcast this message and other nodes on the network would spot that Alice is trying to spend same 1234 BTC with two persons, and they would let Bob (or Charlie) know that this is invalid transaction. Or if all is ok Bob or Charlie would wait till some nodes send acknowledgment that this is valid transaction.
SOCK PUPPET ATTACK: Above scheme would work but Alice could cheat in the following way. She could create say one million fake identities on network, and they would lie to Bob and Charlie that the transactions was valid- making them accept payment.
Now comes my question. It seems proof of work was introduced in Bitcoin to prevent exactly the above kind of sock poppet attack. But I fail to see how proof of work helps protect against above sock puppet attack. Why would Alice not be able to introduce those fake 100000 identities on the network anymore?
Can someone ealaborate and explain?
ps. I know what proof of work is, this question is more related how and why it prevents above mentioned sock puppet attack.
@AndrewChow You did not answer the question how the attack is blocked. – rapt – 2019-08-21T17:17:16.477
you may want to read the question once again. Only block chain would not suffice. All nodes have blockchain locally. So as in question if alice simultaneously sends same transaction to bob and charlie in both users' blockchain it would seem that the transaction is valid (because that coin has not been spent yet). So you need a consesus protocol where bob and charlie would ask for example whole network if the transaction they receive is OK. but there comes the sock puppet attack I mentioned. – None – 2017-10-26T18:30:24.643
That's not how the blockchain works. The blockchain is the consensus protocol where Bob and Charlie asks the network whether the transaction they receive is ok. The blockchain is not something that is added to locally when new transactions are received. It is added to locally when new blocks are received, and new blocks can only be created by performing the proof of work. Blocks and transactions must also conform to the consensus rules that the node is following. Those rules also include double spend protection. – Andrew Chow – 2017-10-26T18:33:24.743
Here is article I referred to: http://www.michaelnielsen.org/ddi/how-the-bitcoin-protocol-actually-works/. Section "proof of work"
– None – 2017-10-26T18:42:07.037And besides can you then explain (maybe in answer) WHY proof of work was added to bitcoin? what purpose does it serve? – None – 2017-10-26T18:42:54.357
I have updated my answer – Andrew Chow – 2017-10-27T00:00:35.453
Does it mean that the node have to search through all the blocks in the block chain (up until the generation of the output that it spends from) to confirm that the outputs that it spends from have not been spent by any other transaction in the blockchain? – qianfg – 2018-09-18T08:48:20.353
@qianfg Yes, but there are smarter ways to do that than actually searching through the blockchain for every transaction. – Andrew Chow – 2018-09-18T13:21:13.093