The Blockchain Stack
Co-authored by Alexis Gauba
At a fundamental level, blockchains are composed of multiple distinct layers, similar to other technology protocols like the internet paradigm (Link, Network, Internet, Transport, Application). Here, we present a framework of the layers that compose blockchains. The layers are defined such that each layer depends on the one(s) below it. Here, we discuss what each layer provides as opposed to how each layer is implemented.
The following are specific parameters that these base layers support to allow for properties including privacy, scalability, interoperability, incentivization, governance, and energy efficiency.
To best achieve any of these properties (privacy, scalability, interoperability, incentivization, governance, energy efficiency), it is importance to optimize across all layers (hardware, network, consensus, and sybil control).
Layers of the Blockchain Paradigm
Hardware / Hosting: Layer of hardware used for mining / validating. This refers to the devices where the all data in the blockchain is stored
Network: Layer of message passing between the different nodes that make up the network
Consensus Protocol: Layer of finalization
Sybil Control Mechanism: Layer to prevent generation of multiple fake identities
Application Layer: Layer of applications built on top of blockchain platforms
Understanding the structure of the Bitcoin Blockchain through the above framework:
Hardware / Hosting: The miners who make the most money in the Bitcoin network use ASICs as hardware to mine. The full nodes store all the data of the Bitcoin blockchain. Light nodes are a storage optimization on full nodes. Nodes talk to each other using the network layer.
Network Topology: The Bitcoin gossip protocol relies on the speed of the internet across the world at the network level. Bitcoin’s gossip protocol works in a way such that every node informs all of its peers about the hash of any new object (block or transaction) that it receives. Each peer checks to see if it has received the object before by searching for the hash. If any node has not heard of the object before, the node makes a request for the object from the peer that gossiped the unfindable hash to it.
Consensus Protocol: Bitcoin reaches finality using the longest chain rule i.e the chain with the most blocks gets added to the blockchain. In Bitcoin miners are incentivized to create a block on the longest chain in order to get block rewards if their block gets accepted.
Sybil Control Mechanism: Bitcoin uses Proof-of-Work as a sybil control mechanism making it computationally expensive for anyone to create multiple identities. In Bitcoin people are incentivized to perform Proof-of-Work in the process of mining because of the possibility of receiving a block reward.
Currently blockchain infrastructure is not yet at the stage to support large scale applications, and while there have been waves of focus on different parts of the stack, blockchains won’t be ready until we can optimize across all layers.