Introduction to public chain, alliance chain, private chain and network configuration

Source: Internet
Author: User
Tags local time
Ethereum Network

The basis of central consensus is to participate in node-to-point network, node maintenance and security of blockchain network. See mining. Ethereum Network data statistics

Ethstats.net is a dashboard of ethereum network real-time data that showcases important information such as current chunks, table difficulty, gas prices and gas costs. The nodes displayed on the page are just a selection of the actual nodes on the network. Anyone can add their nodes on the Ethstats dashboard. The Eth-netstats Readme on GitHub describes how to connect.

Ethernodes.com shows the current and historical data for the number of nodes, as well as other information on the Ethereum master network and the Morden Test network.

The client implementation on the current live network allocates real-time data on the –etherchain. public chain, private chain and alliance chain

Most Ethereum projects today rely on Ethereum as the public chain, and the public chain can access more users, network nodes, currencies and markets. However, there are often reasons to prefer a private chain or a chain of alliances (among a group of trustworthy participants). For example, many companies in the banking sector want Ethereum as a platform for their private chain.

Here is an excerpt from the blog about public and private chains, which explains the licensing differences between the three blockchain types:

Public chain: Everyone in the world can read and send transactions. If they are legally willing to see themselves included. Anyone in the world can participate in the process of consensus formation-deciding what blocks to add to the chain and what the status quo is. As an alternative to centralized or quasi-centralized trust, the public chain is protected by a cryptographic economy, which is a combination of economic incentives and cryptographic graphics verification, and the general principle followed by the mechanism of similar workload proofs or equity proofs is that people influence the level of consensus formation and the amount of economic resources they can influence. This type of blockchain is often considered to be "completely centralized."

Alliance chain: The consensus formation process is controlled by a series of pre-selected nodes, for example, imagine a group of 15 financial institutions, each of which operates a node, and 10 of them must sign that block in order for the block to take effect. The right to read the blockchain may be public, or limited to the participants, and there are mixed paths, such as the chunk's root hash and the application programming interface, so that public members can perform a certain amount of queries and regain a portion of the blockchain state's cryptographic graphic proofs. This type of blockchain is considered "partial de-centering".

Private chain: Write permission to maintain the centrality of an organization. The read license may be public or limited to any degree. Applications are likely to contain database management, review, etc. within a single company, so public readability is not necessary in many cases, but in other cases people want public readability.

The private chain/alliance chain may not be linked to the public chain, and they still benefit from the Ethereum ecosystem by investing in Ethereum software development. Over time, this translates into software improvements, knowledge sharing, and job opportunities. How to connect

Geth will continue to attempt to connect to other nodes on the network until the endpoint has been reached. If you have UPnP available on your router or if you run Ethereum on an Internet-facing server, it will also accept connections from other nodes.

The Geth finds the peer through the discovery protocol. In the discovery protocol, the nodes chat with each other to discover other nodes on the network. Initially, Geth uses a series of helper nodes that are recorded in the source code for the endpoints of the helper nodes. check connectivity and Enode identities

To check how many peer endpoints the client has connected on the interactive console, the net module has two properties that provide information that tells you the number of peer endpoints and whether you are listening on the node.

> net.listening
true
> Net.peercount
4

Learn more about connecting peer endpoints, such as IP addresses, port numbers, and support protocols, with the peers () feature of the Administrator object. Admin.peers () returns to the list of peer endpoints that are now connected.

