Don’t Trust, Verify

Jan Xie
Jan Xie
Jan 29 · 10 min read

Categories of Blockchain Nodes

As we all know, nodes in a blockchain network are classified into the following categories:

Block-Producing Nodes

Block-producing nodes are responsible for packaging transactions and generating blocks. They have different names in different blockchains, such as “Miner/Mining pool” in Bitcoin and Ethereum; “Delegator” in Bitshares; “Producer” in EOS; “Stakeholder” in Cardano; “Validator” in Casper and “Consensus node” in CITA.

Full Nodes

In a blockchain, each block consists of a block header and a block body. The block header stores metadata including a witness (such as a PoW or a vote), while the block body includes transaction data. Accordingly, the validation of a block can also be divided into two parts:1) the validation of metadata in the block header (PoW for example), which will determine if a producer is qualified to create a new block and 2) the verification that each of the transactions in the block body is valid.

Light Nodes

Light nodes are different from full nodes, in that they only download and verify the block header of every new block, ignoring the transactions included in the block body. Therefore, light nodes can verify the validity of the block header, but cannot validate the transactions in the block body (though this is not entirely true for PoS chains, because it’s hard to know the newest validator set without having blockchain state first). The light nodes have no choice but to trust that a block has been filled with valid transactions by the block-producing node and verified entirely by the full node that delivered the block header.

Relationship

The relationship between the three kinds of nodes is an interesting and often discussed topic among friends of mine. To demonstrate, let’s draw out some potential network topologies. Take a pen and invite any one of your friends to draw a blockchain network topology comprised of the three kinds of nodes. The diagram probably looks like one of the following:

Fig 1. The network topology in Alice’s head
Fig 2. The network topology in Bob’s head

Who is the Keeper?

People always think of block-producing nodes as the keepers of a blockchain network. This opinion makes sense, block-producing nodes verify transactions, produce new blocks and provide services for users. This is why block-producing nodes or miners are placed at the center of the network topologies listed above. Though it may look like they have the right to define a blockchain, this is not a fact if we examine from the perspective of a P2P network.

Fig 3. Full nodes — the network keepers

Case Analyses

Now that we’ve established an understanding of the significance of full nodes and built a correct network topology in our minds, we can use this framework to analyze practical questions.

FIBRE

FIBRE, or Fast Internet Bitcoin Relay Engine, is a dedicated block transfer network for miners. It deploys six nodes spread around the world, connects them via a high-speed network and allows them to transfer data almost instantly with UDP+Forward Error Correction. The miners that have registered on FIBRE can access the nearest FIBRE node and acquire new Bitcoin block data in the shortest time possible. The optimization of FIBRE and the communications protocol for Bitcoin’s P2P network makes it possible for a new Bitcoin block to be instantly broadcast to all miners around the world. With FIBRE, the orphan block rate is effectively decreased and network security is improved.

Fig 4. A private network for block-producing nodes (dotted line)

EOS

EOS aims to process millions of transactions per second(TPS). In order to achieve this, the protocol selects 21 nodes to propose blocks (and a certain quantity of nodes as potential candidates) across the whole network by ballot and requires the selected nodes to utilize the best hardware for peak performance.

Fig 5. A Network without full nodes

Lessons for Nervos CKB

Block-producing nodes, full nodes and light nodes form a dynamic network that allows each node free access to enter or exit the network (in many blockchains, block-producing nodes don’t actually have free access. I may write another article about this in the future). The topology created by these nodes (as measured by: node ratio, node linkage, etc.) determines many qualities of the network including performance, security, degree of centralization, etc. Different topology designs may lead to network structures with properties that go against the original intention of the design.

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.

Jan Xie

Written by

Jan Xie

Nervos / Cryptape

Nervos Network

The Nervos Network is a public blockchain ecosystem and collection of protocols aiming to solve the current challenges facing blockchains like Bitcoin and Ethereum today.