Editor's note: The author Linglong Xieseng is a celebrity on Zhihu. Her 35 answers on Zhihu have received 183,706 likes and 29,385 thanks. Regarding the question "What is blockchain technology? What can it be used for in the future?", the answerer Linglong Xieseng will tell you that it turns out that these dry questions can be powerfully yet harmoniously integrated into selfies.
No one would have thought that I could incorporate such a practical question into my selfie in a strong yet harmonious way. I have been studying blockchain and Bitcoin related technologies recently, and when I saw this question, I thought of writing something for your reference. If there is anything wrong, I hope seniors can give me more advice. More pictures ahead In layman's terms, blockchain is a general ledger that records all historical transactions, and each block contains several transaction records. If blockchain is a ledger, then blocks are each page of the ledger. The details of the transaction are recorded in a public ledger that anyone on the network can see. A block is a collection of transaction data, which is marked with a timestamp and a unique mark of the previous block. Valid blocks will be appended to the main blockchain after being recognized by the consensus of the entire network. The blockchain is a data structure in which blocks containing transaction information are linked in order from back to front. Here, I will use Bitcoin-related knowledge to explain it with an example. In the field of Bitcoin, there is a concept called "miner". Miners refer to the various network nodes that generate workload by repeatedly performing hash operations. (Each node is a collection of functions such as routing, blockchain database, mining, and wallet services) Miners need to compete to complete a mathematical problem based on a cryptographic hash algorithm. The answer is in the new block. Whoever solves the answer first can broadcast in the p2p network that he has obtained the block. Other miners will realize that they have lost the game and will immediately start mining the next block. Each miner has a special transaction in his block. They will use the newly generated bitcoins (currently 25 bitcoins per block, which will be halved in 2016) as a reward and then pay it to their own bitcoin address. Once the block is recognized and verified, that is, it is added to the blockchain, his reward can become available and spendable. In the Bitcoin system, a new block can be discovered every ten minutes on average. In the fully decentralized Bitcoin network (that is, not controlled by any third party), difficulty adjustments are made independently and automatically in each complete node, so that the output rate of new blocks is maintained at an average of one every ten minutes. The time it takes to generate a block = difficulty x2 to the power of 32 / hashrate (hashrate is the number of hash operations per second) Difficulty value difficulty = maximum target value / current target value Let me explain it anthropomorphically. Single guys are looking for girlfriends. The national mother-in-law said, "I have many daughters. Let me give you some questions. If you solve one, I will give you the WeChat ID of one of the girls." The single dogs competed madly, racking their brains to solve the problems. As long as one dog solved a problem, he would immediately announce it to the world with pride, telling all the single dogs that the girl was mine, so give up. Even if the other single dogs were dissatisfied, they had no choice but to solve the next problem. The lucky dog who won the girl was recognized by his mother-in-law and received a gift of 25 currency units. He was a real winner in life. My mother-in-law would adjust the difficulty of the questions by solving them quickly. Sometimes, the questions were too difficult, and no young man had come to propose marriage for a long time. She thought, this is not good, I can't let my daughter be a waste of time, so I have to lower the difficulty of the questions. Sometimes, the difficulty is too easy, and one of them gets married in less than 10 time units. This is even worse, so I quickly use the difficulty increase skill. By the way, this year is 2016, and my mother-in-law's gift money will be halved... . . No more fuss. . Back to the topic. . What is described above is actually the concept of "mining" The so-called mining is to guess a nonce value so that the summary value of the block is less than a target value that will be adjusted linearly according to the difficulty. This is also called proof of work. To put it simply, it is a process of repeatedly calculating the hash value of the block header and constantly changing the parameters until it matches the hash value. When the node creates a candidate block, the miner is ready to start mining. The mining machine starts running the SHA256 algorithm at super high speed. These hardware will be connected to the mining node on the computer via USB, and then the mining node will pass the block header information to these hardware, allowing them to perform very high-frequency nonce tests. When a transaction is included in a block, it can be considered a confirmation. After this block, the number of transactions for this item increases by one for each block generated. When the number of confirmations reaches more than six times, it is generally considered that the transaction is relatively safe and irreversible. Now, this transaction has been spread on the Bitcoin network, but only when it is verified and added to a block can this transaction become part of the blockchain. New transactions are constantly pouring into the Bitcoin network. When nodes see these transactions, they will temporarily put them into a temporary transaction pool that they maintain. When miners create a block, they can take these transactions out of the transaction pool and put them into the new block, and then prove the legitimacy of the block by solving a very difficult problem. The picture below is a block I randomly captured from the http://blockchain.info website. Generally speaking, it is almost impossible for individual miners to make a profit by mining independently in such a competitive environment. Because their computing power makes it difficult for them to mine blocks on their own to balance the hardware equipment costs and related electricity costs. So at this time, they will choose to join a mining pool. Many miners are combined into a mining pool, gathering everyone's computing power, and then sharing the rewards together. So if nothing unexpected happens, the string of characters behind the big green arrow in the middle of the last line is the address of a mining pool rather than an individual miner. The mining pool received a reward of 25 bitcoins, and the extra fraction behind is the mining fee obtained from participating in mining. Now let’s click on the receiving address and take a look at the information inside. The 31confirmation in the blue box means that this transaction has been verified 31 times. When the number reaches 120 times, it proves that the transaction is established. You can also open a terminal and run $curl https://blockchain.info/unspent?active=1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE You can also query Like this: Easter Eggs Let’s take a look at the genesis block in the Bitcoin space. On the right is a sentence left by Satoshi Nakamoto, the founder of Bitcoin.
This sentence was exactly the headline of the front-page article of the Times that day. Let’s get back to blockchain. As I mentioned above, each block header is hashed with SHA256 to generate a hash value, through which we can identify a specific block in the blockchain, and each block header also contains the hash value of its parent block. (Image from "Mastering Bitcoin") Each child block has only one parent block, but a parent block can temporarily have many child blocks, which is called a blockchain fork. This only happens when different miners discover different blocks at the same time. The solution is that each node always chooses and tries to extend the blockchain with the largest proof of work (the longest or the most difficult one). For example: (Image from "Mastering Bitcoin") We now have a blockchain - Blue (Picture from Mastering Bitcoin, the cute girl is from me) The miners in area X and the miners in area Y discovered two blocks at the same time. We assume that: Miner Panda A found a block - red, Miner Rabbit B found a block - green. When Panda A and Rabbit B nodes broadcast on the Bitcoin network, some nodes will receive Panda A's broadcast first, and some will receive Rabbit B's broadcast first. Then the nodes in the two camps will start to use the blocks they received as parent blocks and conduct further mining activities. (The geographical meaning of the node here refers to the location in the network topology, not the actual geographical location.) (Picture from Mastering Bitcoin, the cute girl is from me) At the critical moment when everyone was working hard to solve the problem, Rabbit C, who received the node broadcast by Rabbit B, found the next block - pink first, which means that the blockchain of the rabbits in the green camp can be extended to the next step, which will be longer than that of the red pandas in the red camp. The red pandas in the red camp are unfortunately out of the game. In this way, the fork problem is solved. (Picture from Mastering Bitcoin, the cute girl is from me) Here we need to mention a term, "consensus attack". A very famous scenario is the "51% attack". If a group of miners have 51% of the computing power of the entire network, then as long as they unite, they can attack the entire Bitcoin network. They can deliberately create a forked blockchain to achieve double payment. Take our example above. The attacker has made a transaction in block-red. As a result, he forcibly creates block-green, and replaces the original transaction in block-green with another transaction (the money that should have been given to the seller is deposited into the wallet of his accomplice), and then calculates another block-pink based on block green. In this way, the blockchain containing the forged block is one level higher than the block red containing the real transaction. At this time, the malicious blockchain containing double payment will replace the real blockchain, thereby achieving fraud. The concept of 51% does not mean that an attacker needs 51% of the computing power of the entire network to launch an attack. Theoretically, an attack can be carried out with less than 51%. We just say that an attack with more than 51% of the computing power can almost certainly succeed. The above are all discussions in the context of Bitcoin. So in what fields will blockchain technology be used?
A long-term observer of domestic Internet finance said, "The current situation of blockchain is similar to TCP/IP (a technology that appeared in 1969 and was not fully applied until 30 years later) or HTML when it first came out. There is no application that can be found. Except for Bitcoin, there is a lack of killer applications. Bitcoin is only blockchain 1.0, while smart contracts are 2.0. The higher application of blockchain is corresponding to the Internet of Things, to achieve real-time credit confirmation." I personally believe that blockchain technology is a very promising field and is worthy of study and research by everyone who is interested. There is still a long way to go before blockchain can be truly widely used. What we need to do is to accumulate technology and wait for the right time to mature. |
<<: The hard fork made Ethereum lose its trustlessness, and Slock.it should be blamed for this
Written by: William, works at Huobi Research Inst...
In July, we reported that researchers and entrepr...
What kind of woman is a good wife and mother? A r...
In physiognomy, eyebrows represent the Palace of ...
In fact, the development direction of blockchain ...
Short life is a very scary word for many people. ...
Is it good to have wide eyebrows? Some people hav...
What are the characteristics of premature death in...
Face reading, palm reading, zodiac sign, etc. are...
By looking at a woman's face, you can know he...
Snowy days may be the favorite of many people. Th...
Money has always been something we all dream of. ...
What does a mole on the palm mean? What are the s...
How can we analyze women's fate based on thei...
A person's facial expressions change with the...