Bitcoin Forum
October 02, 2025, 02:11:49 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: I feel a bit confused on how Bitcoin solves the double-spending problem on: September 17, 2014, 05:43:41 PM
1. When the miner checks the transaction from Alice to Dan, will the miner actually reject this transaction (because the miner has checked the transaction from Alice to Bob before and recorded the bitcoin deduction in Alice's address) ?
Yes. When checking the validity of a particular transaction, all transactions in the block the miner is working on are taken into account. Conflicting transactions are invalid and rejected. Conversely, a chain of dependent transactions (Alice pays Bob, Bob pays Dan) within the same block is perfectly valid.

2. If, somehow, a bad block is included in the block chain, will other miners be able to pull it out later ? By saying a bad block, I meant, for example, the block contains some invalid transactions.
It will never be included in the blockchain in the first place. All other nodes will reject it immediately.

That answered my questions. Thanks.
2  Bitcoin / Development & Technical Discussion / I feel a bit confused on how Bitcoin solves the double-spending problem on: September 17, 2014, 06:10:27 AM
Say Alice has 5BTC in one of her bitcoin address.

She creates two transactions to Bob and Dan at the same time, each of 5BTC from the same address, i.e. she tries to double-spend.

Because these two transactions are created at the same time, they are very likely to be collected in the same block that some miners are working on. Suppose one miner collects these two transactions. He checks the validity of the transactions. Assume he checks the transaction from Alice to Bob first. He finds that it is a valid transaction. But at this time, the block hasn't been put into the block chain. Therefore Alice's address's information hasn't been updated (there should still be 5BTC in the address). Then the miner goes on to check the transaction from Alice to Dan. He should find that it is also valid. Assume this miner is the first one to find the proof of work for this block. He will then put the block into the block chain. And in that way Alice has spent the same 5BTC twice.

I must got something wrong somewhere.

I think there is a couple of places I don't quite understand:

1. When the miner checks the transaction from Alice to Dan, will the miner actually reject this transaction (because the miner has checked the transaction from Alice to Bob before and recorded the bitcoin deduction in Alice's address) ?

2. If, somehow, a bad block is included in the block chain, will other miners be able to pull it out later ? By saying a bad block, I meant, for example, the block contains some invalid transactions.

Thanks for help.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!