Big Data Abstracts Compiled by: Xiaoyu, Jiang Baoshang An “old miner” uses 5,000 words to explain the working principle of blockchain: decentralization, distributed storage, hash function encryption, what are these? Unless you live in the middle of nowhere, you’ve heard of Bitcoin and blockchain. After all, they are one of the hottest topics right now and have been voted as buzzwords of the year. Even people who have never touched digital currency or know how it works are talking about blockchain. When it came to understanding these new technologies, my friends who didn’t have a technical background were “confused” and they pestered me for weeks to explain what blockchain was. As a veteran Bitcoin miner, I wrote this article in the simplest and most understandable language to help everyone understand the most popular trends.
“For every complex problem, there is an answer that seems simple and obvious but is actually wrong.” —— HL Mencken Unlike other articles that try to define blockchain at the beginning, I will first explain the problem it solves. Imagine your best friend Joe is traveling abroad and suddenly calls you and says, "I'm totally out of money. Can you lend me some money?" Because you are a warm-hearted person, you say, "I'll call you right away." Then, you call your bank account manager and say, "Transfer $1,000 from my account to Joe's account." Your account manager responds: “Yes, sir.” He logs into your account and checks to see if you have enough balance to transfer $1,000. You are wealthy and have enough money to transfer, so he enters the following in a form: Later, you call Joe and tell him, "I sent you $1,000. You can go to the bank and withdraw the money." Throughout the process, you and Joe both trust the bank to manage your money. The above transaction process does not involve real money, but only requires modification in a table. More precisely, this table is not owned or directly controlled by you and Joe. This is the problem with the current system: in order to build mutual trust among us, we need to turn to an independent third party. For many years, we have relied on “middlemen” to trust each other. You may ask, “What problems does this middleman system bring?” The problem is that the number of "middlemen" is limited. As long as one person or one organization is corrupted intentionally or unintentionally, the whole society will fall into chaos.
For years, we have been putting all our eggs in other people's baskets. Is it possible to have a system that can transfer money without the involvement of a third party (bank)? To answer this question, we can think about what a transfer means. It is just an entry registered in a table. So, is there any way to maintain transaction records between us without relying on a third party? You may have guessed the answer - it’s blockchain.
How does the blockchain realize its own registration of transaction records? This requires the use of distributed accounting technology. This approach requires that enough people choose not to rely on a third party. Only then can these people operate this decentralized system on their own. “You can save some Bitcoins in case they go up in value in the future. If more people think this way, then the idea will become a reality.” ——Satoshi Nakamoto How many people are enough in the system? At least three. But here, let's assume there are ten people who want to get rid of the bank or any other third party managing the transactions. With mutual consent, they always have the details of each other's accounts but do not know each other's identities.
Each person starts with their own empty folder. As the process progresses, the ten people will continue to add pages to their empty folders. This collection of pages is the table that tracks transactions.
Next, everyone in the network has a pen in their hand to fill in the blank pages. Everyone is ready to write in any transaction that occurs within the system. Now, suppose number 2 wants to transfer $10 to number 9. To complete the transaction, No. 2 posted a statement telling everyone, "I want to transfer $10 to No. 9." Those who received the message recorded the transaction on their blank page. Each person checks to see if No. 2 has enough money in her balance to transfer the $10 to No. 9. If she does, each person records the transaction on their blank page.
As time goes by, more people will use the network to transfer money. Whenever they want to make a transaction, they notify others. As long as one person hears this notification, he will write the transaction record on his page. The recording will continue until everyone has used up the space on the current page. Assuming that a page can only record ten transactions, when the tenth transaction is completed, everyone has run out of space. When a page is filled, it can be placed in a folder and a new page can be created, repeating the process in step 2 above.
Before we put the file in the folder, we need to encrypt it with a unique number that everyone on the network agrees on. By encrypting the password, a copy will be placed in everyone's folder, and we can ensure that no one can modify the encryption number and it will not change over time. Whether it is today, tomorrow, or even a year from now, once the password copy goes into the folder, it will always stay in the folder and remain encrypted. And if everyone trusts the encryption method, then they can trust the content of the page. The encryption method of the page is the key to network transactions. The work of protecting pages from modification is called "mining." But for simplicity, we'll continue to call it "encryption." Before the advent of blockchain, we trusted third parties/middlemen to record every transaction in a table and believe that it will not change. In the distributed and decentralized system just described, people will also trust this encryption method.
Before we learn how to encrypt a page, we need to know how encryption works. I call it the "magic machine". Imagine a machine surrounded by thick walls. If you send a non-empty box to the machine from the left, it will "spit out" a box with other contents. This machine is called a "hash function", but for ease of understanding, let's call it the "magic machine". Say you send the number 4 from the left, it spits out the word: 'dcbea' on the right. How does it convert the number 4 into the word 'DCBEA'? No one knows. Moreover, the conversion process is irreversible. Even if you knew the machine output was "dcbea", you wouldn't know the corresponding input. But every time you input the number 4 into the machine, it will always spit out the same word "dcbea". Figure: Hash (4) == dcbea What happens if we send the number 26? Figure: Hash(26) == 94c8e We get '94c8e' this time. Interesting! So the machine output also contains numbers. Now, if I ask you the following question: "What can I feed the machine from the left that will give me a word starting with three zeros from the right? For example, 000ab, 00098, 000fa, or 000XX." As mentioned above, the machine has a property that we cannot infer the input on the left from the result on the right. Faced with such a machine, how do we solve the problem just raised? I've got an idea. Why not try every number in the universe one by one until we get a word that starts with three consecutive zeros? After thousands of attempts, you'll eventually arrive at a number that produces the correct result. It is very difficult to calculate what the input was for a given output. But at the same time, it is really easy to verify that the input and output correspond. Remember, for a given number, the machine spits out the same word every time. If I gave you a number, say 72533, and asked you, "Put this number into the machine and see if it outputs a word starting with three zeros?", how difficult would you think it would be to complete this process? All you have to do is throw numbers into the machine and see what comes out on the right. The most important property of such a machine is that, given an output, it is very difficult to calculate the input, but given an input and an output, it is really easy to verify that the input and output correspond.
We are going to use this amazing machine to encrypt pages. As usual, we will start with an assumption. Imagine that I give you two boxes, and the first box contains the number 20893. Then, I ask you, "Can you come up with a number that, if added to the number in the first box and sent to the machine, results in a word that starts with three zeros?" This is similar to what we saw earlier. We have learned that the only way to calculate such a number is by trying every single number available in the entire universe. After a few thousand attempts, we would stumble upon a number, say 21191, which, when added to 20893 (i.e. 21191 + 20893 = 42084) and sent to the machine, would produce a word that satisfied our requirements. In this case, the number 21191 becomes the seal of 20893. Suppose there is a page with the content 20893. In order to encrypt this page (i.e. make it impossible for people to change its content), we add a seal named "21191" to this page. Once the encryption number (i.e. 21191) is printed on the page, the page is encrypted. A cryptographic number may also be called a “proof of work,” meaning that the number proves the effort that went into calculating it. If someone wants to verify whether the page has been modified, all he has to do is add the seal number to the page content and send it to the magic machine. If the machine gives a word starting with three zeros, it proves that the page content has not changed. If the result does not meet our requirements, we can throw away the page because its content is compromised and is useless. We will use a similar encryption mechanism to encrypt all of our pages and place them in their own folder. In order to encrypt a page containing a web transaction, we need to find a number that, when appended to the transaction list and fed to the machine, gives us a word starting with three zeros on the right. Note: I have been using only the phrase "words that start with three zeros" as an example because it demonstrates how hash functions work. The actual calculation is more complicated than this. Once this number is calculated, after spending time and electricity on the machine, the page is sealed with this number. If anyone tries to change the content of the page, anyone can use the sealing number to verify the integrity of the page. Now that we know how to encrypt a page, we will return to writing the tenth transaction on the page. Writing these ten transactions uses up our space. When everyone ran out of pages to write further transactions, they kept calculating encryption numbers in order to obtain pages so that they could hide them in folders. Everyone in the network calculates the encrypted number. The first person to find it in the network announces it to everyone else. Once the encrypted number is received, everyone verifies that it produces a legitimate output. If the output is legitimate, everyone signs their page with this number and places it in a folder. But what if someone says that the output produced by the published encrypted numbers is not legitimate? This is not uncommon. There may be the following reasons:
Whatever the reason, the person has only one option - abandon his page and copy someone else's page and put it in the folder. If he fails to put his page in the folder, he will not be able to write more transactions and will be banned from being a part of the network. The encryption number agreed upon by the majority becomes the true encryption number.
So why does everyone work so hard to calculate the cryptographic numbers, even though they know someone else will calculate them and announce them to them? Why not just sit back and wait for the announcement? This is where the incentive mechanism comes in. Everyone who is part of the blockchain is eligible for rewards. The first person to calculate the encrypted number will receive a bonus for his efforts (i.e., CPU power and electricity consumed). Simply imagine that if No. 5 calculates the encrypted number of a page, he will get some money, such as $1, which comes out of thin air. In other words, No. 5's account balance increases by $1, while other people's account balances do not decrease. This is how Bitcoin came to exist. It is the first currency to be traded on a blockchain (distributed ledger). In order to keep people motivated to continue working on the network, they are rewarded with Bitcoins. When a certain number of people own Bitcoin, the value of Bitcoin will increase, and then other people will want to buy Bitcoin. This will further increase the price of Bitcoin, and then more people will want to buy Bitcoin, and the price of Bitcoin will increase again. Rewards give everyone an incentive to continue working on the network. And, once everyone has received the page into their folder, they bring out a new blank page, and the process repeats itself. A page can be thought of as a block of transactions (block), and a folder can be thought of as a chain of pages (blockchain). This is how blockchain works. Besides this, there is one more small thing. Imagine that there are already five pages in this folder - all encrypted with encryption numbers. What if I go back to the second page and modify the transaction for my own benefit? The encryption number can allow anyone to discover inconsistencies in the transaction, right? What if I go ahead and calculate a new encryption number for the modified transaction and add that number to the page? To prevent someone from going back and modifying the page (Block) and the encryption number, there are some minor changes to the method of calculating the encryption number.
Please remember the purpose of giving two boxes: one box to store the number 20893, and the other box to reserve space for your calculation. In fact, in order to calculate the encrypted numbers in the blockchain, two boxes are not enough, in fact, there are three boxes: two boxes as pre-filled boxes, and one box for calculation. When all the contents of these three boxes are sent to the machine, the answer that comes out on the right must meet the requirements. We already know that one box holds the transaction list, another holds the sealing numbers, and the third box contains the previous page of output from the magic machine. With this little trick, we can ensure that each page depends on its previous page. Therefore, if someone wants to modify a historical page, he must change the content and encryption number of all pages to maintain consistency on the blockchain. If one of the ten people we imagined at the beginning tried to cheat and modify the content of the blockchain (a folder of pages containing transaction records), he would have to adjust several pages and calculate new encryption numbers to encrypt these pages. We know how difficult it is to calculate encryption numbers. Therefore, one dishonest person on the network cannot beat nine honest people. If a dishonest person tries to cheat on a page, it will create another chain in the network, but the cheating chain will never catch up with the honest chain - because the effort and speed of one person cannot beat the cumulative effort and speed of nine people. Therefore, this mechanism can ensure that the longest chain in the network is the most honest chain. What if, instead of one person being dishonest, there are six people? In this case, the protocol breaks down. It is called a “51% attack.” If the majority of the people in the network become dishonest and deceive the rest of the network, the purpose of the protocol is defeated. If the blockchain were to crash, this would be the only possible reason. While this is unlikely, we must be aware of the weakness of the blockchain system: it is built on the assumption that the majority of the population is always honest. The above is the complete introduction of blockchain by "Old Miner". Do you understand it? Welcome to leave a message to share your "miner" experience. |
<<: Mt.Gox CEO has something to say after Coincheck was hacked for $534 million
The wisdom line, success line and career line can...
For Ethereum owners, a reliable trading platform ...
According to the latest security notice released ...
What impact does hair have on your life? In medic...
Digital currency payment processor Coinify has si...
You can judge a person by his face but not by his...
How to read the career line on palmistry? In palm...
Complete bone structure - Sichuan bone The Chuan ...
Everyone has read Journey to the West, right? Dem...
How to read the love line in your palm lines Stat...
In physiognomy , the five facial features have th...
What is the unpredictable line and how can we see...
Bitcoin Foundation board members Jim Harper and O...
People with earlobes of different sizes tend to h...
Smile is unique to human beings. Generally speaki...