Simple model in blockchain
blockchain is a kind of technology, which solves the core "trust" problem in the market economy and reces the trust cost between strangers to a very low level
there is one crucial thing in the market economy, which is "trust". Without trust, no deal can be established. When you go to LAICHANG to buy vegetables, if you don't believe that the pesticide content in vegetable is up to the standard, you won't trade with that dealer; If you buy a bottle of water in a small shop, the clerk will not sell you the water if he doesn't believe that the money you give is real
the traditional small-scale peasant economy is acquaintance economy, and the transaction scale is limited to people who are familiar with each other nearby. If an acquaintance deceives you, he will lose your social relationship and damage his reputation in the whole circle of acquaintances. We believe that acquaintances are less likely to cheat us than strangers
therefore, once we are beyond the scope of acquaintances, we need to use a high cost to identify whether a stranger will cheat me and how to avoid the risk of being cheated. This situation will hinder the transaction and restrict the transaction
in addition, different races, nationalities, cultures, religious beliefs and so on will naturally have this kind of trust problem
in the market economy, why can there be so many transactions between strangers? Because of the birth of a new mechanism to solve the problem of trust in strangers
so far, the most important mechanism to solve the trust problem is the "trust intermediary" organization and mode
as long as you and strangers trust a third-party organization, the trust problem between you can be solved through this third-party organization
this third-party organization, we call it trust intermediary. Both the government and the bank are trust intermediaries
you can sell the goods you have worked hard to proce to a stranger in exchange for a stack of RMB banknotes. It's because the credit of the note issuing bank and the guarantee of the authority of the government guarantee the currency value and effectiveness of the banknotes. Otherwise, sell things, in exchange for a few ordinary paper, who would like to
in the era of global village and Internet, the people who buy your things may be strangers who will not meet and thousands of miles away. Trust is lower, so Alipay assumes the role of trust intermediation. Buyers first pay the goods to Alipay's account. When they receive the goods, they confirm that they are OK, then they agree to sell the goods to the seller. Taobao and other e-commerce have been booming rapidly in just over ten years
trust intermediary is in a central position in the transaction system. All transactions should solve the trust problem through it
However, the cost of trust intermediary itself is often hugeas a trust intermediary, how much transaction tax does the government charge each year? What is the most profitable instry? Financial services. The annual profits of Alipay's ant suit are over ten billion. p> What does this mean? Both sides of the market actually pay a huge trust cost
if there is any way to cancel or greatly rece the trust cost, the transaction cost of the general public can be reced, and the profits can be greatly increased
so in the Internet era, blockchain technology is on the stage
it allows the trading party to get rid of the intermediary, solve the problem of trust among strangers, and greatly rece the cost of trust
the blockchain can be expanded on a large scale, the data is open and transparent, the data of each client is consistent, and even if some clients are destroyed, the data security will not be affected. These highly reliable technical features can solve the trust problem of strangers with low cost
this technology can be extended to all fields that can be digitized, such as digital currency, payment and clearing, digital bills, proof of rights and interests, credit reference, government services, medical records, etc
in the medium and long term, blockchain will be a revolutionary technology, which will bring about great social changes like the existing Internet, and has great investment value and money making opportunities
in the future, the companies that can combine blockchain with different scenarios to promote applications may be the next group of bat, the next Google, Microsoft and apple
as the first practical application of blockchain technology, bitcoin has been widely accepted and used all over the world. Millions of users and tens of thousands of merchants have accepted the payment of bitcoin as a digital currency, and the exchange value of bitcoin as a currency is growing. Even e to the consensus that the total amount is fixed and the long-term value is bullish, bitcoin has become a hedge asset similar to gold, and the price has skyrocketed
1. Data layer
the data layer is the lowest layer in the six hierarchies of the blockchain. We can understand the data layer as a database, but for the blockchain, this database is a tamperable and distributed database, which is what we call "distributed ledger"
in the data layer, that is, the "distributed ledger", the data information on the blockchain is stored, and the blockchain structure, asymmetric encryption technology, hash algorithm and other technical means of the block are encapsulated to ensure the security of the data in the case of the whole network being open. The specific method is:
in the blockchain network, nodes use consensus algorithm to maintain the consistency of data layer (that is, the distributed database), and use asymmetric encryption and hash algorithm in cryptography to ensure the non usurpation and traceability of the distributed database
This constitutes the bottom data structure of blockchain technology. However, it is not enough to have a distributed database. We also need to let the data information in the database be shared and exchanged. Next, we will introce the upper layer of the data layer - the network layer
Second, network layer
the network system of blockchain is essentially a P2P (point-to-point) network. Point to point means that there is no need for an intermediate link or centralized server to control the system. All resources and services in the network are distributed in the hands of each node, and the transmission of information is also a direct communication between the two nodes. However, it should be noted that P2P
(peer-to-peer) was not invented by Nakamoto, and the blockchain only integrates this technology
therefore, the network layer of blockchain is actually a particularly powerful point-to-point network system. In this system, each node can not only proce information, but also receive information, just like sending e-mail. You can write your own e-mail, and you can also receive the e-mail sent to you by others
in the blockchain network, nodes need to jointly maintain the blockchain system. Every time a node creates a new block, it needs to notify other nodes in the form of broadcast. After receiving the information, other nodes verify the block, and then create a new block on the basis of the block. In this way, the whole network can jointly maintain and update the general ledger of the blockchain system
however, what rules should the whole network follow to maintain and update the general ledger of the blockchain system? This involves the so-called "laws and regulations" (rules), which we will introce next: the consensus layer
Third, consensus layer
in the world of blockchain, consensus simply means that the whole network should maintain and update the general ledger of blockchain system according to a unified and agreed rule, which is similar to the rule of updating data. It is one of the core technologies of blockchain and the governance mechanism of blockchain community to let highly dispersed nodes reach consensus efficiently in the decentralized blockchain network
at present, the mainstream consensus mechanism algorithms include: proof of work of bitcoin (POW), proof of rights and interests of Ethereum (POS), proof of rights and interests of EOS (dpos), etc
we now introce the data layer, network layer and consensus layer. These three layers ensure that there are data, networks and rules for updating data on the network. However, there is no free lunch in the world. How can nodes actively participate in the maintenance of the blockchain system? Here is the incentive layer, which we will introce next: incentive layer< 4. Incentive layer
incentive layer is the so-called mining mechanism, which can be understood as incentive mechanism: you can get as much reward as you contribute to the blockchain system. With this incentive mechanism, the whole network nodes can be encouraged to participate in the data recording and maintenance on the blockchain
mining mechanism and consensus mechanism are actually the same truth. Consensus mechanism can be understood as the company's general rules and regulations, while mining mechanism can be understood as the reward rules for what you do well in the general rules and regulations
just like the consensus mechanism POW of bitcoin, it stipulates that more work pays more. Whoever can find the correct hash value first can get a certain amount of bitcoin reward
and Ethereum's POS stipulates that the older the holder is, the more likely he or she will be rewarded
it should be noted that the incentive layer is generally only available for the public chain, because the public chain must rely on the nodes of the whole network to jointly maintain data, so there must be a set of incentive mechanism to encourage the nodes of the whole network to participate in the construction and maintenance of the blockchain system, so as to ensure the security and reliability of the blockchain system
the blockchain is safe and reliable, and it is not intelligent enough, right? The contract layer we will introce next can make the blockchain system more intelligent
v. contract layer
Contract layer mainly includes various scripts, codes, algorithm mechanisms and smart contracts, which is the basis of block chain programming. What we call "smart contract" is at the contract level
if the bitcoin system is not intelligent enough, the "smart contract" proposed by Ethereum can meet many application scenarios. The principle of the contract layer is to embed the code into the blockchain system, in this way to realize the smart contract that can be customized. In this way, on the blockchain system, once the terms of the smart contract are triggered, the system can automatically execute commands< Finally, the application layer. The application layer is very simple. As the name suggests, it is a variety of application scenarios and cases of blockchain. What we now call "blockchain +" is the so-called application layer. At present, the blockchain applications that have been implemented are mainly various blockchain applications built on
eth, EOS and other public chains. There are more applications of gambling and games, and the real practical applications have not yet appeared.
Blockchain technology is not a single innovation technology, but the result of a variety of technology integration and innovation, its essence is a weak center, self-confident underlying architecture technology. Compared with the traditional Internet technology, its technical principle and model architecture is a major innovation. Here, we will analyze the basic technical model of blockchain
protocol layer
the so-called protocol layer refers to the lowest level technology. This level is usually a complete blockchain proct, similar to the operating system of our computer. It maintains network nodes and only provides API for calling. Usually, the government will provide a simple client (commonly known as wallet). The function of this client wallet is also very simple. It can only establish address, verify signature, transfer payment, check balance, etc
extension layer
this layer is similar to the computer driver, which is to make blockchain procts more practical
application layer
this layer is similar to all kinds of software programs in computers. It is a proct that ordinary people can really use directly, and it can also be understood as the browser of B / S architecture procts. The application of this level is almost blank at present.
When it comes to blockchain, there are good and bad things in many people's minds, but no matter what? It has nothing to do with the dragon ball, right? Because the dragon ball is the dragon ball. It is a real business landing and business empowerment dragon ball. The following pictures show what the deflation model is, which is also the original deflation model created by dragon ball Dall