Blockchain Concepts: An Introduction to Blockchains
This series will aim to explain the principles behind blockchain systems. We'll be introducing some of the technologies that enable blockchains, and applying them to building our blockchain.
In this first part, we'll cover the following topics:
Concept of a blockchain.
Blockchain history.
Use cases.
This series is comprised of the following posts:
What is a Blockchain?
A blockchain is a database that differs from how traditional databases store data. Typically data is stored in tables, rows, and columns. On the other hand, a blockchain stores data inside blocks that are linked together to create a continuous and unbroken chain.
One of the most remarkable features of blockchain is its immutability. Once data is recorded in a block and added to the chain, it becomes nearly impossible to alter or delete. This inherent strength comes from the fact that the blocks are linked. Any attempt to modify a single block would trigger a cascading effect, necessitating changes to subsequent blocks. Ultimately, this would either demand a complete overhaul of the entire blockchain or render it invalid upon verification. This is something that we'll verify when we start coding our blockchain in the next post.
Due to this data immutability property, blockchains are primarily used to keep records of tokens that are called cryptocurrencies. The transactions of cryptocurrency exchanges are all stored on the blockchain, and any attempt to tamper with the transaction data will be easily detected. Which will be discussed in detail in the Cryptocurrencies post.
Blockchains are usually distributed across a network of nodes (computers) that collectively maintain and update the blockchain. This decentralization enhances security and trust since if a single entity attempts to manipulate the data within the blockchain, all other users will be able to easily detect it. To see the importance of this in action we'll integrate the blockchain we'll code into a decentralized network in part four.
Additionally, the data in a blockchain are transparent and publicly recorded. Every participant on the network can inspect the complete dataset within the blocks and validate its accuracy.
Blockchains can also run virtual machines, which enable the creation of smart contracts that allow users to make contracts with each other that cannot be broken. If these concepts seem foreign to you they'll all be covered in our last post where we integrate a virtual machine into our blockchain.
History
Blockchain-like systems have been in development for several years, stemming from the necessity for users to maintain a shared database with consistent integrity, especially when trust among users is limited.
One of the most notable systems was the work of Stuart Haber and W. Scott Stornetta in 1991 where they discussed how to timestamp digital documents. In this paper, they discussed how would documents coming into an office get timestamped so that the users would be able to know in which order the documents arrived, and detect any alterations made to previously submitted documents. This kind of record-keeping would be fundamental in for example a patent office where the time of filling of the patent and also the proof that the patent hasn't been altered at a later date would be of paramount importance.
It would be some years later in 2009 when the first blockchain would be launched. Bitcoin introduced the world to the first actual blockchain. It marked the start of a decentralized network where users could transact and store value without relying on traditional financial institutions. Instead, they relied on a decentralized network of computers where no single entity could manipulate user funds without their proper authorization.
The next big innovation came in 2015 when the Ethereum blockchain, introduced the concept of smart contracts, which are self-executing contracts with the terms directly written into code. Ethereum's blockchain made it possible to create decentralized applications (DApps), expanding the use cases for blockchain technology.
Currently, there are many new blockchains, each with unique ways of running the protocol. New technologies are also emerging to overcome current blockchain limitations such as slow update speed, and high cost for posting data.
Use cases
Blockchains have found uses in various fields:
Cryptocurrencies: Bitcoin and Ethereum are the most famous examples. They use blockchain for secure, peer-to-peer transactions.
Smart Contracts: Ethereum pioneered this concept. Smart contracts automate and enforce agreements without intermediaries, used in finance, and supply chain management, among others.
Games: Blockchain-based games introduce unique in-game assets and ownership structures, giving players real ownership.
Supply Chains: Blockchain enhances transparency and traceability in supply chains. It records the journey of goods from source to consumer, reducing fraud and ensuring product authenticity. Many companies like Mercedes are looking into blockchain to ensure consistent documentation of contracts along the supply chain.
Introduction to the Series
In the next blog posts, we'll explore blockchain technology further by building a simple one from scratch. Our focus is on learning and grasping the core concepts, rather than building a highly performant system.
Each post will begin by teaching one of the many fundamental technologies that are used in blockchains, followed by integrating them and further developing our blockchain.
We will be using TypeScript to implement our blockchain, as this language is one of the most widely used by developers and features an extensive library of readily available packages.
The next post can be found here.
This series is comprised of the following posts: