“A Blockchain is a type of database. It is essentially a digital ledger of transactions that is duplicated and distributed across the entire network of computer systems, known as the blockchain. Each block in the chain contains data or information in some format, and as this information is added it creates a transaction, and every time a new transaction occurs on the blockchain, a record of that transaction is added to every participant’s ledger. The decentralized database is managed by multiple participants.”
Confused? Lets dig deeper.
The blockchain is a database of information, but before you can understand how the blockchain works we need to look at the different types of database and how databases have evolved.
What is a database?
A database is a collection of data or information stored or hosted on a computer system.
This is a simple form of a database, it stores very limited amount of information for a single user or small group of individuals.
The Centralized Database
When we need anyone to be able access information and search and retrieve the information, we use a database. The information stored within this database is stored on what is known as a server. This server can be a single computer or multiple computers. The number of computers is simple a function of how much data needs storing and how many users there are accessing the data. The more data the bigger the number of computers. It is important to understand this is a centralized server, meaning all the information is stored in one place, albeit with lots of computers all managed by one person or company.
Example – YouTube
When you search the Web 2.0 or the World Wide Web and up comes a a YouTube video in the search results from lets say Google (which is a centralized database of websites owned and controlled by Google) you are directed to the YouTube Server, which is a centralized server, albeit massive in size, with multiple computers storing the videos/data, but is owned and controlled by YouTube/Google.
The De-Centralized Database
The blockchain is also a database but its structure is markedly different and holds some markedly different properties as we will see. Whilst Centralized Databases add data to tables, when data/information is added to the blockchain, it is added to blocks. Each block has a specific size and once it is full up it then creates another block and links to the previous block therefore creating a chain of information spread over over blocks, coining the phrase Blockchain.
When a block is created it is permanent. It will be there forever.
So how does the Blockchain work?
When you add information/data to a blockchain, you are adding it to a block. This is known as a transaction. The block is a ledger of transactions. Each transaction is ‘distributed‘ to computers (known as nodes) on that specific blockchain (there are many different blockchains, like Bitcoin and Ethereum as an example of a cryptocurrency blockchain). The transaction you created is verified by all the computers in that blockchain, every 10 minutes all the transactions are verified, cleared and stored in a block which is linked to the previous block thereby creating the chain. Each block must refer to the previous block to be valid. Each transaction is time stamped preventing anyone from altering the ledger. Each transaction is permanent, secure and transparent.
How is the information/data verified?
Without going into the specifics, each transaction needs its authenticity verified. This is done with complex consensus (ie between nodes) computer algorithms, whereby each of the nodes/computers agree on the current state of the ledger. The two most common consensus methods are Proof of Work (PoW) and Proof of Stake (PoS). We will be covering this in another blog.
So a blockchain is a ‘distributed ledger’ of verified transactions.
There is no central database anymore. This is very significant!
Why is the Blockchain so secure?
Firstly it is public, anyone can see the transactions. Secondly the blockchain is encrypted involving public and private keys. To hack lets say the Bitcoin Blockchain you would have to rewrite every transaction ever made on the Bitcoin Blockchain whilst being watched by everyone. Its practically impossible to hack the blockchain, if you were to try using current technology and computer speed it would take longer than your current life span, so it truly has built in inherent security.
Different types of blockchains
There are currently 4 types of blockchain:
- Public Blockchain
- Private Blockchain
- Hybrid Blockchain
- Consortium Blockchain
Probably the most commonly known through latest hype of cryptocurrencies. It was the Bitcoin public blockchain that helped popularize the distributed ledger technology (now you know what that means). The public blockchain is decentralized, the distributed ledger is distributed across a peer-to-peer network, i.e. computers or nodes. The public blockchain is as it says. Anyone can join a public blockchain and become an authorized node. Because it is open source, the node or user can access transactions (remember its gonna take a lifetime to hack). No valid block or transaction can be changed on the network and any node/user can verify the transactions, help find bugs and propose changes. This is a true public community.
- Completely independent of organizations
- Network Transparency
- The network slows down the more computers/nodes that join the network
Because of the transparency and public nature of the public blockchain, companies will avoid this.
To facilitate the ‘privacy’ for business and organizations, enter the Private Blockchain.
‘I thought the blockchain was supposed to be decentralized and transparent?’
Think of a Private Blockchain like an Intranet, whilst a Public Blockchain is like the World Wide Web. Companies want to use blockchain technology but dont want their proprietary information out in the public domain. It works in the same way with peer-to-peer nodes and decentralization, but is on a much smaller scale making the network faster. These blockchains are also called ‘permissioned blockchains’ as to become a user/node you need permission to join the network.
- The organization controls permissions, security and accessibility
- The network is fast because of the smaller number of nodes/computers on the network
- The small number of nodes means less security (If 51% of the nodes go rogue then they can take control)
- No anonymity
Where organizations want to have a public blockchain but want to restrict access to certain parts of the blockchain, they do so by creating two blockchains in effect one public and one private and allow access to the private part of the blockchain with smart contracts. This enables the organization to control who can access specific data stored on the blockchain. The organization can still not alter transactions. Also the user with the smart contract can access permissioned data and remains anonymous, however the moment they make a transaction their identity is revealed.
- Hackers cannot take over 51% of the nodes
- Cheap and fast
- Better scalability
- Not completely transparent
- No incentive for users/nodes to contribute to the network
The Hybrid blockchain can be very useful in the commerce world protecting intellectual property and company secrets.
Also known as a federated blockchain, the consortium blockchain is very similar to the hybrid blockchain in that it has public and private elements. As the name suggests it is multiple organizations operating within the same blockchain or decentralized network. It is a private blockchain with limited access to a group.
- More secure as security and permissions are controlled by the organizations.
- More scalable
- Access control
- Less transparent than public blockchains
- Network functionality can be impaired by organization regulations
So there you have it. I hoped this has helped those confused about the blockchain, as you have seen its not just all about Bitcoin and cryptocurrencies. If you enjoyed this article please share it or leave a comment below. Next up will be how the blockchain is impacting Web 3.0.