Introduction to Blockchain | Unknown Secrets in "Blockchain Village" …

Author: Fang Jun

Source: Big coffee lead reading

Suppose there is a village called "Chain Village", a village on the blockchain. In a village, there is naturally some money between households, so it is necessary to keep accounts. Let's discuss:

First, the process from centralized accounting to distributed accounting.

Second, who is responsible for bookkeeping?

Third, how can distributed accounting be immutable?

From centralized accounting to distributed accounting

In the first part, let's discuss, from centralized accounting to distributed accounting. A long, long time ago, how did a village keep accounts? No accounting. In the spring, the family ran out of food. They asked their neighbors to borrow a few pounds of rice and returned it in autumn. Or, some young people in the village want to go out to do business, find a few to make up the cost, and return it when the goods are sold. Without accounting, disputes can easily occur. For example, the IOU is lost, or the money will be returned.
As the village gradually became richer, people in the village had more money, and a new measure was needed. A prestigious family in the village began to assume the responsibility of the leader. For convenience, let's call this leader the village leader. From then on, the village chief helped everyone to keep accounts. He helped the villagers to record that Zhang San borrowed 100 two silvers from Li Si on a certain day, month, and day. On a certain day, Li Si paid the money back. and many more. This is the transition to centralized accounting. This has many advantages, for example, it can reduce a lot of disputes that the accounts can't match. There are advantages and disadvantages to the village chief's bookkeeping: for example, the two of you have to record a money loan, but went to the village chief several times, he was not at home and could not keep a book. For example, the village elder's eyes were dizzy and he misremembered. At the request of everyone, the village chief found a clerk to help him keep his books. In this way, the problem of his absence was resolved. The accountant is also better at arithmetic than the village head, and it is not easy to remember wrongly. But a solution often brings new problems. For example, someone secretly puts money into the accountant and lets him secretly change the ledger. Therefore, the village chief not only has to bear the salary of Mr. Cangfang, but also takes measures to prevent him from doing bad things.
There are other deficiencies in centralized bookkeeping by the village chief and the accountant. For example, the heads of village leaders in the past have been getting better and better, and there have been no problems for hundreds of years. Therefore, the people in the village are very trusting, and they no longer write owed loans. But suddenly one day, the village chief's house suddenly caught fire and the tent was burned. This may be a natural disaster, and the thunder house was on fire. It may also be a human disaster. For example, someone owes too much debt. For example, the village chief has misappropriated a lot of money. He simply burned the village's account book with a fire. The villagers were so distressed that they decided to reform the bookkeeping method and not let the village head keep the book. This is the third generation of bookkeeping methods in the village:-The first generation of bookkeeping methods in Chain Village is to make an IOU between each other. -Chain Village's second-generation bookkeeping method relies on the village chief to centralize bookkeeping. -Chain Village's third-generation accounting method has become distributed accounting. The so-called distributed bookkeeping is the thinking of blockchain. Next, I continue to use the story of Chain Village to explain to you. Since the village chief is not credible, we will instead believe in ourselves. This is how distributed accounting works: From then on, everyone in the village kept accounting for everyone. Each household records a book of the whole village. It turned out that the two of us had a lot of money. We went to the village chief and asked him to keep accounts. The account book kept by the village chief was burned, and the village was in a mess. Now, you asked me to borrow a thousand and two silver. We went to the square in the village entrance, beat the gongs and drums, and said, "Please help me to write down in your account book. The old Zhang family asked the Lao Wang to borrow a thousand and two silver.

In a real village, this is certainly not easy to achieve, but in the computer world, it is very easy to implement. We send a notice to everyone on the Internet, and each computer automatically records it. Many people can immediately see the benefits of distributed bookkeeping: it is as effective as centralized bookkeeping. If there is a dispute, then according to most people's books, this is the same as everyone believed that the village chief's book of. But it is better than the village ledger's ledger. Now we don't have to worry about the ledger being burned because there are many copies. Now, we don't have to worry too much about someone secretly altering the ledger. If anyone wants to alter the ledger, he has to change everyone's ledger.

In this distributed bookkeeping method, you also need to pay special attention to it. It uses openness and transparency to combat the evil of the old village chief or the accountant. So, is blockchain as simple as spreading the ledger to many people? No, so we dig down.

Who is responsible for bookkeeping

