In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
This article will introduce you to the overall technical architecture of the original chain.
As shown in the following figure: the original chain is divided into three levels
The first layer is that we have more contact with the wallet layer, that is, the collection and payment module, the wallet generally with an operating interface, everyone can use it on a daily basis, so it will be more familiar.
Then there is the core kernel layer, which can be understood as a set of rules agreed by each node in the distributed system. Only with the same rules can the two nodes reach agreement. If the rules are different, there will be bifurcations.
The last layer is the communication layer, which is the way of exchanging information between nodes, including block synchronization, transaction synchronization and so on.
First of all, let's look at the inner core layer, which is mainly composed of five modules:
Orphan block management: orphan blocks are blocks dug up by miners but do not become main chain blocks (2 or more legal blocks are produced at the same height, one block becomes the main chain, and the rest are called orphan blocks). Orphan block management is to store orphan blocks that are not main chain blocks.
Consensus layer: confirm whether a block is legal. It is divided into block verification and transaction verification. Block verification requires verifying its parent block and timestamp, as well as arithmetic to ensure accounting rights. Transaction verification has specially designed a BC layer, which will get better performance during transaction verification. Transaction verification is also related to intelligent contracts. When the transaction is verified, the parameters will be added to the virtual machine to verify whether the transaction is legal.
Block tree management: also known as Block Index, the function is to record all the blocks of the whole network and save a mirror image of all the blocks of the whole network. Because there is an orphan block, so it is not a chain structure, there will be bifurcations, so it is called block tree.
Data storage: persistent storage of block data. Contains two types of data, the first is block data, native block information that is broadcast on the network, and the second is UTXO data, which stores UTXO data to quickly verify whether a UTXO can be spent without having to traverse all the block information
Transaction pool: maintains all transactions issued across the network but not yet confirmed. The mining module is most relevant to it. Every time the mining module generates a new block, it will take some transactions from the trading pool and pack them into blocks, and then use the Tensority consensus algorithm to check the workload.
Then let's talk about the wallet layer:
Private key module: mainly used to manage private keys (generation, storage, backup, etc.) and signatures
Account module: in the original design, the account-address-key three-tier system is used, each person can have multiple private keys, through different combinations of private keys to form an account, each account can have an infinite number of addresses. The address is the address formed by the second-level private key derived from the private key of the account, the use of multiple addresses can better protect the privacy of users.
Asset module: a module for creating assets under a management account, in which any issue assets interact.
Transaction module: it can be understood as the transaction data related to me, it mainly does two things:
Filter out transactions related to you from all transactions
Maintain the database of wallet layer UTXO and record the UTXO you own
Finally, let's talk about the communication layer:
Node discovery: P2P related, is a very independent and mature one, through the node discovery of this module to get the seed node, and then through the seed node to get other more nodes.
Transaction synchronization: transactions are synchronized between nodes.
Block synchronization: also known as passive block synchronization, if you find that there are blocks higher than their own other nodes, constantly request block synchronization.
New block fast broadcast module: new block active synchronization, forced broadcast when a new block is dug up, so as to spread faster throughout the network.
This is the basic structure of the original chain, which we will explain in depth later.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.