Get to know the six layers of blockchain and understand the mining principles

507195 views Mining Copy share



In the case of blockchain architecture's distributed network, each network participant maintains, authorizes and updates new entries. The blockchain architecture is divided into six layers from bottom to top, that is: data layer, network layer, consensus layer, incentive layer, contract layer, and application layer. Each layer fulfils different core functions, and all layer work with each other to achieve a decentralized trust mechanism.

·Data Layer

The data layer can be construed as a database, but for blockchain, this database is a tamper-proof and distributed database, which mainly enables two functions: data storage, and security of accounts and transactions.

The data layer mainly describes the physical form of blockchain and is a chain structure starting from Genesis block on the blockchain, which contains block data and chain structure on the blockchain, random number, time stamp, public key and private key data on the blocks, and is the underlying data structure in the whole blockchain technology.

·Network Layer

Once the data is combined in sequence, how do other nodes in the network know about it? This requires the network layer to enable the information exchange among the blockchain nodes.

The network layer mainly enables the mechanism of distributed network through P2P technology. The network layer includes P2P networking mechanism, data transmission mechanism and data validation mechanism. Therefore, blockchain is essentially a P2P network with automatic networking mechanism, and communication among nodes is maintained by maintaining a common blockchain structure. Each node both receives and generates information.

·Consensus Layer

If each node on the blockchain can generate a new block to fulfill bookkeeping, the entire bookkeeping system is prone to chaos. The consensus layer allows highly dispersed nodes in a P2P network to reach a consensus on the validity of block data.

Consensus, in short, means that the whole network should maintain and update the general ledger of the blockchain system according to the rules for updating data with consensus.

From the perspective of mining, the network decides which miner is responsible for writing to the block according to the consensus mechanism, thus the consensus mechanism is also the principle of mining.

·Contract Layer

Blockchain is programmable, based on the fact that its contract layer encapsulates various scripts, codes, algorithmic mechanisms and smart contracts, enabling the positive automatic execution of various instructions.

Take smart contract as an example, which is a section of codes stored on a blockchain that can be executed automatically without a third party if certain constraints are met, which is the foundation of enabling trust in blockchain. Replacing people with programmed algorithms to arbitrate and execute contracts will save us huge trust cost.

 ·Incentive Layer

As can be seen from the above, by data layer, network layer and consensus layer, blockchain ensures the existence of data, network and rules for updating data on the network. However, as the saying goes, “there is no free lunch”. How to make nodes actively participate in the maintenance of blockchain system? This is where incentive comes in.

The incentive layer mainly consists of the issuance system and distribution system of economic incentives. Its function is to provide certain incentive measures to encourage nodes to participate in the security validation in the blockchain, incorporate economic factors into the blockchain technology system, motivate nodes that participate in the bookkeeping in compliance with the rules, and punish nodes that fail in complying with the rules.

Mining in Bitcoin, for example, is about recording transaction information, and the Bitcoin network encourages miners to participate in bookkeeping by rewarding them with BTC tokens.

·Application Layer

The application layer of blockchain encapsulates various application scenarios and cases, similar to applications on computer operating systems, portals on Internet browsers, search engines, e-malls or APPs on mobile phones.

Disclaimer : The above empty space does not represent the position of this platform. If the content of the article is not logical or has irregularities, please submit feedback and we will delete or correct it, thank you!