A three-step guide to quickly understand Blockchain technology!

Source: Internet
Author: User
Tags pow valid
a three-step guide to rapid understanding of blockchain technology.

Since the year after, the small series has been asked by N small partners "what is blockchain." The For this problem, different people may have different answers.


In Dr. Xiaofeng's latest speech, he explains the blockchain in terms of the hierarchical decomposition of the blockchain, the process of technological development, and the economic significance. (Click here to see Dr. Shaw's latest speech: Xiaofeng Blockchain: What we're talking about when we talk about cryptography economics.) )


This article is translated from a Foreign Language blog, in three steps, in a plain and easy-to-understand tongue, explaining the blockchain's three main components: the blockchain itself, the point-to-point network, and the consensus mechanism, help us to understand the underlying technology of the blockchain gradually. In conjunction with Dr. Xiaofeng's speech, you will have a deeper and more thorough understanding of blockchain technology from the institutional, economic and technical levels.


This article is easy to understand even if it is a non-technical person. We will share it with you for your reference.


The following is translated from Thijs Maas's post on Hackernoon, "The Quick, 3-step Guide to Blockchain Technology", which represents the author's view only and does not represent the stance of the Wanxiang blockchain, for informational purposes only.


The first step is to understand the blockchain technology itself


In simple terms, blockchain is actually a way of building data. It is a ledger: a file that holds accounting records.


This file is like a book that will never end.


Each page of the book has the content and there is a page number at the bottom of the pages, with the page number, you can immediately know where the page belongs, such as page 49th is between 48th and 50th pages.


Like pages, each chunk is filled with content. Although chunks do not have a definite number, they have a timestamp, and the function of the timestamp is exactly the same as the function of the page number, which is the "number" of each chunk. A new chunk is always added after the chunk with the most recent timestamp. In this way, the chain is formed.


The coolest part of the blockchain is that it uses cryptography to ensure that when any information on the page is changed, we can immediately notice it. This attribute makes the blockchain a good data structure for saving and tracking valuable records.


In the Bitcoin blockchain, the chunk contains the bitcoin transaction information, such as Zhang San sending the bitcoin to Li Si.


Since bitcoin blockchain records all transactions since Bitcoin exists, we can check the ledger to determine when Li Si owns the bitcoin. "Who owns something at some point" is what we call the "state" of the blockchain.


When a transaction is recorded in a chunk and added to the chain, the deal really happens. As a result, when a chunk is added to the chain, the blockchain is updated. This means that if I want to verify that someone really has transferred a bitcoin to me, I have to be able to check the status of the blockchain. In order to be able to do this, the ledger must be publicly available. This is where point-to-point networks work.


The second step is to understand the role of point-to-point networks


It would be annoying if the blockchain was just stored on a single computer and it happened to be shut down. Because I can't verify the other side to got their sums me anytime and anywhere. As a result, blockchain is distributed across several computers in various parts of the world.


These computers are called "nodes" that work together in a point-to-point network to ensure the security and state of the blockchain is up to date. Each node stores a full version of the blockchain, and each node updates the blockchain whenever a new block is added. Using a point-to-point network has the following advantages:


I can use the blockchain to check the trading status anytime and anywhere.

I do not rely on a party to understand the latest status of the transaction;

When a hacker attack occurs, the other party must attack thousands of computers at the same time, not just a single server;

You don't have to worry about deleting or tampering with the information in the blockchain, so you have to modify the information on all your computers to do this.


But this does not mean that the blockchain is 100% secure. For example, how do I know that the information recorded in the blockchain is correct. How to verify that the chunk contains no invalid transactions. If there are different versions of the blockchain, then how do I know which blockchain is the real record.


The neat part of the blockchain is that these problems can be solved by consensus mechanisms.


The third step to understanding the consensus mechanism


The magic of the consensus mechanism is that it allows all nodes in a point-to-point network to work together without having to know and trust each other.


