header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

The cornerstone of prosperity: the technical architecture of blockchain commerce

Read this article in 9 Minutes
Five layers of technical architecture: network layer, consensus layer, data layer, intelligent contract layer and application layer.

Discussion on the technical architecture of blockchain business from the network layer, consensus layer, data layer, intelligent contract layer and application layer
Blockchain headquarters


The underlying technical architecture underlying the application of business scenarios is out of reach for most people. However, all commercial applications, services obtained on the block chain, are inseparable from the support of the underlying technical architecture.

Today we will talk about what the technical architecture of blockchain business contains.

Technical architecture interpretation of blockchain business (I)

In general, the block chain infrastructure can be divided into five layers, including network layer, consensus layer, data layer, intelligent contract layer and application layer, as shown in the figure below. Each layer completes a core function, and each layer cooperates with each other to achieve a decentralized trust mechanism.

从网络层、共识层、数据层、 智能合约层和应用层,聊聊区块链商业的技术架构 | 文末送书

Block chain application architecture figure a

1. The network layer

The main purpose of the network layer is to realize the information interaction between the block chain network nodes. The essence of a blockchain is a peer-to-peer (P2P) network in which each node can both receive and produce information and maintain communication between nodes by maintaining a common blockchain.

In the blockchain network, each node can create a new block, and when the new block is created, it will broadcast to other nodes, which in turn will verify the node. This new block is added to the main chain when more than 51% of the users in the blockchain network have verified it.

Layer 2. Consensus

The consensus layer enables highly dispersed nodes to agree on the validity of block data in a decentralized system. Common consensus mechanisms in blockchain include workload proof, equity proof and share authorization proof, etc. The author has made a detailed interpretation of this part in the previous chapter.

There are two main functions of consensus mechanism, one is reward, the other is punishment. Bitcoin and ethereum use a PoW workload verification mechanism. This mechanism will reward and punish according to the calculation force. If any node cheats, the calculation force will be lost.

Bitshares, Steemit and EOS use the DPoS share authorization certification mechanism. People with tokens can participate in the voting of nodes, and the nodes selected by others can participate in bookkeeping. Once cheated, they will be cast out by the system.

The incentive function mainly refers to giving tokens as rewards to encourage nodes to participate in the block chain security verification. For example, before the total number of bitcoins reaches 21 million, there are two kinds of rewards for bitcoins. Bitcoin (service fee) is deducted for each transaction. When the total number of bitcoins reaches 21m, the new block will no longer produce bitcoins, and the reward will be a fee deducted for each transaction.

3. The data layer

Data layer is the lowest level of technology, the main functions for data storage, account and transaction implementation and security. Data storage is mainly based on Merkle tree, which is realized by block and chain structure, and is mostly persisted by KV database, such as LevelDB adopted by bitcoin and ethereum.

Based on digital signature, hash function, asymmetric encryption technology and other cryptography algorithms and technologies, as well as account and transaction implementation and security functions, to ensure that transactions can be conducted safely in a decentralized situation.

The technicians who design the blockchain system first establish the starting node, known as the "creation block", and then create blocks of the same specifications under the same rules, connected by a chain structure to form a main chain. As the running time increases, new blocks are added to the main chain after verification, and the main chain is extended continuously.

Each block also contains a number of technologies, such as a timestamp technology, its role is to ensure that each block can be connected according to the order of time, such as a hash function, it is a kind of arbitrary length message via the hash algorithm to a fixed length of the message digest function, add close algorithm it is mainly used in information security field, file, digital signature and authentication protocol, etc.

4. Contract layer

The so-called contract layer mainly refers to various script code, algorithm mechanism and intelligent contract. Intelligent contract is a piece of code running on the block chain that can be executed automatically without intervention. EVM is a virtual machine running intelligent contract. Through intelligent contract, human can realize the transfer of assets without any intermediary intervention and develop some valuable decentralized applications.

Take bitcoin as an example. It is a programmable digital currency. The script of the contract layer encapsulates the transaction mode of bitcoin and various details involved in the transaction process.

Blockchain applications can also be built based on smart contracts, and you can easily develop your own blockchain applications (DAPP) without learning blockchain technology from zero. For example, based on ethereum corporate chain, developers can use solip language to develop smart contracts and build decentralized applications. Based on EOS, developers can write their own smart contracts using the C++ language.

5. The application layer

The application layer encapsulates various application scenarios and cases of block chain, such as cross-border payment platform based on block chain, which is also a decentralized application of DAPP. A complete DAPP contains a smart contract and a Web system that invokes the smart contract through an interface.