> admin.peers [{ID: ' A4de274d3a159e10c2c9a68c326511236381b84c9ec52e72ad732eb0b2b1a2277938f78593cdbe734e6002bf23114d434a085d260514ab336d4acdc31 2db671b ', Name: ' geth/v0.9.14/linux/go1.4.2 ', Caps: ' eth/60 ', remoteaddress: ' 5.9.150.40:30301 ', localaddress: ' 192.168.0.28:39219 '}, {ID: ' A979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3 331163c ', Name: ' geth/v0.9.15/linux/go1.4.2 ', Caps: ' eth/60 ', remoteaddress: ' 52.16.188.185:30303 ', localaddress: ' 192.168.0.28:50995 '}, {ID: ' f6ba1f1d9241d48138136ccf5baa6c2c8b008435a1c2bd009ca52fb8edbbc991eba36376beaee9d45f16d5dcbf2ed0bc23006c505d57ffcf70921bd94
aa7a172 ', Name: ' pyethapp_dd52/v0.9.13/linux2/py2.7.9 ', Caps: ' Eth/60, P2p/3 ', remoteaddress: ' 144.76.62.101:30303 ', LocalAddress: ' 192.168.0.28:40454 '}, {ID: ' F4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fba F6416c0 ', Name: ' ++eth/zeppelin/rascal/v0.9.14/release/darwin/clang/int ', Caps: ' Eth/60, Shh/2 ', remoteaddress: ' 129.16.191.64:30303 ', localaddress: ' 192.168.0.28:39705 '}]

To check the port used by Geth, discover your own enode URI execution:

> Admin.nodeinfo
{
Name: ' geth/v0.9.14/darwin/go1.4.2 ',
nodeurl: ' enode:// 3414c01c19aa75a34f2dbd2f8d0898dc79d6b219ad77f8155abf1a287ce2ba60f14998a3a98c0cf14915eabfdacf914a92b27a01769de18fa2d049dbf 4c17694@[::]:30303 ',
NodeID: ' 3414c01c19aa75a34f2dbd2f8d0898dc79d6b219ad77f8155abf1a287ce2ba60f14998a3a98c0cf14915eabfdacf914a92b27a01769de18fa2d049dbf 4c17694 ',
IP: ':: ',
discport:30303,
tcpport:30303,
Td: ' 2044952618444 ',
listenaddr: ' [::] : 30303 '
}
faster download of blockchain

The Ethereum blockchain is automatically downloaded when the Ethereum client is launched. The time used to download the Ethereum blockchain varies depending on the client, client settings, connection speed, and the number of endpoints available. Here are some options for getting to the Ethereum blockchain faster. using Geth

If you're using the Geth client, you can do something to speed up the time to download ethereum chunks. If you use the-FAST flag to perform Ethereum fast synchronization, the past transaction data will not be retained.

Note: You cannot use this flag after performing all or part of a normal sync operation, meaning that you cannot download any part of the Ethereum blockchain until you use this command. Check out this ethereum stack.exchange answer learn more.

Here are some flags to use when you want to synchronize your clients faster.

--fast

This flag makes it possible to achieve fast synchronization through state downloads instead of downloading entire chunk data. This can also significantly reduce the size of the blockchain. Note:--fast only synchronizes the blockchain from the beginning, and it is not run until the first time the blockchain is downloaded for security reasons. See Reddit for more information.

--cache=1024

Gigabit memory allocated to the internal cache (minimum 16MB/database). The default is 16MB, so depending on how much memory you have on your computer, it will be different if you increase it to a size of 1GB or 2048 (2GB).

--jitvm
This flag can activate the JIT VM.

A complete console command example:

Geth--fast--cache=1024--JITVM Console

Learn more about the Quick sync and blockchain download times to view this Reddit post. Export/import Blockchain

If you have synchronized the entire Ethereum node, you can export the blockchain data from a fully synchronized node and import it into the new node. You can do this by exporting all nodes in Geth with the Geth export FileName directive and importing the blockchain into the node with Geth import filename. static nodes, trust nodes, and boot nodes

Geth supports a feature called static node, and if you have a specific endpoint, you will always want to connect to the static node. If the connection is disconnected, the static node is connected again. You can configure a permanent static node by putting the following into/static-nodes.json (which should be the same folder as Chaindata and Keystone)

[
"enode:// F4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fba f6416c0@33.4.2.1:30303 ",
" Enode://pubkey@ip:port "
]

You can also use Admin.addpeer () to join static nodes during runtime by using JavaScript.

> Admin.addpeer ("Enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae
FAQ for Connections

Sometimes it may not be possible to connect, the most common reasons are: local time is not correct. To participate in the Ethereum network, a precise clock is required. Checking how the OS synchronizes clocks (such as sudo ntpdate-s time.nist.gov) can cause 0 endpoints even if it's only 12 seconds faster. Some firewall configurations may prevent UDP from circulating. The connection can be configured manually using the static node function or the Admin.addpeer () on the console.

Instead of using the Discovery protocol to start Geth, you can use the-nodiscover parameter. You will only want to do this when you are running a test node or an experimental test network with a fixed node.

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.