-P2P Network of Bitcoin Learning

Source: Internet
Author: User
Tags current time join port number

The Bitcoin network uses the Internet-based peer network architecture. The English language is peer to peer, so it is also called Peer network . As the name implies, each computer in the network is equivalent, each node provides a network service, there is no "special" node. There is no service-side (server), centralized service, and hierarchy in the peer-to network. It is also an important feature of the Bitcoin network, or blockchain, that is to be centralized . In this way, any machine in the network problems will not affect the other nodes, to ensure the normal operation of the network.

Peer Network

One. Although each node in a Bitcoin peer-to-peer network is reciprocal, each node may have a different division of labor depending on the functionality provided.

1. Full junction

Full junction

This node is a collection node that contains wallets, mining, blockchain, and network routing functions. The full node can independently validate all transactions without the need for any external references.

2. SPV Junction.

SPV Junction.

This preserves only part of the blockchain (block size), which completes the transaction verification by means of a " Simple payment Verification (SPV)" method. English is simplified Payment verification. Such nodes are called "SPV nodes", also called "Lightweight Nodes". In terms of what the SPV verifies, it simply means that the information in this area is passed through the network to the blockchain to verify. Please refer to higher's article for details: HTTP://WWW.JIANSHU.COM/P/39BE41DFB5FA.

3. Mining Junction.

This junction, in fact, as long as there are independent miners function node can be called mining junction. The whole knot is actually a mining junction.

Mining junction with Mineral Pool protocol

Independent miners

The mining node is called POW by the work Proof (proof-of-work) algorithm running on a special hardware device. Create new chunks in a competitive way. Some mining nodes are also full-node, maintaining a full copy of the blockchain; some of the nodes that are involved in mine pool mining are lightweight nodes that have to rely on the full-node maintenance of the pool server to work.

If the network contains both the network running the Bitcoin-to-peer protocol and the nodes that run the different protocols above. This network is also known as the extended bitcoin network.

Extending the Bitcoin network

This network includes various types of nodes, gateway servers, edge routers, wallet clients, and the kinds of protocols they need to connect to each other.

Two. Network Discovery.

When we start a machine, this node is how to find other nodes and what is found by other nodes, how they are connected. Can participate in co-operation only after being connected to at least one of the other nodes.

First, the protocol that each node normally communicates with other nodes is the TCP protocol. The port number is 8333 (it can also be a different port).

The web discovery process, I borrowed a noun from the sales industry--to introduce . This is the process.

If you come to a room full of strangers, and everyone doesn't know you, and you want to join their circle, you start by exchanging information (shaking hands) with the person closest to you, and then the person starts to introduce you to him and you shake hands with them. So you join them in this network.

The information for this referral includes:

1. Protocol_version

A constant that defines the version used by the client to "speak" the Bitcoin-to-peer protocol (for example: 70002)

2. Nlocalservices

A list of local services supported by this node, currently supported only for Node_network

3. Ntime

Current time

4. Addryou

The IP address of the remote node visible to the current node

5. Addrme

Native IP address discovered by local node

6. Subver

A child version number indicating the type of software that the current node is running (for example: "/SATOSHI:0.9.2.1/")

7. BaseHeight

Block height of the current node block chain

Author: ttblack Link: http://www.jianshu.com/p/ad47595e7e4f Source: Jane Book copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.