This layer is similar to a variety of software programs in the computer. It is a product that ordinary people can really use directly. It can also be understood as the Browser in the product of B/S architecture.

From the current situation, for many users, in addition to digital currency, there is no ready block chain application. If block chain technology wants to quickly enter the common people and serve the public, there must be a large number of applications combining with people's living and entertainment tools.

Technical architecture interpretation of blockchain business (ii)

China academy of information communication and advance planning to write a credible block chain block chain (2018), the white paper, summarizes the technical system for block chain do, also put forward a set of reference architectures, including infrastructure, based components, books, consensus, smart contracts, interface, application, operation operations system management part 9. The following are worthy of further study.

1. Basic component layer

The basic component layer can realize the recording, verification and dissemination of information in the block chain system network.

In the basic component layer, blockchain is a distributed system based on the propagation mechanism, verification mechanism and storage mechanism.

2. Book layer

The accounting layer is responsible for the information storage of the block chain system, including collecting transaction data, generating data blocks, verifying the validity of local data, and adding the blocks that have passed the verification to the chain.

The accounting layer has the following two types of data records.

In the asset-based model, the core of the asset is first modeled, and then the ownership of the asset is recorded, that is, the ownership is a field of the asset.

In an account-based model, an account is established as the object of assets and transactions, and the asset is a field under the account.

Layer 3. The consensus

The consensus layer is responsible for comprehensive coordination to ensure the consistency of data records across all nodes of the network. Common consensus mechanisms fall into two broad categories.

(1) probabilistic consensus mechanism

Write data first, and then reach a consensus, such as PoW, PoS and DPoS. Consensus will be reached if there is a large probability of agreement, and the calculation complexity is high. If more than one accounting node appears in a consensus, bifurcation occurs, and the longest chain shall prevail. The number of nodes can be changed at will, the more nodes, the more stable the system.

(2) deterministic consensus mechanism

Consensus is reached first, then written, consensus is reached after confirmation, consensus is confirmed, high network complexity; It requires quorum to vote, and P2P broadcast communication is adopted between nodes without bifurcation, such as PBFT and BFT variants. As the number of nodes increases, performance degrades, and the number of nodes cannot be changed arbitrarily.

From the perspective of application, in order to improve efficiency, the use of the consensus mechanism needs to be made in terms of security, reliability, openness and other aspects, and the consensus mechanism is evolving from a single to a mixed direction.

4. Smart contract layer

Responsible for implementing, compiling and deploying the business logic of the blockchain system in the form of code, completing the conditional triggering and automatic execution of established rules, and minimizing human intervention.

According to the completeness of Turing, the intelligent contract layer is divided into the following two categories.

Turing complete intelligent contract has strong adaptability, can be more complex logic of the business operations of the process, but there is a possibility of falling into an endless cycle.

Turing's incomplete intelligent contract can not carry out complex logic operations, but more simple, efficient and safe.

Smart contract is a high risk area of block chain security. In terms of improving security performance, there are several reference dimensions: formal verification, smart contract encryption, and standard syntax format of contract language.

5. The application layer

As part of the final presentation to users, the main function is to adjust the interface of the intelligent contract layer, adapt to various application scenarios of the block chain, and provide services for users. The white paper breaks down the applications into three types: value transfer, certificate of deposit and authorization management.

(1) value transfer class

Digital assets are transferred between accounts.

(2) exists

The information is recorded on the blockchain, but there is no asset transfer.

(3) authorization management


Use smart contracts to control data access, such as data sharing. To sum up, block is the container of data storage, while P2P network is the basic protocol to guarantee the operation of block chain, and consensus mechanism ensures that the nodes involved in accounting can work normally without human intervention. The application layer gives people a mature product to use.


At present, some companies have built block chain platforms, such as Hyperledger Fabric, R3 block chain alliance (R3CEV), ethereum enterprise edition, etc. Ethereum, for example, has grown over the years to more than 500 scenarios.

The block chain application of domestic financial institutions is still dominated by overseas Fabric platform. However, the larger players have followed a similar path to smartphones like android, iOS and blackberry. Micro, for example, shenzhen sea before the bank co., LTD., Shanghai universal Block Chain co., LTD, matrix elements (one) technology co., LTD. Jointly announced that the three of Open Source Chain of common building blocks of the underlying platform BCOS (Block Chain Open Source), to further promote the formation of the distributed business ecosystem, Chain blocks underlying platform pattern preliminary revealed.

Source:weixin.qq.com



Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit