Bitcoin Software Architecture
October 1, 2019
Contributed by Uzma Abbas
Bitcoin is an emerging new technology that is rapidly advancing. Its network solution to decentralized governance has sparked a frenzy of innovation.
Among all the creative projects, new protocols and promising products, it is really difficult to keep up and conceptualize how this all fits together.
Some have attempted to formulate Bitcoins software layers in reference to the OSI model.
However, across the spectrum of Bitcoin projects the functional boundaries are not always clearly distinguishable. This is to be expected as Bitcoin’s software evolution has only started.
So this is our attempt to assemble the main software layers of the Bitcoin architecture in the simplest manner possible, taking into account the expected direction of technological advancements in the Bitcoin sphere.
Layer 1: Base layer
Running on top of TCP/IP, the base layer is comprised of the Bitcoin Core software. It is developed as an open source software that includes the consensus, mining & peer-to-peer propagation functions that run the entire Bitcoin network.
In this layer, bitcoins are first created through the block reward, also called a coinbase transaction. Also, it is where transactions are verified and where the Blockchain is maintained & secured.
Modifications to the Bitcoin Core software are driven through Bitcoin Improvement Proposals (BIPs) .
The Bitcoin blockchain is open and permissionless, therefore any user can transact directly with Layer 1, which makes all layers above Bitcoin Core optional.
Transactions made directly on the blockchain are called ON-CHAIN transactions.
Certain wallets are examples of applications that perform on-chain activities. Other specific examples are OMNI a decentralized p2p trading platform and Microsofts ION, a decentralized identity management project.
Layer 2: Second Layer Networks
On-chain transaction times and block size limit the scalability of Layer 1. Understanding the necessity of these Layer 1 constraints, efforts have gone into creating second layer solutions to scalability. By utilizing Bitcoin Core capabilities in novel and creative ways, Layer 2 protocols promise to scale Bitcoin with different, but complementary limitations to the base layer.
Layer 2.1 – Sidechain Solutions
This concept allows for separate blockchain ecosystems to behave as sidechains to the main Bitcoin blockchain.
SIDECHAINS can be designed to perform different tasks or provided new features without impacting the main Bitcoin blockchain.
This innovative idea can be used to deploy smart -contract platforms like Rootstock, for example.
Sidechains can be designed to support interoperability between other blockchains. For example, Blocktreams Liquid platform provides inter-exchange settlements for brokers and market makers.
Many new creative applications are expected to arise from sidechain protocols.
Layer 2.2 - Off-Chain solutions
OFF-CHAIN transactions are activities that take place outside of any blockchain. These solutions aim to enable fast transactions to resolve Bitcoins network bottlenecks.
Off-chain transactions involve creating a temporary instance to move value outside of the Bitcoin blockchain until a final settlement transaction is triggered on the Bitcoin blockchain directly.
The Lightning network is a leading off-chain protocol solution for payment system which greatly improves Bitcoins network scalability. LND and C-Lightning are popular implementations of the Lightning network protocol.
Although Layers 3 and 4 do not have to use Layer 2 solutions - both sidechain and off-chain solutions alone or together have great potential to advance the growth of the Bitcoin ecosystem.
Layer 3: APIs
This layer is comprised of server/client interface and backend (interface to Layer 2 or Layer 1).
This layer includes platforms that allow developers to customize services.
Some open source backend API platforms also support privacy and fungibility mechanisms such as CoinJoin.
Examples of open source backend API servers are Cyphernode, BTCPAY Server, Electrum Servers, Bitcore, Esplora , DOJO, Wasabi Backend.
Commercial APIs are private. Some examples of commercial APIs are Blockchain, Bitpay, Bitgo and Blockcypher.
Decentralized protocols can also be used to create & manage common decentralized data sets for peer-to-peer marketplaces or to tokenize assets on top of the Bitcoin blockchain - RGB & Prometheus projects are examples.
Layer 4: User & Market Applications
This layer includes high level user applications that support market & industrial Use Cases of Bitcoin.
Layer 3 can provide platforms on which Enterprise solutions can be deployed.
Examples of products on layer 4 include:
Exchange custodial wallets