Blockchain is the most comprehensive science: read the main principles and operation mechanism of Bitcoin

A story tells you the principles and workings of Bitcoin

I spent some time on the weekend reading some information about Bitcoin's principles. Although I dare not say that I have fully understood every detail, the main ideas and the main principles of the key parts are quite clear. Write an article to share with everyone. The positioning of this article will compare science, try to use the analogy method to tell the basic principles of Bitcoin. This article does not cover the more detailed parts of algorithms and protocols. I plan to write a bitcoin principle from the programmer's perspective, where the key data structures and algorithms in the Bitcoin system will be viewed from the perspective of the technician. And the agreement to do some explanation.

In this article, I will give a virtual village called “Bit Village”. The whole article will tell you the motivation of Bitcoin, what problems are solved, and the goals and design of some key components. .

statement of problem

Let's start with the motives generated by Bitcoin.

Bitter village

In this world, there is a small village called Bit Village, which has hundreds of families. This village is almost isolated from the world and lives a self-sufficient life. Because there is no large-scale trade, the villagers in Bit Village have lived a life of barter, which means that there is no unified currency between the villagers. The trade between them is basically that the old Zhang family takes a bag of flour for the old Li family. A sheep, Wang Dazhao took a basket of wild fruit for Liu Dazhen two-foot cloth. The villagers have always lived in such a simple life.

Blockchain: A story tells you the principles and workings of Bitcoin

Physical currency

Finally, one day, the villagers felt that it was too inconvenient to always use bartering, so the village members met to discuss how to solve this problem. It has been suggested that in order to divide and rare things, such as gold, as a general equivalent, the correspondence between other items and gold is compiled into a table, for example, one gram of gold corresponds to one sheep, one gram of gold corresponds to a bag of flour, etc. At this time, Lao Zhang no longer has to take a bag of flour and pant and go to the old Li family for a sheep. If he can get a gram of gold from his home, he can go to the old Li family to bring back a sheep, and Lao Li takes this. One gram of gold can be exchanged for a bag of flour from anyone who is willing to sell the flour. Of course, it can be exchanged for anything equivalent to one gram of gold.

At this time, Bit Village entered the era of physical currency.

Blockchain: A story tells you the principles and workings of Bitcoin

Symbol currency

The good times are not long. After a while, the drawbacks of the physical currency have also appeared. Because there are not many gold mines near Bit Village, mining and smelting gold is too time-consuming and laborious. With the use of gold, gold is always lost due to wear, loss or deliberate accumulation. The whole village people sat together again and began to discuss countermeasures. At this time, some people said that in fact, you don't have to really use gold. Just look for a piece of paper and write "one gram of gold". As long as the whole village people agree that this paper is equal to one gram of gold, the problem will not be solved. . Others have agreed, but at the same time they have new problems: real gold needs to be mined and smelted. Gold mines are limited, mining and smelting also cost, so no one can make a lot of gold in short-term, it can be written differently. As long as I have enough paper, just like how much to write, then it becomes a lot of paper at home. If you can't get 10,000 sheets of paper, you can change a sheep. Academic inflation).

Everyone thinks too. However, at this time, someone proposed a solution: this paper is not effective for anyone to write. We only recognize the old village chief who is highly respected in the village. Everyone knows the words of the old village chief. The old village chief wrote some papers and sent them the same amount of paper according to the stock of gold. For example, the old Zhang family had 200 grams of gold, and the old village chief sent 200 sheets of old Zhang to write "one gram of gold." Paper, while taking the gold of the old Zhang family as a mortgage. In this way, the old village chief collects all the gold in the village into his own home, and sends the paper with the equivalent words according to the amount of gold handed in by each family. At this point, the villagers can take these papers as gold for trade, and everyone recognizes the words of the old village chief, and others can't fake them. In addition, if the paper is too worn, you can get the old equivalent to redeem the new equivalent paper. In addition, the old village chief promises that if anyone wants to change to real gold, just take the paper back and the old village chief will The equivalent gold will be returned to the person. Because the amount of gold written by the old village chief is the same as the amount of gold actually placed at home, so as long as the principle of destroying how many papers are written, each valid paper can always be exchanged for the corresponding true gold. .

At this time, Bit Village entered the era of symbol currency (banknotes). The old village chief assumed the role of the government and the bank.

Blockchain: A story tells you the principles and workings of Bitcoin

Central system virtual currency

After a few more years, the old village chief has to check a large number of old banknotes every day, write new banknotes, and carefully record all kinds of accounts. One to two, the old village chief was too hard to drive to the west.

Bit Village once again held a plenary meeting to discuss what should be done. At this time, the son of the old village chief, the two dogs, volunteered to take over the father's pen and assume the responsibility of currency issuance. The young village chief, the two dogs, was very clever. He did it for a few days and found that he didn't seem to really write so much paper. This can be done like this: the villagers handed over the banknotes and destroyed them, but the two dogs recorded the number of banknotes handed in by each household. If you want to pay later, for example, Lao Zhang wants to take a gram of gold to replace a sheep with Lao Li, and then call the two dogs together, indicating that one gram of gold under the name of Lao Zhang should be placed under the name of Lao Li. The two dogs took out the books and looked at whether there was a gram of gold in the name of the old Zhang. If there was one, they lost one gram in the name of Lao Zhang and added one gram in the name of Lao Li, thus completing the payment. At this time, Lao Li heard the two dogs on the phone confirming that the transfer was completed, and he could safely let Lao Zhang take the sheep away.

At this time, Bit Village entered the era of virtual currency in the central system. Every villager does not need to pay in kind, and the payment process becomes a change in the number on the books maintained by the two dogs.

Blockchain: A story tells you the principles and workings of Bitcoin

Distributed virtual currency

Zinc Alloy Retro Speaker

The sound quality of small speakers is also good. It does not have the same large speakers and power as HIFI speakers, and its sound quality cannot compete with large speakers due to physical limitations. But for the vast majority of users who are not golden ears, the use of small speakers with tablets and mobile phones is sufficient to meet their hearing needs.
For Bluetooth speakers, I personally think that when many people buy speakers, the appearance is the first priority and the function is second.


We focus on retro Bluetooth speakers,It has high energy density, mini size, light weight and diversified shapes;Excellent fast charging performance, support fast charging and other excellent features

with a brand-new design, showing retro nostalgia without losing fashion. It uses a 2.5-inch speaker and has many functions such as FM radio, Bluetooth fast connection, multi-mode switching, and HIFI high fidelity. Wireless Bluetooth 4-10 hours of playback (at 50% volume), which adds to its unique charm.

Wireless Retro Speaker,Waterproof Retro Speaker,Portable Vintage Speaker,Rechargeable Vintage Speaker

Shenzhen Focras Technology Co.,Ltd , https://www.focras.com

Posted on