Table of Content
How are New Bitcoins Created, and Why There Will be Only 21 Million of Them Ever?
But how are bitcoins created in the first place? What is crypto mining? How do new bitcoins come into circulation?
Interoperability: Bridging the Technological Divide
The Bitcoin Revolution
CBDC vs cryptocurrency: acceptance rate across countries
What is blockchain architecture? How is it different from a traditional database?
The takeaway
Blockchain Architecture Explained: Fundamentals
April 11, 2024
10 min read
Source | Understanding architecture of blockchain technology
Key takeaways
Originating in 1991 for digital document timestamping, blockchain has grown beyond cryptocurrencies into sectors like healthcare and supply chain, thanks to its secure, decentralised ledger system.
Blockchain's decentralised, append-only structure offers enhanced security and integrity over traditional, centralised databases by using cryptographic hashes and consensus mechanisms for immutable record-keeping.
From public to private, hybrid, and federated, blockchain's varied architectures cater to different needs for access, control, and transparency, enabling a broad spectrum of applications across industries.
Blockchain's robust ecosystem comprises nodes, transactions, hashes, and smart contracts, structured into layers including hardware, data, network, consensus, and application, supporting innovations like DeFi and NFTs.
The world’s first blockchain
You might be surprised to know that Bitcoin is not the world’s first blockchain: it was back in 1991, before Bitcoin even existed, that cryptographers Stuart Haber and Scott Stornetta came up with the concept of a blockchain. Their goal was to timestamp digital documents for authentication, important for intellectual property rights.
To ensure document integrity and safeguard timestamps, they used cryptographic hashing algorithms, creating unique IDs for each document. These hashes were signed to verify authenticity, similar to notarising a physical document. While not exactly like today's cryptocurrencies, this idea laid the foundation for blockchain technology.
What is blockchain architecture? How is it different from a traditional database?
A blockchain structure features a digital ledger system consisting of a sequence of virtual blocks, each serving as a container for data. These blocks are securely linked using cryptographic principles: you can picture this as a virtual chain.
Every block contains distinct code referred to as a hash, transaction information, and the hash of the preceding block, forming an unbreakable and easily traceable connection. This structure guarantees that once a block is appended to the chain, attempting to change its contents becomes computationally challenging, as it necessitates altering all subsequent blocks and gaining consensus from the network.
This chain of blocks is stored and maintained across a network of nodes (computers), making the blockchain inherently decentralised. This decentralisation, along with cryptographic security, forms the core of blockchain's resilience and trustworthiness, as it eliminates a single point of failure and makes unauthorised alteration almost impossible.
For instance, there’s an issue known as ‘double spending’, which means an attacker tries to spend one unit of currency multiple times without anyone noticing. However, on a chain like Bitcoin, say attacker X sends the same unit of BTC twice to two different addresses. Both transactions go to the nodes to be approved, and they can easily cancel one while approving the other. In fact, even if both transactions are picked for confirmation simultaneously, having so many nodes’ eyes on them means one will gather fewer approvals than the other. Therefore, only the one with more approvals will go on to be recorded.
Blockchain architecture is considered a vast improvement over traditional databases and they differ fundamentally in their structure, control mechanisms, and data handling approaches. Let’s see how:
Feature
| Blockchain
| Traditional database
|
---|---|---|
Structure | Decentralised, peer to peer network | Centralised client-server model |
Data modification | Append-only, immutable records | CRUD operations (Create, Read, Update, Delete) |
Security | High, using cryptography and consensus protocols | Dependent on centralised security measures |
Control | Distributed among users | Central authority/administrator |
Consensus | Required for data validations | Controlled by database administrator |
Speed | Blockchains may be slowed down as any transactions have to be verified and stored by each node | Traditional databases are comparatively faster in this aspect |
Here’s to elaborate on the differences a little more:
Control and management
Traditional databases are centralised and managed from a single location. They employ a client-server architecture where the server acts as the central processing unit. An administrator has the power to create, modify, change, and delete records. Users' roles and permissions are defined and controlled by this central authority.
In contrast, the architecture of blockchain is decentralised and distributed. It employs a peer-to-peer (P2P) network architecture where each node (peer) contributes equally to the network's operation.
Architecture and data handling
Traditional databases use a client-server model, effective in both small and large-scale environments, with centralised control and data storage. They allow CRUD (Create, Read, Update, Delete) operations, enabling flexibility in data management.
Blockchain structure, however, is primarily designed for append-only operations (Read and Write) and supports immutability, meaning once data is added, it cannot be altered or deleted.
Transparency and immutability
In traditional databases, if the central authority is breached, data integrity can be compromised. Blockchain architecture ensures transparency and immutability as each transaction is timestamped and verifiable by any node in the network, making it difficult to tamper with the data. Any attacker has to ensure they have control of over 50% of nodes in a blockchain network to carry out an attack, which is virtually impossible for a widely used blockchain like Bitcoin as the nodes are spread throughout the world, and the computational support required to control that many nodes is simply too expensive.
Types of blockchain architecture
Different types of blockchain structures are needed depending on different demands. Let’s understand the four main types of blockchain architecture in detail:
Private (Permissioned)
In this structure of blockchain, access and participation are restricted to a specific set of approved participants. This blockchain type lacks the openness and decentralisation you'd find in public blockchains. Use cases such as in supply chain management may warrant such a blockchain, to deal with issues like bad actors physically tampering with any product or equipment during sourcing, manufacturing, and shipping.
Public (Permissionless)
In public blockchains, transactions are verified by a global network of users, making them resistant to censorship and control by any single entity. But there's a trade-off: while they're open and democratic, public permissionless blockchains may not be the best fit for applications that require privacy or compliance with certain regulations.
Hybrid
Hybrid blockchains comprise elements of both public and private blockchains to create a flexible setup. Some parts are open to the public, while others are restricted to specific participants.
Federated (Consortium)
In federated blockchains, a group of organisations jointly control the network. This approach is essentially about combining the benefits of decentralisation and control, making it perfect for applications where a high level of trust among participants is essential.
Core components of blockchain architecture
A blockchain architecture comprises a set of core components that together form the backbone of a blockchain network. Let’s look at them:
Nodes
Nodes are individual computers or devices that individuals use to participate in the governance of a blockchain network. There are different types of nodes, including miners, full nodes, and lightweight nodes. The purpose of nodes is to maintain a copy of the blockchain ledger with all or part of the transaction history, validate or mine transactions, and get rewarded in the form of the native crypto coin/token of the blockchain.
Transactions
Transactions are the fundamental units of data on a blockchain. They represent actions or data exchanges between participants in the network. A typical transaction includes sender and receiver addresses, a digital signature, and the transferred amount or data.
Hash
In blockchain, a cryptographic hash is a fixed-length string generated from block data using a mathematical function. It ensures data integrity, as any changes on a block’s contents will result in a different hash.
Consensus mechanism
The consensus mechanism is a protocol or algorithm that allows nodes in the network to agree on the state of the blockchain- which is the current status of all information stored in the system. Popular consensus mechanisms include Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS).
Smart contracts
These are self-executing pieces of code that run on the blockchain. They automate and enforce contract terms without the need for intermediaries. Smart contracts execute themselves when predefined conditions are met; developers deploy them on a blockchain to automate agreements, enabling trustless and transparent transactions without third-party involvement. Smart contracts are used in decentralised applications or dApps to foster an efficient and reliable digital ecosystem.
For example, in a lending/borrowing dApp protocol, smart contracts automate all transactions. Borrowers make a loan request specifying their terms, then smart contracts establish collateral locking mechanisms and calculate interest rates based on predefined rules. The lender enters the agreement with the borrower and the smart contract releases funds, while repayment terms are also entered. If the borrower defaults, the collateral is liquidated, ensuring lender protection. There are decentralised lending protocols like Aave using smart contracts.
Blocks
Blocks within the blockchain record a series of transactions. Every block includes a pointer to the preceding block (for anyone with knowledge of computer science, you can picture it as a linked list), forming a sequential chain of blocks, giving rise to the term "blockchain.” Blocks also include a unique cryptographic hash that verifies the integrity of the block's data.
Wallet
A blockchain wallet is a digital instrument enabling users to securely store, send, and receive cryptocurrencies. It utilises cryptographic keys to provide ownership and control of one's digital assets.
Public and private keys
A public key is a unique, openly shared identifier associated with a cryptocurrency wallet. It acts like a destination address, allowing others to send cryptocurrencies to that wallet. The private key, on the other hand, is a confidential, securely stored code that grants access and control over the funds associated with the public key. It is essential for authorising transactions and should be kept secret.
These key pairs work together through complex cryptographic algorithms to ensure the integrity, confidentiality, and security of blockchain transactions.
These components come together to form blockchain layers. Let’s take a look at them next.
Layers in a blockchain
Here are the five layers forming the layered structure of a blockchain:
Hardware or infrastructure layer:
This is the layer that holds all physical components supporting a blockchain, namely servers and computers (nodes).
Data layer:
What follows is the data layer, which stores all validated transaction details in ‘blocks’.
Network layer:
This layer is for all communications between the blockchain nodes, so it connects the nodes in a chain and makes sure to distribute information across the network. The decentralisation factor is thus largely supported by this layer.
Consensus mechanism:
As the name suggests, this is the layer which implements the consensus mechanism (like Proof of Work) in a blockchain and ensures that all nodes get a say in each decision being made.
Application layer:
This is the layer that holds all the apps for a blockchain’s respective use case(s). Smart contracts, dApps or decentralised applications, and any other software in use are put here. Developers can create new applications on top of a blockchain here as well.
Types of tokens on a blockchain
Cryptocurrencies are standalone digital currencies, primarily used for transactions and value storage. Tokens, on the other hand, are digital assets created on existing blockchain platforms and can represent various assets. Here are the different types of crypto tokens:
Fungible tokens
Fungible crypto tokens are essential elements of the blockchain ecosystem, serving as the backbone for cryptocurrencies like Bitcoin and Ethereum. Fungible means that each unit is indistinguishable and can be swapped with any other unit of the same kind without any loss of value.
Semi-fungible tokens
Semi-fungible tokens (SFTs) bridge the gap between fungible and non-fungible tokens by embodying characteristics of both. Initially, SFTs can function as fungible tokens, making them interchangeable with others of the same type. However, upon a certain condition or event, such as being redeemed or used, they transition to non-fungible tokens (NFTs).
Non-fungible tokens
Non-fungible tokens (NFTs) are unique digital assets that act as proof of ownership and authenticity for a wide range of individual items or content on the blockchain. Unlike fungible tokens, each NFT has a distinct value and cannot be exchanged equivalently with another.
Summing Up
The structure of Blockchain has proven its efficacy in domains like finance, healthcare, and supply chain management by improving efficiency, strengthening security, and lowering operational expenses. Furthermore, as blockchain matures, it continues to present novel applications, ranging from decentralised finance (DeFi) and non-fungible tokens (NFTs) to advanced supply chain tracking systems and secure voting mechanisms.
Disclaimer: The information provided in this blog is based on publicly available information and is intended solely for personal information, awareness, and educational purposes and should not be considered as financial advice or a recommendation for investment decisions. We have attempted to provide accurate and factual information, but we cannot guarantee that the data is timely, accurate, or complete. India Crypto Research or any of its representatives will not be liable or responsible for any losses or damages incurred by the Readers as a result of this blog. Readers of this blog should rely on their own investigations and take their own professional advice.