Blockchain circle

One stop hot information platform

About us:

Blockchain circle provides the latest information about blockchain, digital currency, digital wallet, exchange, metauniverse, bitcoin, Ethereum, contract, financial management and so on, and always pays attention to the latest market...

Blockchain P2P network

Time : 01/07/2022 Author : bo67vh Click : + -
        In the last two articles, we talked about the consensus mechanism. Today, we talk about another core technology point in blockchain Technology: P2P network. First of all, to clarify, the concept of P2P here is different from the P2P concept we usually mention in the Internet finance circle. The blockchain technology P2P here is a peer-to-peer network, which is an important part of blockchain system technology, not the network lending P2P of Internet finance. From the current application field of P2P technology, its application has been very mature and extensive, from file sharing to assisted processing, from streaming media to point-to-point communication technology, such as VoIP, BT, electric donkey and so on.
        Blockchain P2P network is a decentralized point-to-point network, which means that it is different from the traditional network c/s structure mode. It has no concept of server and client. It is a network structure composed of multiple node members. Each node is a secure network member, which is in a peer-to-peer position and shares resources with each other, It is both a resource provider (client) and a resource receiver (server). Socket programming is generally used for communication between nodes. The node functions in blockchain P2P network mainly include: wallet trading function, mining function, blockchain database function, network routing function.
        Blockchain database function: store all block transaction data information. A complete blockchain database has a relatively large capacity. For bitcoin, its size is greater than 140g. Network routing function: each node must have to find the connection of nearby nodes; For example, in bitcoin network, hard coded DNS seed is used for initial node discovery, and Ethereum adopts kademlia (kad) algorithm to realize routing and location connection between nodes. All nodes: all nodes need to participate in the verification of blocks, the confirmation of transactions, and the broadcasting of transaction information. Therefore, all nodes must contain a complete copy of the blockchain database, including the data information of all transactions. In addition, all nodes must also have the operation of executing routes to help the connection discovery between nodes. The more all nodes, the more they directly affect the efficiency of the entire network transaction, because they perform the decision-making function, Determines whether a block and a transaction are effective.
        Miner node: miner nodes generally run on high-performance hardware (the last article mentioned "the evolutionary history of pow excavators"), and the goal is to compete for bookkeeping rights with other miner nodes by solving the problem of workload proof (POW) algorithm. If the mining node also stores a complete blockchain database, it belongs to the whole node, which is also called solominer. In addition, some miners' nodes are jointly composed of multiple individual nodes, which are connected to the mine pool and participate in collective mining. This node is called poolminer. This kind of mine pool miner node is generally built by an internal mine pool network, the central node is the mine pool server, and then the decentralized miners connect to the mine pool server through the mine pool internal protocol, and then the mine pool server acts as a full node to communicate with other block chain nodes through the main network.
        SPV (simplifiedpaymentverification) node: also known as light node, simple payment verification. This kind of node will not store a complete blockchain database, only a part of it, but not all transaction data. For example, it only stores hash data at the head of the block. SPV node mainly completes the verification of payment transactions, but it does not verify all transactions, but only a subset of transactions, for example, transactions transferred to a specified address. An SPV node depends on the whole node to obtain data, allowing multiple SPV nodes to connect to a whole node. The wallet application adopts the SPV node mode, and individuals can complete transaction verification without downloading the complete blockchain database.
        The central node creates a Genesis wallet address and a Genesis block, and generates a wallet address database table and a blockchain database table at the same time. The interaction between nodes must follow specific protocol instructions, which include message headers and message bodies. The message headers mainly contain the sent protocol instructions, and the message bodies are the actual contents of transmission. After the node is connected, the handshake operation is first realized through the interaction of [version number]. After the handshake, a long connection is established. For example, ping/pong message protocol is adopted in bitcoin system, but ping/pong protocol is put on the logic of node discovery in advance in Ethereum.
        Inv shows other nodes what blocks and transaction data the current node has, but it does not contain a complete blockchain and transactions, only hash values. When a new block is received, it is added to the blockchain. If more blocks need to be downloaded, that is, continue to send requests from the node of the last downloaded block, and do not re index the utxo set until all blocks are downloaded. This paper mainly describes the concept and characteristics of P2P network, the core technology of blockchain technology. At the same time, it also introduces the functional characteristics of several major nodes of blockchain P2P network, as well as the logical implementation of message interaction between mutual nodes.
Previous:The 50 billion members of the coin circle scam span 170 countries, and the planners are from rural Hunan?
Next:No more

Related articles:

© 2005-2032 | Blockchain Circle & & All Rights Reserved    Sitemap1 Sitemap2 If there is infringement, please contact us at: