0

My understanding of the double spending problem is as follows:

Suppose account A has 1 Bitcoin and sends it to account B and then creates another transaction which sends the same Bitcoin to account C. Some nodes may be notified about the first transaction first while other nodes may be notified of the second transaction first, leading to a conflict regarding which transaction actually occurred first and is the legitimate one.

If I understand correctly, mining solves this problem by forcing each miner to choose between one of the two transactions. But what happens if two miners receive two distinct transactions (A -> B vs. A -> C) and produce a hash at exactly the same time - won't each one still record a different sequence of events?

On a similar note, what happens if miners disagree about who produced the hash first? What happens if two nodes produce a hash at exactly the same moment? Some nodes will say miner x mined earlier others will disagree so how is this issue resolved? How does it end up that all nodes eventually agree unanimously and we don't constantly end up with different versions of the block chain?

0

You just have to wait. Eventually, another miner will produce a block and it will be on top of one or the other of the two blocks found at about the same time. The probability of again having two miners find blocks at about the same time is very low. The truly paranoid can wait for six blocks to be mined before relying on a transaction.

Persistent splits should be unlikely because the longer the chain you mine on top of, the higher the probability of you getting to keep the mining reward. If you mine on top of a chain that is one block shorter, you only tie the existing chain that other people are already mining on top of.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.