P2P network

in #p2p5 years ago

The previous two sections introduced Bitcoin's account system and accounting mechanism. In this section, we discuss how Bitcoin's distributed blockchain ledger is transmitted on the network, and how transactions are transmitted and verified on the network.

The nodes in the Bitcoin network are all peer-to-peer. There is no centralized server. There are different types of nodes. Different types have different responsibilities. We will introduce them in detail in future articles. Here we only introduce full nodes. It is the working mechanism of the Bitcoin core client.

In addition to storing the complete blockchain, full nodes in Bitcoin also have the roles of miners, wallets, and routing nodes. Their responsibilities are as follows:

miner:
Just like a mining worker, they are doing physical work, constantly trying to fill the random field of the constructed block header with numbers to find a hash value that meets a certain standard. If found, connect this block to The top end of the blockchain, and the legal blockchain is sent to adjacent nodes.
wallet:
The blockchain records coin creation transactions and transfer transactions. This is different from the usual account system. The usual account system records the account balance, while the blockchain only records transactions without balance. The wallet is used to access The block chain calculates the balance of the block owned by a certain address. If you have studied relational databases, you can understand the block chain as the index of the database, or it can be regarded as the catalog of a book.
Routing node:
Responsible for transferring transactions and blocks in a decentralized network environment. A node creates a transaction and sends it to the neighboring node. After the neighboring node is verified, it is sent to the neighboring node, and it will be spread quickly. The internet. If a node finds a block that meets the standard through mining, this node will also be passed to neighboring nodes in the same way, and then the neighboring nodes will continue to spread, so that all nodes in the network can reach agreement.
The schematic diagram of P2P network propagation is as follows:

image.png

Sort:  

have you heard of the pi app?

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.084
BTC 60995.11
ETH 1571.77
USDT 1.00
SBD 0.47