Light Nodes (Light Clients) Research

mhrsntrk

mhrsntrk / April 29, 2022

When you decide to go deeper with your blockchain integration, you have to setup a blockchain node. By node, we generally think of a full node, but what if you have another alternative that you can run even on your IoT devices?

Background

Full Node

If any block or transaction disobeys these consensus rules, then they are rejected by the full node, and not included in the blockchain. Full nodes support the network by accepting blocks and transactions from other full nodes, validating those blocks and transactions, and then relaying them to other full nodes. An important characteristic of full nodes is that they are trustless, they will reject any block or transaction that violates consensus rules, even if every other node on the network thinks that it is valid. Full nodes must also have a copy of the blockchain, so every transaction and block that has ever taken place on the blockchain must be downloaded (For example, the Bitcoin blockchain is now a 403 GB file since it must be synced between the network’s 6000+ nodes). This ensures that the blockchain cannot be controlled by a single entity, and nor can it easily be compromised, as there is not one single point of failure. So, the more full nodes that are operating within the network, the more trustless and decentralized the system becomes.

Summary

  • Stores full blockchain data.
  • Participates in block validation, verifies all blocks and states.
  • All states can be derived from a full node.
  • Serves the network and provides data on request.

Light Node

Some full nodes also serve what are known as light nodes (a.k.a. Light Clients). Light nodes can verify if a transaction has been included in a block, without having to download the entire blockchain A light node need only download the headers of all blocks on the blockchain, which means that download and storage requirements are significantly less intensive than that of a full node. The relationship between full nodes and light nodes exists because if it did not, then light nodes would not be able to connect to the blockchain network, which might lead them to use a centralized service instead. Light nodes allow the end user to interact with the bitcoin blockchain and to make and confirm transactions without committing the disk space.

Summary

  • Stores the header chain and requests everything else.
  • Can verify the validity of the data against the state roots in the block headers.
  • Useful for low capacity devices, such as embedded devices or mobile phones, which can't afford to store gigabytes of blockchain data.

Benefit Analysis

Full Node

Advantages

  • Can participate in consensus
  • Independent
  • Trustless

Disadvantages

  • Hardware requirements (8+ GB RAM and 500+ GB storage required)

Light Node

Advantages

  • Can be run by low-resource devices (browser extensions, mobile phones, etc.)
  • Helps decentralization by validating block headers

Disadvantages

  • Dependent to full nodes to get the blockchain history
  • On a network like Ethereum, there is no incentive for full nodes to serve light nodes
  • Trusts a full node to give them access to the blockchain, and hence lose significant security and anonymity guarantees

Possible Use-Cases

  • Light Node might be used for getting blockchain data which is used for VC (Verifiable Credentials) verification.
  • Allow users to interact with the blockchain (via dAPP) without depending on an external RPC provider.

Verdict

  • There are not much R&D left on Ethereum for Light Nodes (after Parity focuses on Substrate). Except there is IN3, looks promising worth to take a look.
  • Light Nodes cannot access all blockchain data, it only verifies the block headers on Ethereum. Not good for Self-Sovereign Identity use-cases.
  • Substrate Connect looks like a better solution because it can access the blockchain data, so possibly it can fetch DID (Decentralized Identifier) documents and VC definitions.

References

  • https://blockchair.com/ethereum/charts/blockchain-size
  • https://geth.ethereum.org/docs/interface/les
  • https://eth.wiki/en/concepts/light-client-protocol
  • https://medium.com/@rauljordan/a-primer-on-ethereum-blockchain-light-clients-f3cadde49137
  • https://medium.com/paritytech/what-is-a-light-client-and-why-you-should-care-75f813ae2670
  • https://medium.com/codechain/blockchain-light-client-1171dfa1269a
  • https://substrate.io/substrate-connect/