The consensus mechanism is a simple set of rules: nodes in the network are agreed by running network software. These rules ensure that the blockchain network works as expected and stays in sync.


The consensus agreement provides that:


How to add chunks to a chain

When is the chunk considered to be effective?

How to resolve the conflict of truth


"Add chunks to the chain"


There are different ways to add chunks to different blockchain chains.


The most famous consensus mechanism is the Bitcoin POW mechanism (proof of workload). The first rule of the POW is: on average every 10 minutes, a chunk is added to the blockchain.


This process is called "mining", and adding new blocks to the node is called "Miner". Under the POW mechanism, the system will be a password puzzle, the miners use the computer to solve the system password puzzles to add new blocks. The consensus mechanism stipulates that a new block can be added only after the password puzzle has been successfully resolved. Miners who successfully added new blocks were able to receive the SGD as a reward for pre-burial in the system. Then all the miners started digging the next block.


PoS (equity proof) is also one of the common consensus mechanisms. This mechanism determines the right to account by calculating your interests, including the amount of money you hold and the time you hold the currency. The right to add a new district block to anyone who has a large equity.


"Effectiveness of The Block"


When the miners solve the puzzle "dig out" chunks, all nodes in the network will check if the chunk is valid and add it to their own blockchain copy.


Nodes first need to agree on the legitimacy of the block, only so that the network can achieve synchronization and update the state of the blockchain. Only new blocks that follow the rules set by the consensus mechanism will be recognized by the nodes and added to the chain. Blocks that do not follow the rules will be rejected for addition.


Typically, only blocks that contain transaction information are valid. In the case of Bitcoin blockchain, the protocol rules stipulate that bitcoin cannot be sent if Bitcoin is not received from someone else or is dug up. In other words, if the sender has received enough bitcoins to trade, the node will run the software to check all the transaction information in the block to check the network status.


Now, assuming I've received 1 bitcoins, I later sent it to Zhang San, and then I tried to send the same bitcoin to John Doe. As long as my first deal is added to the chain, all nodes update the blockchain to prove that I do not have the Bitcoin now, then any block that contains the transaction information for me and John Doe will be rejected. The nodes ' software found that the block did not follow the rules, so they did not add the block to the chain.


The rules also stipulate that only transactions with digital signatures of bitcoin holders are valid transactions. Only the person who controls the sending of a Bitcoin wallet or address can sign the transaction. Therefore, only you can spend your bitcoins.


"How to resolve the conflict of truth"


In the occasional case, two miners are added to the chain at the same time, a portion of the node accepts one of the miners ' effective blocks, and the other part accepts a valid block from another miner. The first block contains information about my and Zhang San transactions, and the second block contains information about the transactions between me and John Doe. Now, I suddenly have two different states of blockchain.


We refer to this as "forking". Zhang San or John Doe have bitcoins that I send. Which of the two chains is the ' real ' blockchain.


Generally, all consensus agreements have a simple rule to solve this problem: the longest chain wins.


When the fork occurs, some miners will be digging on the chain, and some miners will be digging on the other side of the chain. Inevitably, a chain of miners will certainly be more than the other chain of miners, so the number of miners that chain will grow faster.


The miners on the other chain will migrate to the longer chain, and the forked chains will disappear. This has no damage to the main chain.



Because miners are economic actors who act in self-interest. If a miner knew that the forked chain would die, it would not be interested in mining on the fork chain. All transactions on the fork chain will never occur on the main chain, which means miners digging on the fork chain will not be rewarded.


In this case, we call it a soft fork.


In a few cases, a fork chain can produce a large amount of mining capacity. In this case, it may take some time to determine which chain is the primary chain. The traditional view is that waiting for 6 blocks can really confirm a transaction.


The translator adds: this is called a hard fork, the nodes working on the original chain cannot verify the chunks on the fork chain, so that two strands are separated. The two chains will run together.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.