Internal distribution blockchain
We need to establish data layer, network layer, consensus layer, incentive layer, contract layer and application layer
1. The data layer encapsulates the underlying data blocks and related basic data and algorithms such as data encryption and time stamp
2. The network layer includes distributed networking mechanism, data transmission mechanism and data verification mechanism
The consensus layer mainly encapsulates all kinds of consensus algorithms of network nodes The incentive layer integrates economic factors into the blockchain technology system, mainly including the issuing mechanism and distribution mechanism of economic incentives5. The contract layer mainly encapsulates all kinds of scripts, algorithms and smart contracts, which is the basis of the programmable characteristics of blockchain
6. The application layer encapsulates various application scenarios and cases of blockchain Xi Jinping, general secretary of p>
, general secretary of the CPC Central Committee, stressed in the eighteenth collective learning of the Central Political Bureau, "block chain as an important breakthrough in core technology and independent innovation", "accelerating the development of block chain technology and instrial innovation". <
p>
the forward-looking judgment of the CPC Central Committee has brought the "blockchain" into the public view and become the common focus of financial capital, real economy and public opinion
from network power to big data, from media integration to blockchain, the Politburo of the CPC Central Committee has collectively studied and aimed at the forefront of technological change, showing the direction, foresight and foresight of the CPC Central Committee, leading the pace of China's instrial change and economic transformation. This collective study of the Political Bureau of the Central Committee of the CPC, with special emphasis on "blockchain", has opened up an imaginary space for the development and application of blockchain
from the perspective of science and technology, blockchain involves many scientific and technological issues such as mathematics, cryptography, Internet and computer programming. From the perspective of application, in short, blockchain is a distributed shared ledger and database, which is decentralized, tamper proof, traceable, collective maintenance, open and transparent
these features ensure the "honesty" and "transparency" of the blockchain, and lay the foundation for creating trust in the blockchain. The rich application scenarios of blockchain are basically based on the fact that blockchain can solve the problem of information asymmetry, and realize the cooperative trust and concerted action among multiple agents
From the perspective of technology and architecture, I will tell you my understanding of blockchain in common language
what is blockchain? In a word, blockchain is a storage system. To be more specific, blockchain is a distributed storage system without an administrator and each node has all the data
What are the common storage systems like
first, how to ensure high availability
the common storage system usually uses "rendancy" to solve the problem of high availability. As shown in the figure above, if the data can be copied into several copies and rendant to multiple places, high availability can be guaranteed. The data in one place is hung, and there is data in other places. For example, the master-slave cluster of MySQL is the same principle, and the raid of disk is also the same principle
two points need to be emphasized in this place are: data rendancy often leads to consistency problems
1. For example, in the master-slave cluster of MySQL, there is actually a delay in reading and writing, which means there is a inconsistency in reading and writing in a short period of time. This is a side effect of data rendancy
The second point is that data rendancy often reces the efficiency of writing, because data synchronization also consumes resources. If you add two slave libraries, the write efficiency will be affected. The common storage system is to use rendancy to ensure the high availability of dataso the second question, ordinary storage system, can write more
the answer is yes, for example, take this graph as an example:
in fact, MySQL can do a master-slave synchronization of al masters, master-slave synchronization of al masters, two nodes can be written at the same time. If you want to do a multi room multi live data center, in fact, multi room multi live data synchronization. What we should emphasize here is that multi-point writing often leads to the consistency problem of writing conflicts. Take MySQL as an example, suppose that the attribute of a table is self incrementing ID, then the data in the database is 1234 now. If one of the nodes writes and inserts a piece of data, it may become 5, and then these 5 pieces of data are synchronized to another master node, Before synchronization, if another write node inserts a piece of data, a piece of data with self incrementing ID of 5 will be generated. Then, after the generation, synchronize to another node, and the synchronized data will conflict with the two local 5's after it arrives, which will lead to synchronization failure and write consistency conflict. This problem will occur in the case of multi-point writing
how to ensure consistency in multi-point writing
the reform "Swan class" gives you more technical work
however, Yuanbao coin, Ruitai coin, bitcoin and the tokens of different crowdfunding projects in Europe are excellent digital currencies.
the second category of blockchain projects is platform. The main function of platform projects is to establish a technical platform to meet the technical requirements of various blockchain application development
in short, platform applications allow developers to directly issue digital assets and write smart contracts on the blockchain. Smart contract is a computer program running on the blockchain database, which can be executed by itself under the condition of meeting the source code setting
for example, you develop a smart contract based on the house rent protocol on the blockchain. When the owner receives the rent, it will trigger automatic execution and give the security key of the apartment to the tenant
the main function of platform blockchain projects is to establish the underlying technology platform, so that developers can do application development on the underlying technology platform. A considerable number of platforms are still in the development state. As of January 2018, Ethereum has the largest market value.
in order to deal with the disadvantages of mining machinery arms race caused by bitcoin mining, many new generation digital currencies are no longer using bitcoin mining method, but focus on mining or purse mining, such as Ruitai coin, gold card and so on. Of course, there are some disadvantages.