This is what we will discuss in the second part of today: Who is responsible for bookkeeping? In fact, assuming that everyone keeps accounts, even in a computer environment, it is not feasible. In the Bitcoin system, there are actually only a small number of so-called full nodes responsible for bookkeeping. I just checked it. At this moment, the total number of Bitcoin nodes is 9,417.
According to the story of Liancun Village, it is not that each household records an account book, but it depends on a small number of people to keep accounts. Compared with only the village chief, there are now more people, but they will not arrive Every household keeps books to that extent. A chain village distributed bookkeeping that can actually be operated may be like this. Around the square of the village entrance, there are dozens of accounting rooms that help everyone to keep accounts. When Lao Zhang and Pharaoh went to the square to announce, these accountants began to fight for the right to keep books. Why are they willing to rush to keep accounts, because if anyone succeeds in keeping accounts, Pharaoh and I pay a reward of twelve silver. The accountant responsible for bookkeeping must check and confirm that the Lao Wang family did have one thousand and two silvers, and this silver was indeed given to the old Zhang family. Without this test, in case two or two fake and forge a loan, everyone would think that the old Zhang family had the money, which would cause a lot of trouble. So, which clerk can get this remuneration? The villagers set the rules. These accounting rooms will conduct a complicated calculation competition. Whoever calculates it first will get the right to book. The winner will get the remuneration. This is called "proof of work" in the Bitcoin system, and the workload is the workload of performing calculations. When telling the story of Chain Village, we also often say vividly that if these accountants raise the stones, whoever lifts 100 pounds of stones 100 times in one minute will win the competition, get the right to book, and get the reward . Now, Mr. Accountant not only needs a good brain, a quick pen, but also a good physical strength. This analogy is very similar to the bitcoin system. Nodes of the bitcoin system have to do things that have nothing to do with bookkeeping to compete for bookkeeping rights. They all have to be "Mr. Accountant like Hercules". Okay, someone was the first to lift the stone and get the right to book. He wants to tell all the clerks in the village entrance square that I have finished the calculation and this bonus belongs to me. Please copy the results of my calculations to your account book. At this time, other accountants must follow the rules and copy the results. Then, rush to compete for the next bookkeeping opportunity.
However, it should be noted that before each accountant writes this account to his own account book, everyone must do another check and the check is correct before they can record. If the first bookkeeper remembers wrongly, the mistake is immediately discovered. Here we talk about who can keep accounts. In fact, we talked about the three-layer verification logic. Let's sort it out: The first layer: The old Zhang family asked the old Wang family to borrow a thousand or two silver. Both parties went to the village to announce it. If one goes to say that I lent money to so and so, and started to keep accounts like that, then it must be a mess. The second layer: The competition for the right to bookkeeping is to perform complex calculations and corresponding bonuses, which makes a healthy competition between the accountants in accordance with the rules. The role of this competition is to ensure the correctness of the books. The third layer: When each accountant is in charge of his account, whether it is the first one or the records of others' calculations, he must check and verify, which further guarantees the correctness of the account book.


In the third part of the story, let's talk about how to ensure that the ledger cannot be tampered with. This is also very important. What I just discussed is to ensure the accuracy of the information recorded in the ledger every time. If a ledger is safe and credible, we must also prevent someone from secretly altering it. Distributed accounting, of course, adds a little security. For example, in the past, if a person wanted to change his account book, he just had to open the account of the village chief's house secretly and alter it. Currently, distributed bookkeeping is used, and the ledger is stored in many homes. He has to go door-to-door to pry doors and alter them, which greatly increases the difficulty. This may seem very convincing, but you should note that this is not the main tamper-proof measure for blockchain bookkeeping. In fact, if there is indeed a very powerful little hair thief, he can pry open all the accounts, and change all the accounts? Blockchain has more advanced anti-tampering measures. The name "blockchain" is a combination of two words: block and chain. A block is a data block, and the analogy with a ledger is a page in the ledger. Chaining is to use a cryptographic method to string these data areas together. One of its key features is that if you want to change the content on an earlier page of the ledger, you must change each subsequent page. This method of stringing the pages of the ledger is called a "hash pointer", and you can read a detailed technical explanation of it in Chapter 1 and Chapter 2 of "Blockchain: Technology-Driven Finance."
According to the story of Chain Village, suppose that there are now one hundred accountants in the bookkeeping. A little thief wants to change a page of the ledger. First of all, he has to go to a hundred accountants to modify it. At the same time, there are already 100 pages behind this page. So second, it has to change every page after that. Through a simple calculation, you can see that the difficulty has increased ten thousand times at once: it turned out to be changed once, but now it needs to be changed 10,000 times. Do you think this is safe enough? There are even stronger security measures. When we discussed who can keep accounts, we said that every time we want to keep accounts, we must fight for the right to keep accounts by lifting stones. Let's suppose that Mr. Accountant wants to lift the stones in the competition. Whoever lifts 100 pounds of stones 100 times in a minute can only keep accounts. The security measures of Bitcoin's blockchain are like this. As long as you want to modify this page of the ledger, you must lift the stone 100 times as required. The difficulty increased many times at once, you see, no matter how powerful the little hair thief can't alter the account book. Let's take a stone here, for example, in the blockchain world, it is the computing power of computers. With this design, you find that even if you have the most powerful supercomputer, you can hardly break the block. Chain, to tamper with the records. Digging deeper, the blockchain has more security measures to ensure that the ledger cannot be tampered with, but I think here, you can already understand in principle how the distributed ledger of the blockchain is safe. The Bitcoin system, which now runs as high as 130 billion U.S. dollars, must have many hackers trying to break it, and alter the Bitcoin of others into their own addresses, but it turns out that in the past eleven years, No one can break it. In the foreseeable future, it will be difficult to break, and it will never be broken. To summarize. Today, we use the story of Chain Village to explain the principles of blockchain. We made three points:

First, we talked about the evolution of chain village accounting methods, from centralized accounting to distributed accounting;

Second, we talked about who can keep accounts. The approach here is mainly to ensure that the information recorded in the ledger for the first time is correct.

Third, we talked about the mechanism used by the blockchain to ensure the tamper-proof nature of the ledger.

The story of "Chain" Village is over here. How about that? In October this year, China announced that it would like to use blockchain as a breakthrough in technological innovation and develop the blockchain industry. This makes Bitcoin and blockchain no longer irrelevant to you. Now everyone needs to learn this new technology , Its application scenarios, and its future value.