What is a blockchain?
A blockchain is simply a list of transactions, or a database, that is NOT controlled by a single institution or a body only, whose past records canNOT be changed, and it is public for ALL to view. So it is simply a public digital decentralized database system.
What is inside the database?
The database is simply a list of transactions that are:
- Organized in blocks, or a group of data / information
- ‘chained’ i.e. ordered by the time they are verified — hence the name, blockchain
- verified, which means they are 100% valid — no double spending, not fraudulent, agreed by all parties (miners, validators)
- historical records are not changeable i.e. immutable, irreversible, non-alterable
- available for all node networks to view
How is it different from a normal database?
- The main difference lies in the structure
- Blockchain data is grouped in ‘blocks’. These blocks has a certain storage capacity. When enough transactions has occurred to max out a block space, the block is verified and is added to the blockchain
- Each block that is filled is set in stone and becomes a part of blockchain timeline. Each block in the chain is given an exact timestamp when it is added to the chain. It is impossible to alter past data, nor it is impossible to reverse the data
- Note that while we specifically use ‘transactions’ as the data for the purpose of our discussion today, blockchain data could be anything ranging from transactions to legal certificates to product inventory, etc. Blockchain is also not strictly for cryptocurrency — it has wide applications in the real world economy such as the medical industry
OK so how does blockchain relates to cryptocurrency?
- Cryptocurrencies are simply virtual currencies that run on top of the blockchain technology. These two terms are not interchangeable
- Blockchain data is the source of truth for the network in which the cryptocurrency operates in. It allows the network to operate without a central bank or any centralized authority
Moving on to the architectural design of a blockchain — how many different types of blockchains are there?
Two main types — monolithic and modular
- Monolithic: Monolithic blockchain operates and functions as a whole. There are no segregation of layers in a monolithic blockchain. If you want to change aspect to one blockchain layer, there is no other way of doing it other than redoing and redeploying the entire blockchain
- Modular: Modularity is introduced when a monolithic blockchain’s layers are segregated into different components in which each component has its own rules and governance. If you want to make changes in one component, you don’t have to disrupt the entire blockchain as the changes would be isolated in just that particular component. Modularity introduces flexibility, and may help to minimize the trilemma issue
Before we move on to trilemma & dive deeper on monolithic vs modular model in the next article, what are the different layers of blockchain?
A blockchain is composed of three major layers: 1) Consensus, 2) Data availability, and 3) Execution + Settlement.
- Consensus — also the security layer: Purpose is to verify the validity and secure the state of blockchain by ordering transactions and ensuring no double spending of balance. Different examples of consensus methods include:
- Proof of Work (“PoW”), applied by Bitcoin, Dogecoin, layer 1 Ethereum, etc
- Proof of Stake (“PoS”), applied by Ethereum post The Merge
- Proof of History (“PoH”), applied by Solana
- A mix of PoS and Proof of Authority (“PoSA”), applied by Binance Coin, etc
- Data availability: Blockchain data i.e. all L1 transactions that are appended in a chain when verified — are available for all node network to view (note: this is NOT the same as storage layer, and
- Execution: Transactions that have been ordered and appended to the chain are executed in order by help of smart contract. The executed transactions are final and could not be further changed. It is cemented in the blockchain forever i.e. immutable
- Settlement: L2s blockchains typically execute and then post the transactions to L1. For example L1s like Ethereum act as settlement layer for the L2s to verify validity proofs (e.g ZK) or settle disputes (e.g Optimism). This is the final step after which the transactions will be added to the main blockchain in which it is immutable and final. For more discussions regarding L1 and L2s, please refer to this article
So… how do the different blockchain layers relate to monolithic / modular model?
- Bitcoin network is considered a monolithic blockchain as it performs all layers in one place in a generalized way. It does not separate the different layers into different components. Almost all L1 networks are monolithic, for example Ethereum L1
- Meanwhile for rollups, for example, Optimism or ZK rollups — instead of performing all functions from data availability, consensus, etc, they simply only perform execution on their own blockchain, before settling the transaction to L1. For these rollups, they follow the consensus, data availability and settlement layer of the network they post to:
- Please see diagram below for easier visualization: