When I started the geek time column , Some readers left a message for me to express some opinions on blockchain technology . At that time, I thought that the technology of blockchain was relatively simple , I feel like there's nothing to say , On the other hand , I think there are many more mainstream technologies that can help you grow , So we degraded the technical articles related to blockchain .

Why write this topic now ?

2010 year , When I was browsing foreign technology websites , I saw a lot of people discussing a topic called bitcoin Things that are , I also saw people say that they exchanged tens of thousands of them for a pizza . And then , I took a look at its white paper , This is not enough 10 It's very easy to read a page document , So I suggest you read it .

then , I tried to install it on a computer , Just like using BT Or electric donkey download , Connected to this server free P2P The Internet , Downloaded the ledger , And tried " dig ".

It took a long time , I wrote down a block in my bitcoin , Received a reward from the system 50 Bitcoin . I watched it silently, and it consumed hard disk space , And very delicious CPU The guy who , In mind , What kind of broken Software , It's too hard to use. , Is deleted .( Yes , this 50 A bitcoin doesn't know where to go .)

Remember when bitcoin started to be valuable , Institutions like Wikileaks, in order to avoid banks controlled by the government , Will accept donations from bitcoin .2012 In the year , Bitcoin has been bullish , here we are 2013 year , The market value of bitcoin is already quite high , Break through the 1000 dollar .

At that time , There are a lot of people mining in China . I remember Li Xiaolai was the best , He has a lot of bitcoin , If it's not sold , Now it's more " Terror " 了 .

stay 2016 In the year , I heard about something called Ethereum . Um. , Blockchain + Code stuff , It's also called smart contract , This really gives blockchain more room to imagine . I also heard that this project was ICO Coming out , And then I got to know ICO. Same year , I have a high school classmate , Started a startup project , It is said to be the first in China ICO project . At that time, we raised 1000 Thousands of yuan , And then I sent a coin to the secondary market .

And then ,2017 One day in, someone took me to see Xue Manzi . He said that he has invested in a lot of blockchain related start-up projects in a very short period of time . A week after meeting Xue Manzi , The Chinese government has made qualitative policies ICO illegal , Start managing the market , Get rid of everything and ICO Relevant stuff .

It seems that the market should calm down .

2018 year 1 month 9 Japan , In a wechat group, Xu Xiaoping, founder of Zhenge fund, told his investment company CEO They said , Blockchain is a great technological revolution . He asked everyone to " Don't doubt blockchain , Don't hesitate , Mobilize all staff immediately , Learn how to embrace this revolution ".

With the outflow of Xu Xiaoping's wechat screenshot, the blockchain has been pushed to the top of the storm . Some of my friends who have good relationship with me and are technical friends have also entered the pit …… All kinds of people , You know me , You don't know me , All come to me , Ask me about blockchain , I don't want to pay attention. It's all over ……

therefore , I think I'd better write a few articles here . One side , I will objectively explain the technology of blockchain ( It's not that kind of metaphor which is totally incomprehensible , It's real technology , I'm sure non-technical people can understand it ), Including blockchain 、 Asymmetric encryption 、 dig 、 Consensus mechanism, etc .

On the other hand , I will combine some of the existing centralized standard play methods of financial dealmaking to let you compare the difference between centralization and decentralization . Last , I'll talk about some of my ideas , It may rise to the philosophical level . Of course , Finally, it's up to you to make your own judgment .

Here are the key questions to be answered in these articles .

  1. Why blockchain technology has become a hot technology ? What problem does it solve ?

  2. Blockchain (blockchain) What kind of technology is it ? here , I'll show you blockchain technology , Let's see how blockchain can be tamper proof 、 What is? " dig ", And why " dig ", It's all technical stuff .

  3. Going to the center means no company , No company means no server , How does software without a server provide services ? Here we will talk about how a decentralized system works , How to reach an agreement ?

  4. What the hell is smart contract ? What's interesting about it ?

  5. Let's just talk about finance , You can think for yourself , Is it possible for blockchain virtual currency to replace existing financial services ? And reorganize the whole social structure ?

  6. Last , I'll ask you a few logical questions to think for yourself " De centralization " The advantages and disadvantages of , And related logical and philosophical issues .

Idle time , We began to .

The revolution of blockchain Technology

