Skip to main content

Command Palette

Search for a command to run...

What is a Blockchain Anyway?

Published
6 min read
What is a Blockchain Anyway?

What the heck is a blockchain? The short (and overly simplified) answer; it’s a network of computers that communicate and verify transactions in order to keep an immutable distributed ledger.

Whaaaaaat 🤔🤯🤔🤯🤔🤯

Don't worry, we will go through each piece of that sentence and you'll be a pro. Much of what we define will be limited to what we need to understand a blockchain. If you want a TL;DR, skip to the end😉.

A Network of Computers that Communicate

You're currently using a laptop, tablet, phone, or another electronic device to read this article. We can consider any of these a "Computer" - some electronic device that can process information and communicate with other devices that are similar (this is not a strict definition of a Computer, just a definition that we will use).

A Network of Computers is many of these devices that are connected by some capability of communication.

As an example, let’s assume you're at home and connected to your WiFi along with a friend that is also connected to the same WiFi. The two devices can communicate through the WiFi network. This is an example of a small network, your home WiFi. Bigger networks can be created by combining smaller networks and so on. Eventually we get to what we call the Internet - a massive network of many many smaller networks.

A blockchain is exactly this - a small network. A bunch of computers that are continuously talking to each other as one network. In order to join this network and be able to communicate with the other computers, a computer must start a program specific to the blockchain network it wants to join. This program is what allows each computer in the network to speak the same language and communicate with each other. You can think of this as somewhat like WhatsApp - if you want to communicate with someone who is using WhatsApp you must start WhatsApp and then you can talk.

Quick recap: A blockchain is a network of computers that are all running the same program enabling them to communicate with each other.

And Verify Transactions

In the simplest sense, a transaction is some command that is sent to one of the computers in the network. For us, we will assume that all of these commands are of the format "Send X (an amount) Y (some currency) to Z (a person/account)". We can think of it much like using PayPal, Venmo, or any other money sending app.

Each computer in the network (we will call these nodes) will receive some transactions from people using the blockchain. Those nodes will communicate with other nodes about each new transaction they become aware of. This will repeat, until all the nodes know about all of the current transactions. Each node will verify each transaction it knows about to ensure that the person sending actually owns the funds they are trying to send.

As an example, let’s say Alice has 5 dollars and she sends the following transaction to a node: "Send 4 dollars to Bob". That node needs to verify that Alice actually has 4 dollars to send. The node will also notify other nodes that they received this transaction and each of those nodes will also verify that Alice actually has 4 dollars.

Once there are enough verified transactions, one of the nodes creates a block - a chunk of verified transactions. This block is then added to the end of the latest block that was created making a chain of blocks. As more transactions occur, more blocks are created and appended, making the blockchain longer.

Quick recap: Computers in the network, called nodes, receive transactions from users. The node will verify that the transaction is valid and will notify other nodes about the transaction. These other nodes will also verify that the transaction is valid. Once many transactions have been verified, they are bundled into a block which is appended to the last created block, creating a chain of blocks - aka The Blockchain.

To Keep an Immutable Distributed Ledger

All of these transactions and blocks are making up a ledger of who owns what funds based off of incoming and outgoing transactions. Each node holds an exact copy of these records and runs the same program to keep the ledger up to date and valid. This is what makes the ledger distributed; all nodes perform some action to compute a single outcome that is shared with all nodes.

As time progresses, more transactions are being verified and more blocks are being added to the chain. Each block contains a few pieces of data; the list of transactions, a unique identifier (called a hash) of the block, and the previous block’s hash. Since each block contains the hash of the previous block, each block is linked to the previous one. This means, if someone wanted to change the history of the chain by removing one of the blocks, everyone would know since the block after the one removed would not contain the hash of the block before the one removed.

Assume we have a blockchain that contains 100 blocks currently. Someone wants to change history and remove block #97. If this happened, then we would have block #96 before block #98. BUT Block #98 contains #97's hash not #96's so everyone would know that some history is missing or is incorrect and would not accept the change.

This is what makes the blockchain immutable. Or does it? What if we removed blocks #97, 98, 99, and 100 and replaced them with valid but different blocks? Since the historical chain is valid it should be accepted.

This is true and it is possible that it can happen. So how is a blockchain immutable???

Since the current history is progressing by adding blocks, the alternate history needs to be created at a faster rate than the current history. This is both extremely costly and time consuming as we will see in a later post, making it very unlikely to happen and causing the blockchain to be probabilistically immutable.

In a later post we will discuss Why blockchains are useful and matter in today's world.

Full Recap

A blockchain is a network of computers (nodes) that are all running the same program allowing them to communicate about transactions that each one knows of.

Transactions are sent to each node to verify that they are valid and viable transactions. Once a chunk of transactions have been verified, a block containing these verified transactions is appended to the end of the current chain of previous blocks which contain the history of validated and verified transactions - this chain of blocks is the ledger aka The Blockchain.

Each node holds their own copy of the agreed upon blockchain. Each block contains a piece of the previous block linking them together in the history. In order to change the history, one of the nodes must create an alternate history that is both valid and longer than the current history (we will see that this is not 100% for every blockchain). Since the current history is progressing by adding blocks, the alternate history needs to be created at a faster rate than the current history. This is both extremely costly and time consuming, making it very unlikely to happen and causing the blockchain to be probabilistically immutable.

So what is Bitcoin?

Stay tuned for part 2 of Crypto College

Crypto College

Part 1 of 2

This series is an in-depth beginners guide to blockchain and cryptocurrencies; from "What is blockchain" to "Deploying complex contracts", we will cover everything.

Up next

Crypto College

A Journey Through the Cryptoverse: Blockchains and Cryptocurrencies