Blockchain Basics - Node

Introduction

When we are talking about Blockchain, we describe it with a lot of new terms, such as Node, Full Node, Light Node, Miner, etc. Without understanding them and telling the difference, you will not be able to understand Blockchain. This article is to help readers understand the aforementioned terms.

What is Node?

The blockchain is a distributed database based on peer-to-peer (p2p) architecture. P2P architecture is how computers communicate with each other, in contrast to client/server architecture in which one computer acts as a server to provide services or data and another computer acts as a client that consumes services or data. Computers on a p2p network can both provide services or data and consume services or data. This means that all computers are equal on a p2p network. All computers have the same capabilities and privileges. Therefore, there is no bottleneck and failure point. When one computer is down, it will not impact the communication of the entire network at all. We call a computer on a p2p network a node. Actually, the computer here is not a canonical definition of the computer. A computer could be a personal computer, smartphone, tablet, ASIC machine, etc.

Types of Node

A pure p2p network has nodes that are all same. The reality is that not every single node is the same. The type of a node is decided by the type of computer and the type of software installed. A pure p2p network only needs one application because all nodes are equal. This is why there was only one software released by Satoshi Nakamoto back to the year 2009. This software was Bitcoin 0.1. Bitcoin 0.1 was a Windows console application that can do the following things,

  • Bitcoin 0.1 runs on one node can communicate with Bitcoin 0.1 runs on another node.
  • Bitcoin 0.1 can download all transactions and blocks from peer nodes.
  • Bitcoin 0.1 can generate a public/private key pair.
  • Bitcoin 0.1 can use the public/private key pair to generate transactions, means send or receive coins.
  • Bitcoin 0.1 can run prove of work (PoW) to add transactions into a block.

But, later on, things become complicated. Blockchain was moved away from a pure p2p network. Some nodes only want to send and receive coins. Some nodes only want to run PoW to add transactions into a block. And then, things became even more complicated, some nodes only want to have a partial set of transactions and blocks, some nodes provide services for people to use cryptocurrency without installing any software, some nodes organize a group of computers to run PoW. Therefore, we start to hear: Full Node, Light Node, and Miner.

Full Node

A full node is a node that downloads all blocks and transactions to its local storage.

Blockchain Basic - Node

 

More specifically, a full node,

  • Has all blocks and transactions
  • Is a fully independent node on a blockchain network
  • Is able to provide blocks and transactions to other nodes
  • Is able to get new blocks and transactions from other nodes
  • Is able to verify all blocks

A full node does not need to,

  • Have a pair of private/public keys
    This is a misunderstanding that a full node must have a pair of private/public keys. A pair of private/public keys are used for signing new transactions or receiving transactions, which means sending or receiving coins on a cryptocurrency network. If your full node is only used to get all blocks and transactions for reviewing, then you don’t need to have a pair of private/public keys. However, most full nodes generate private/public key pairs automatically, regardless they are used or not. We also call full nodes wallets when full nodes are used on a cryptocurrency network for sending and receiving coins.
  • Run PoW (Do mining)
    This is another misunderstanding. PoW is an algorithm used in Bitcoin 0.1 to confirm transactions by finding a hash that meets defined difficulty (number of leading zeros). We call this process mining. Originally, mining was done by Bitcoin software on CPU. But, because the rewards generated from mining incite more people to do mining and to find faster ways of doing mining, so Bitcoin software runs PoW on CPU is not an efficient way of mining. Eventually, the mining feature was removed from Bitcoin software.

Full Node Software

Bitcoin Core is the official Bitcoin software for the Bitcoin network. You may also have heard people call it Bitcoin Core client. Do not be confused by “client”. There is no server. Client means this software can be installed on a personal computer. Even though you have a server, you still need to install the Bitcoin Core client to become a full node. Bitcoin Core is not the only full node software for the Bitcoin network. There are many full node softwares designed for the Bitcoin network, such as Bitcoin Knots, ArcBit, Electrum, etc. Some of the full node software is able to connect to multiple Blockchain/Cryptocurrency networks, for example, Stratis Full Node is able to connect to the Bitcoin network and Stratis network.

Light Node

Light Node is also called Light Client and Lightweight Client. The benefit of a full node is that it downloads all blocks and transactions, so it is an independent node on a Blockchain network. The drawback of a full node is that it downloads all blocks and transactions, so it requires a lot of local storage and requires a lot of computing power to verify blocks. At the moment of writing, Bitcoin Core required 173 GB of local storage to store blocks and transactions of the Bitcoin network. The size of blocks and transactions is still growing quickly due to the heavy use of Bitcoin. Getting all blocks and transactions is unnecessary for people who just want to send or receive coins. They don’t care about old transactions. They don’t care about other people’s transactions. They only care for their own transactions. Therefore, Light Node was invented to save space and computing time. A light node only downloads block headers to validate the authenticity of the transactions. A light node uses a method called Simplified Payment Verification (SPV) to verify transactions.

Blockchain Basic - Node

 

More specifically, a light node,

  • Has block headers and some transactions
  • Has a pair of private/public keys
  • Uses SPV to verify transactions

A light node does not

  • Connect to a blockchain network directly
    A light node relies on a full node to connect to a Blockchain network.
  • Verify all blocks
    A light node relies on a full node to verify all blocks.

Because a light node is heavily relying on a full node, the full node can see the transactions and balances of the light node. This drawback can be remedied by connecting your light nodes to your own full node.

Light Node Software

Most mobile Bitcoin apps are light node software. For example, Simple Bitcoin Wallet.

Miner

Miner is a computer that helps in creating blocks for a Blockchain network. Originally, mining was done by a full node with full node software, such as Bitcoin. Because the mining process takes a lot of CPU power, so developers changed it to use GPU. Later on, GPU was not fast enough, so some people come up with FPGA (Field Programmable Gate Array) mining. Again, FPGA was not fast enough, so the mining process is done on ASIC (Application Specific Integrated Circuits). Currently, ASIC is the dominant way of mining. The mining function is removed from the latest version Bitcoin Core software because it is useless compared with ASIC miner. Bitcoin ASIC is an integrated circuit specialized for Bitcoin mining. It runs specifically in mining software.

Blockchain Basic - Node

 

In terms of where and how mining is done, there are the following types of miners,

  • Solo Miner
    Solo miner is an individual miner that connects with a blockchain network directly.
  • Pool Miner
    A group of miners work together to create blocks.
  • Cloud Miner
    Mining hardware is placed in data centers. The mining capacity is sold to people who want to mine.

Summary

The blockchain is one of the most promising technologies and evolving rapidly. Nodes on a blockchain network have a different focus now, therefore, they evolved into full nodes, light nodes, and miners. To apply the Blockchain technology into a business process and to build a right business application requires a deep understanding of the technology.


Similar Articles