You must have read too many articles about what blockchain technology is with all kinds of metaphors , And why . ad locum , I'll try to illustrate the revolution of blockchain technology in my words .

When it comes to blockchain, bitcoin is inevitable , Bitcoin is a digital currency . But the most amazing thing is , Bitcoin claims to have the following characteristics .

  1. De centralization . This means that there is no central server , Out of the control of someone , The whole system is directly composed of the client computer . This kind of technical difficulty is very big , It's not like a cell phone App Or a small website , You can publish it if you want , It takes someone to play with you .

  2. Data tamper proof . All transaction records are kept in full , And it's open to all , It's also encrypted and verified . It's not that data can't be tampered with , It is , The cost of tampering with data is very high .( It is said that the tamper proof of blockchain can solve the problem of human trust , This is not necessarily .)

  3. Fixed circulation . It's not going to print money like the National Central Bank , Cause inflation .

These things add up , So that people who want to cheat , Especially those powerful, powerful and rich big companies and organizations are hard to do evil . because " De centralization " This thing , essentially , So the whole system doesn't need these big companies and organizations anymore , People can achieve real autonomy , These big companies are going to go out of business .

In a nutshell , People who believe in blockchain believe , We can change the organization formation of the whole society through the blockchain technology —— No more banks 、 agency 、 Electronic business platform 、 Intermediate organizations such as Alipay , People can go through a system that is not controlled and operated by anyone P2P Financial system , Make a completely free and credible deal .

Of course , The point of view of anti blockchain people is also very clear . They think that , The so-called decentralization seems to be beautiful , But it's impossible . And from the current application of blockchain , There's nothing to subvert , There's no sign . Instead, , Everyone is crazy about the concept , There is no real value . image ICO There's a lot of speculation in things like the stock exchange , The bubble is very big .

therefore , This huge controversy , Divided people into two camps , Pushing blockchain to the top . Regarding this , In these articles, I will explain the blockchain technology bit by bit , Let you judge for yourself .

Actually , For investment institutions , Logically , I think they should panic , Because they are also the targets of revolution . If something doesn't need a company anymore , People's autonomy , So how do investors invest ? The investment entities are gone , How to pay off ?

if , Investment institutions want to support a small company and kill a large company with blockchain technology , That doesn't make sense logically , Because if you invest in a company that can be easily subverted by others , So how could you invest ?

Related logic problems , We'll talk about it at the end , Let's take a look at blockchain technology first . There will be very detailed technical details below , If you don't care about the technical details , Then you can just watch " Technical summary " section .

Technical summary

First , Let's first look at what centralized and decentralized business flows look like .

The following figure shows " Centralization of tradition " and " De centralization " Comparison of .


Centralized structure ( Everyone gives the right to keep accounts to the bank )


Decentralized trading

The decentralized bitcoin transaction processing flow is as follows .

  • First , Users who need to trade send the trade to the network .

  • then , Some machines on the network are called accounting nodes , They compete for bookkeeping rights by competing for computing power . It's also called " dig ".

  • Get bookkeeping right node , Will calculate and package the transactions to be recorded , And broadcast to the whole network . The node receiving the new accounting package will verify it , Add your own block after verification .

Be careful , The whole world of bitcoin has no servers , It all depends on a distributed system spelled out by everyone with their own computer . Since these computers are our own , So this kind of P2P There's a premise assumption for decentralized networks ——" Any node in the network cannot be trusted , Any one of them can do evil ".

Based on this assumption , This distributed ledger system needs the following design : Anyone can get all the data . therefore , Data should be easy to verify, legal and unmodified , And if it's hard to change .

Based on this design , Bitcoin uses two big technologies :" Blockchain Technology " and " Workload proof consensus mechanism ".


The first technology is blockchain , Blockchain is also called blockchain, There's one block after another , Each block contains a set of transaction information , then , Every block has one ID( Or an address ), These blocks record the previous block's ID To form a chain . The pictures in the text will help you understand the concept vividly , If you are interested, you can have a look at .


