
Not long ago, adapted from the Nintendo game movie of the same name"Pokémon: Detective Pikachu"Post movie trailers. We just found out thatPokémonIt has been 21 years since it was released, and the phrase "Go, Pikachu" has become the mantra of many people.
Before you are familiar with all kinds of cryptocurrencies in the currency circle, Bulbasaur, Charmander and Pikachu... these characters have already become a touch of your childhood memory.
Imagine we are back in school days again.
You and your friends are sitting in groups on the school playground, holding a stack of Pokémon cards in your hands, sharing each other's latest treasures. You see in your friend’s hand a Kodak that you’ve always wanted, and you also have a piece of Squirrel that your friend has been coveting for a long time. Finally, under the envious eyes of everyone, you decided to exchange these two cards. Apparently, this swap wasn't tricky. You and your friends are filled with joy—each of you got your favorite card.
"You're a big kid, it's time to learn to make up your own mind." Mom always tells you that.
At the age of 10, you don't need to call the head teacher to supervise the card exchange, and you don't need to guarantee whether the exchange is correct. The little friends sitting together already know that the Duck card has a new owner, and this is exchanged for the Squirrel card in your hand. You and your friends are still full of ideas, but it's time for "Mom told you to go home for dinner". You might enjoy it for days, and that's what simple childhood is all about.
But now, let's change the scene - what if the exchange is a digital version of Pokémon?
I have a rare card from this deck in my hand, and I want to make a deal with you.
"People change." Your friends always say that.
I'm a little witty ghost, before transferring this card to you, you can't guarantee whether I will do anything. I might have made a copy on my computer ahead of time and yelled at everyone "This is the only copy, buy it and earn it."
This is a sad outcome for you and the entire Pokémon community. A rare card is now worthless because of "bad street".
In the digital world, we call this problemdouble payment. Simply put, the same money is spent twice.image description
Some game characters of Nintendo
At this time, you may need a "class teacher".
We can use the ledger to track transactions between each other, andnintendoIt is necessary to monopolize the power and take charge of this important ledger. Using this ledger, Nintendo can oversee the trade of every digital Pokémon, making sure no one “gets rich” by copying it—everyone is a decent character.
The seemingly perfect solution also seems to have loopholes. Now there is a third party in the transaction between us. Whether you like it or not, we have to go through this middleman to complete the transaction. At the same time, we must fully trust the third party, and believe that Tiantang will not "sneak and play tricks" and will not tamper with the ledger at will.
The question then arises, if a Nintendo employee's younger brother is also a Pokémon fan, how can you be sure that the rare card I want to give you has not been secretly copied to his younger brother by a Nintendo employee?
Indeed, we cannot guarantee 100% that the ledger will not be changed.
Now, you may be up to the duck.
Let's continue to try to open up the brain hole. What if the ledger is not kept on a computer at Nintendo's headquarters, but a ledger is provided for every Pokémon trader?
There are hundreds of millions of Pokémon game fans and fans around the world, so there will be hundreds of millions of copies of the ledger. When I send you this rare card, everyone will be notified of the transfer accordingly.
The ledger will show that there is one and only one of this rare card. If I am a naughty ghost, I secretly copied a few and kept them in my account. But my copy of the ledger will be inconsistent with other people's ledgers, and these duplicate cards are useless.
You may have questions, how does the entire network verify that each other's cards are not duplicate cards?
Koda Ya frowned, realizing that things were not simple.
Suppose there are 1,000 computers participating in the Pokemon trading network, which we call nodes.All nodes have a copy of the shared ledger and can communicate with each other. The purpose of these nodes is to independently verify the transaction information of each Pokémon.
These nodes must agree on what the ledger says about card transactions that occur on the network. If there is a transaction between us, the transaction will be placed in a temporary unconfirmed transaction pool, waiting for confirmation. These nodes then compete to validate unconfirmed transactions within a given time.
These nodes are miners, and they compete to be the first to validate the set of transactions, known as a block. In return, they will receive Pokémon cards.image description
Illustration: Crypto for Beginners
Next, miners compete to be the first to validate a new block.With the help of "prehistoric power", that is, spending a lot of moneycomputing powerSolve the encryption puzzle to achieve this goal. The network will require miners to do a lot of work to verify each block, so as not to use their brains.
Once a miner finds a solution to the cryptographic puzzle of verifying a block, it will "check in" the block, i.e.digital signature, to prove that this block has been verified, that is, the card transaction between me and you is valid. At the same time, the miner notifies this information to other nodes in the network. Miners then distribute the verified blocks to other nodes and are rewarded with Pokémon cards. As new transactions are generated, other nodes will also update their ledgers in a timely manner.
However, nodes cannot truly trust each other. Therefore, whenever a new block is generated, each node will check each transaction information in the block according to the transaction records to see if there is a double payment problem. This is how network nodes reach consensus.
But imagine that I send you a card offering to trade it for something in the real world, like the hamburger you had for lunch today. You think this transaction is not a loss, but I also have my own calculations. I took your hamburger and immediately retried to resend the card I gave you, what happens?
Assuming that card A is issued to you for the first time, and card B is issued for the second time, this has constituted an illegal double payment. The node does not favor either side, because it does not know which of the two is correct, so how does it decide? Both A and B will enter the transaction pool waiting to be verified, and will usually be put into the block in chronological order, but sometimes not.
Since the blockchain is verified sequentially in chronological order, the later the transaction in the chain, the more secure it is. If B is verified first, the ledger will recognize B as a valid transaction and A as a double payment.
How to avoid losing the "hamburger" and losing the "card"? Your best option is to wait. It is very unlikely that the network will accept both transaction spends, so there will always be one payment that will be declined. It's just a matter of time, keep the years quiet and you'll see which payment is included in the next block.
If after waiting at least 10 minutes or more, I think about being smart again. At this time, the network nodes have basically confirmed that A is a valid transaction, and it is meaningless to send B again. "Pay with one hand, and deliver with one hand." You get a new card, and I can only accept your lunch.
What if I don't want to be a good person and don't play my cards right? Can you delete the payment information sent for the first time from the payment record by re-checking the ledger. So I can trade that card again and get more free lunches?
You must think that you are smart and cute, like Pikachu who can discharge electricity. However, this is not the case.
The transaction is stored in a block, and these blocks are linearly linked in time. Therefore, the block of information storing the transaction record between me and you may be hidden behind a string of information blocks. If 9 new blocks have been added since my first transaction, I can still find the block that recorded this transaction and delete it.
The movements seem to be flowing and flowing, seamless? No, there are flaws.
Remember the digital signature on every block? It is generated based on the information in the block. Therefore, you think that a "God knows" data deletion will automatically change the signature.
To make matters worse, the digital signature of each block after the block that records your transaction information is also determined by its previous signature."Take a hair and move the whole body." If the previous signature is modified, the signatures of all blocks behind it will also be changed accordingly.
In order to eat a few more free lunches, I had to modify the signature of the tenth block, and the signatures of the next 9 updated blocks must also be modified.
The bad things don't stop there.
The above-mentioned wave of operations can only be performed on my copy of the ledger. The transaction between you and me has been known by other nodes, but the deleteable transaction has not. Other ledgers are happy to reach a consensus on completed transactions, so I have to modify more than half of the node ledgers in the network to achieve consensus.
But just changing the digital signature in multiple blocks, the computer is already a little "powerless", and at the same time it needs to consume an astonishing amount of power-at this time, I may feel more distressed about this month's electricity bill.
This is too much for me, I choose to give up.
In this way, we have created an open, decentralized, irreversible, tamper-proof digital network for trading Pokémon cards and other assets. And that's a simplified version of how Bitcoin and blockchain technology work. Clearly, this technology is what sets Bitcoin apart.
Maybe the names of some characters are difficult to remember for a while, but these familiar elves, after growing up with you, now make the obscure blockchain technology simple and interesting. The blockchain allows us to see a trace of the early Internet, just like we can still revisit our childhood from these elves.