Block chain [5] You say give me a million, so the question is

Last issue discussed how to authenticate, and now we know how to confirm a broadcast message is not sent by me. Now suppose that received a broadcast, the content is paid to Bob Alice one million bits coins, authenticated, confirmation is issued by himself, without tampering. So the question is, Alice there is no one million bits coins do?

How to check the balance of it? We know that a lot of the block chain is the transaction information, a block of a block package, then it is to wear a string, chain together, and everyone in the use of bitcoin block chain, will download all the blocks, starting with the first block of Genesis until the latest block, so if one day Alice said, I want to pay Bob ten bits coins, and take it out to the broadcast, others receiving this message, it the need for balance check. How to check? By tracing. All transaction information of Alice, one by one traced from back to front. For example, Alice's first transaction information is obtained by mining bitcoins 50, the second is to pay someone 40 Bitcoin, then there is no record, then we can know, Alice is now in the balance 10, enough to pay, this transaction information will be accepted whole network.

Now suppose, Alice is only 10 bits coins, but she also sent two broadcast content is Bob and Carl were to pay 10 Bitcoin, this time how can we come to identify it?

Because of network delays, some people will first receiving the first message, some people will first received second message. After each user who receives a message to Alice, the balance will be verified, before receiving the first message people, the second message will be rejected. Similarly, the second message is received first, it will reject the first messages. At this point, both received the first message of the people, but also to receive a second message of the people, but it does not matter, transaction information has not been confirmed until a lucky find a solution that maths problem, then packaged a new block, the chain up into the main chain. After generating a new block, other people will give up their own block, to receive the new block, which means a double payment in a transaction information is confirmed, the other abandoned. In this way, the problem of double payment was resolved. So, when someone receives the time of payment, not at the time think Bitcoin been credited into account, and must wait until the new block is generated, payment information has been recorded in the main chain, is the real arrival.

I was Rambo hr, today's block chain to talk to here, we see the next issue!

Guess you like

Origin www.cnblogs.com/lenbor/p/12660929.html