But we need to pay attention to the following aspects .

  • Each piece of ID It's all generated through its content , therefore , As long as there is a slight change in the content , This ID It's going to be totally different .

  • And generate ID Also included in the content of the previous block is ID. So as long as the content of the previous block changes , Its ID And change with it ( Otherwise it's not legal ), So the one that points to this block ID Change, too . therefore , The back points to this block ID Also recalculate , And become another , This creates a chain effect —— A block is modified , All subsequent blocks have to be changed together . This leads to an increase in modification costs .

  • This is a change , The way to change everything , It doesn't mean you can't tamper with , It's just a big change , Make your changes a little more difficult .

  • The older the block, the larger the modification area , The older the block, the less likely it is to be tampered with , The safer . conversely , The newer the block, the less secure .

What makes blockchain very difficult to tamper with is the consensus mechanism of workload proof .

Workload proof consensus mechanism

We know , Data consistency in distributed networks is the most difficult problem , In this decentralized network cluster, it is even more difficult . The biggest essential difference is , It is assumed that the nodes in a distributed system can be trusted , And in a decentralized network , Nodes are supposed to be untrusted . Imagine , Is it hard to do consistency on a bunch of untrusted nodes ?

here , There are several problems that need to be solved " Data consistency " Related issues .

  • According to whose data ? Any node can modify its own downloaded account book , That is, anyone can forge the account book . that , Whose data is right ? In a decentralized network , We can only think that , Most people know that the data is right . As long as I control more than half of the nodes , So I'll let this " Most people " Forge the same account book , So it's equivalent to that the whole account book has been modified by me . Because in a decentralized network without servers , The so-called truth is that most people just agree with it .

  • " Most people " The problem of . Is it the number of people ? In the Internet world , I can program out an infinite number of " people " Come out and vote , therefore , Using the number of people to solve the problem of decentralization , I can't tell whether it's a man or a dog , In the computer world of biology or programming , It's a stupid thing .

  • Differences of opinion . If at the same time , There are many people telling others , That's how it should be recorded . for instance , Some people say , The left ear turns 10 Three yuan to Uncle mouse , Some people say , The left ear turns 20 Yuan to Uncle mouse , Others say , The left ear doesn't spend money , It's Chen Hao's money . and , Their data are legal , that , Who should listen to the whole network ?

Yes , This kind of unorganized play is really chaotic .

To solve these problems , Bitcoin uses Proof-of-Work Workload certification mechanism , That is to say " dig ". So-called " dig " In fact, it is to use large-scale calculation to find a block that meets the requirements of the system ID. To find blocks that match the criteria ID Only by means of violence , So it costs a lot of system computing resources and power .

thus , We use this " It consumes a lot of computing power " To raise costs in a more efficient way , So as to effectively contain or solve the following problems .

  1. Modification is almost impossible . Just imagine , If it takes a lot of time to generate a block . That is, computing in the best cluster of computers in the world 10 It takes about 10 minutes to make a bag , that , When we need to modify the data content , The process is the same . As I said before , If you're going to forge a block , Then you have to modify all the following blocks , The cost of modifying a block is so high , So the cost of modifying the whole chain is very high .

  2. Can master 51% It's also almost impossible for people who have a lot of computing power . In addition to the high cost of forging a chain , And control most people's computing power , It means , It's a huge investment of money . These two difficulties add up , It's almost impossible .

  3. Resolve differences . One side , Such a large amount of work to find out the block ID, It has effectively reduced the probability of conflicting opinions . On the other hand , Even if there is a legal conflict in the block ( At the same time, there are several reasonable blocks , That is, the blockchain has branches / Bifurcation ), That is, multiple legal ledgers . And because the cost of mining is too high , It is impossible to follow up multiple books at the same time , So the miners can only bet on one of them . The chain of the branch that most people choose will be more and more , So there's no one on the other side , So it's invalid .

Don't look Proof-of-Work The cost is so high , It's not environmentally friendly to still consume so much electricity , however , This is the safest way to play in a decentralized system right now .( For details, please refer to " dig " and " Decentralized consensus mechanism ".)

well , The above is a summary of blockchain related technologies . If you want to know the technical details , You can continue to read the following . If not interested , You can choose to skip .

At the end of the paper, we give 《 Blockchain Technology 》 List of articles in the series , I hope you can find what you are interested in in in this list .

  • The revolutionary and technical outline of blockchain

  • Blockchain technology details ( On )- The hash algorithm

  • Blockchain technology details ( Next )- Encryption and mining

  • Decentralized consensus mechanism

  • Intelligent contract

  • Traditional finance and virtual currency