QitChain Network Architectural Details and the Basic Principles of Consensus

Introduction

In the first three articles of this series, we made some brief introductions to the basic situation of QitChain, including the background, infrastructure overview, consensus, economic system and ecological environment. So far, the preliminary preparations for QitChain have been basically completed, so we can discuss some deeper and more detailed content.

In this article, we will discuss the technical details of QitChain’s architecture, the block structure of the entire distributed system, and the technical nature of CPoC consensus, so as to deepen readers’ in-depth understanding of the QitChain system and enhance their confidence in the system’s prospects.

Therefore, when it comes to block structure and consensus content, we will spend more time discussing the technical architecture of QitChain and the cryptographic ideas behind these architecture designs. We believe that such discussions can give readers a better understanding of why we have given QitChain a relatively cautious optimism in terms of technical architecture.

The second combing from scratch: the architectural details of QitChain Network.

QitChain Network is one of the cores of the entire QitChain project, providing core support for the entire ecosystem. In QitChain’s blueprint, it will provide distributed storage and service construction, discovery and other functions. According to the design of the QitChain team, the QitChain Network is mainly composed of five parts:

Storage:

Storage is the foundation and soul of QitChain Network. In our published series of articles, we mentioned that QitChain Network is secure due to its distributed design and can store important files including key documents, videos, and code. Of course, such expressions are limited to the user level. In fact, in the architect’s plan, this part also needs to store the growing data in the QitChain chain, including basic data content such as blocks, chain information, transaction records, Merkel trees, etc., and allows network participants to communicate with each other. reach a consensus that there is no need to trust the existence of a third party.

Consensus:

The consensus algorithm of QitChain Network adopts advanced CPoC consensus. We also briefly described the advantages of this algorithm before. In the following sections, we will continue to explain the mathematical algorithm of this consensus in detail.

Client:

The client is a component directly facing QitChain users, which allows users to query, manage and trade their accounts and the digital assets in them.

Peer-to-peer network:

The QitChain network based on a peer-to-peer architecture allows nodes to communicate with each other and exchange information with the outside world. Of course, based on the distributed architecture, one of the most important features of the blockchain, the nodes of QitChain Network do not have a hierarchical structure, so they have the characteristics of transparency and reliability. While each node provides external services, it can also use services from other nodes in the network at the same time. In a word, the entire QitChain Network is a collection of all nodes operating according to a specific distributed point-to-point protocol.

Interfaces:

QitChain Network allows users to interact with external networks through them. In addition to the basic http interface, the system also provides the WebSocket RTC interface. The latter is a solution designed to solve remote calls between servers in a distributed system. Through the RTC interface, users can make remote calls through them and servers in the external network as simple and convenient as local calls.

To sum up, we can see that the five parts of QitChain Network have corresponding functions, and are responsible for important tasks such as underlying logic, user interaction, and external communication. Among them, storage, consensus and client are internal; and point-to-point network and interface are external, making the whole project an organic technical solution. A relationship diagram on QitChain’s white paper can intuitively summarize the position of each part in the QitChain Network and the relationship between them.

QitChain Network Architectural

Division of Cooperation: Node Type and Structure of QitChain

In a distributed network system, nodes are the most basic and important elements: they are responsible for receiving, storing and broadcasting data, obtaining block rewards, managing digital assets, and constituting network routing. In the start-up era of distributed systems, nodes are equal, they have the same structure, store the same network-wide data, and faithfully record every digital asset transaction on the entire network.

But just as you cannot have both, the “impossible triangle” of the blockchain proves that if a distributed system is to move from the ivory tower of cryptography to the general public, certain compromises in security must be made to meet the needs of the general public. high performance requirements. And the fact is also the case, a large number of blockchain projects have changed some nodes in order to improve performance, resulting in a situation of division of cooperation between nodes.

As we mentioned in previous articles, QitChain nodes include full nodes and light nodes. But these two kinds of nodes are not the full classification of nodes. In QitChain, there are the following different nodes in the whole network to perform their functions and form the core network of QitChain together:

Sync Full Nodes

A synchronous full node is a node that has a complete blockchain ledger. Any synchronous full node can independently verify all data without the assistance of any external reference. In the vanilla era of blockchain, when people didn’t care so much about its efficiency in handling problems, every node in most projects was a synchronous full node. Such an architecture has the strongest security, but is far from fast enough to support the processing needs of today’s international transaction systems.

Light Node

we mentioned that light nodes only store block headers instead of all transaction data. Contrary to what most people think, light nodes are a concept that has been proposed for a long time. It is based on Simplified Payment Verification (SPV) and uses the Merkle Proof mechanism to verify the existence of a transaction only when the block header of the longest blockchain needs to be saved.

Since this article focuses on technical details, let’s focus on how light nodes can use Merkle Proof to verify the existence of transactions without traversing the full ledger. A hash tree (Merkle Tree) is a tree-like data structure in cryptography. All other nodes use the hash encryption of the labels of all their child nodes as labels. In this way, the vertex label of the whole tree is a giant complex hash value that can be regarded as the label of all nodes except the vertex.

Node Type and Structure - qitchain

The significance of Merkle Proof is to prove whether a specific transaction actually exists in a specific block. Users do not need to traverse each block in the entire blockchain, but only need to check the chain composed of block headers. Can. If the hash of the transaction can be found in a block header of the chain composed of the block header, it can be authenticated that the transaction does exist in the block corresponding to the block header. And this series of operations just browses all block headers at most instead of traversing the entire blockchain, so it can be more efficient while ensuring relative security. In QitChain Network, light nodes only contain block headers and no transaction information as mentioned above. Therefore, after being merged into a chain, the size of the entire chain is only about 1/1000 of the complete blockchain.

Node Type and Structure of QitChain

Service Provider Node

The main task of the service provider node is to provide calculation or token pledge (varies depending on different consensus), compete for the accounting rights of new blocks, and obtain digital assets. In the context of QitChain Network, its service provider node provides storage services. Its definition of the life cycle starts from the creation of a digital asset transaction, which is then encrypted by one or more signatures and broadcast across the network. After the transaction is received by most other types of nodes, it is eventually validated by a storage provider node and added to a block on the chain. When the transaction enters the blockchain and is confirmed by enough subsequent blocks, it becomes part of the blockchain.

It is not difficult to find that according to the role played by the storage service provider node, the node should provide storage services, complete blockchain data, and network routing. In some specific cases, in order to more easily obtain the packaging and accounting rights of the block and its associated digital asset incentives, the service provider nodes will be integrated to form a node cluster to achieve the effect of “concentrating efforts to do big things”.

It can be seen that, as the core of the QitChain project, QitChain Network strongly supports the integrity and effectiveness of the entire project through the design of its architecture and the division of cooperation among nodes, but its innovation is still far more than that. QitChain boldly adopts the CPoC consensus mechanism known as “learning from others’ strengths” to realize the structure of its digital asset distribution and economic model, and how CPoC learns from others’ strengths and how to reflect its advanced nature is what we need to discuss later Content.

Realetd article: QitChain Network’s: CPoC Consensus and Economic System