What Is The Blockchain?
As we progressively move toward the new phase of the web (Web3), we must familiarize ourselves with the technology that powers it - The Blockchain. In this article, we will take a high-level dive into what the blockchain is and learn some blockchain concepts.
What is the Blockchain?
The word Blockchain is derived from two words; Block and Chain. The implicit meaning of this is that the Blockchain is a ''chain of blocks''.
A blockchain is a form of distributed ledger (a database shared across a network of computers where each node maintains a copy of stored data) where transaction data is stored in blocks and each block is cryptographically linked to the previous block.
A good mental model is to think of the blockchain as a series of boxes where each box is of pre-defined memory size, must be filled with books (data), and padlocked before moving on to a new box. The key (hash) to the previously filled box resides in the next box.
This structure of data ensures that once transactions on the blockchain are recorded, the recorded block data cannot be mutated or altered.
Since the blockchain is distributed across nodes (computers), this means that it is decentralized because each participant in the blockchain network has a copy of the blockchain on their node. This distributed nature of the blockchain ensures that it does not have a single point of failure and the failure of one node does not affect the network.
The history of the Blockchain
Blockchain, as a technology, builds upon different technological advances. It started way back in 1981 when two scientists, Stuart Haber and Scott Stornetta, wanted to solve the problem of authenticating digital documents. Their solution was to create a series of digital documents which were immutably linked to each other.
In 2004, Computer Scientist Hal Finney invented "Reusable Proof-of-Work" (RPoW), a prototype intended for use as a form of Digital Cash. It helped to solve the known "Double Spending" problems by storing ownership on a trusted server.
In 2008, a developer or group of developers, with the pseudonym "Satoshi Nakamoto" introduced a whitepaper containing the idea of a decentralized peer-to-peer e-cash system. Instead of using a trusted server like RPoW to prevent double spending, Bitcoin utilizes the decentralized peer-to-peer protocol to track and verify transactions.
In 2013, a programmer, Vitalik Buterin started developing a new blockchain-based platform, Ethereum. It has a layer of scripting functionality, known as smart contracts, for conditionally fulfilling transactions when pre-set conditions are met.
The block is the foundational data structure in a blockchain. It contains transaction information and can be broadly divided into header and body.
The Header contains information like;
- Hash of the previous block
- Root hash of Merkle tree
The Body hosts all data (information) about transactions that are confirmed with the block.
Fun Fact: It takes 10 minutes to verify transactions within a block and add a new block to the blockchain on Bitcoin.
A nonce is a condensation of the phrase "Number can only be used once". Think of the nonce as a One Time Password (OTP) that is used to access blocks in the blockchain. When miners mine a block, the work done is to find the specific nonce unique to the block being mined.
The Hash is the output of a given input introduced to a hashing function. Think of the hash function as a regulator that converts data (e.g. string) of varying lengths to data of fixed length.
Let input = W
Let output = H
Let Hash function = h()
h(W) => H
A consensus mechanism is a framework put in place to enforce the integrity of a blockchain protocol. Since the blockchain is distributed in nature, there must be a way to agree on which state of the blockchain is true or false.
It provides a way to ensure that certain conditions are met by various nodes and validators before a block is added to the chain.
- Proof-of-work (PoW) e.g. Bitcoin, Ethereum.
- Proof-of-authority (PoA) e.g. VeChain
- Proof-of-stake (PoS) e.g Polkadot
An address is somewhat similar to an email address, a location where you can receive a piece of information. Addresses on the blockchain are a string of numbers and characters which is generated from the public key using a hash function. Addresses are used to receive tokens or cryptocurrencies and are unique to a public key.
Types of blockchain
A public blockchain is open and decentralized. They are without censorship and any node connected to the network can be a participant.
A private blockchain is closed and not as decentralized as public blockchains because participant nodes need permission to be a part of the network. It improves privacy and increases the speed rate of transactions.
A consortium blockchain is a network that consists of multiple organizations where each organization has access to and authority over the network. The blockchain is partially immutable and transaction speed is also very fast.
- In Healthcare for; managing e-medical record data, and tracking pandemics or endemic outbreaks.
- For voting in government elections to prevent vote manipulation.
- IoT; Supply chain, inventory management, and asset tracking.
- Trustless agreements between parties by utilizing Smart Contracts.
It is important to note that blockchain technology is relatively new and more innovations will surface as the industry matures.
In conclusion, we learned about what the blockchain is, the history behind the technology, some fundamental blockchain concepts, and amazing use cases for the technology.
I know you enjoyed reading as much as I enjoyed writing the article 😉