A "Blockchain" is a network's Database
Cryptocurrency networks have several components - the blockchain is their database.
TLDR:
Cryptocurrency networks have several components like their currency, network layer, smart contracts, consensus algorithm and their blockchain.
A blockchain is the database that stores the network’s history of transactions.
From the full blockchain the current state of the network can always be recreated.
The intention of my Substack is to simplify Web3 concepts for builders in the space. I believe most builders are non-technical, so as a technical builder I aim to bridge the gap and make these concepts easier to understand. Yet, I also know that people have busy lives and in the past I’ve written very long posts making it hard to read them.
After weeks of attempting to write shorter posts this week feels like I’ve finally managed to crack it. With a word count of around 700 words, this post should only take 4 minutes to read - that’s half the size of previous posts!
Future posts will be short and manageable like this one too, although from time to time I’ll still write larger and more complex posts as I’ve done so in the past.
Today I’m going back to basics and discussing the word “blockchain” as it gets thrown around to mean a lot of things, but technically it’s just a database.
Cryptocurrency networks
The Web3 space is technical and confusing, and in an attempt to simplify it we often use one term as a synonym for another, making things even more complicated! For example we often use the word “blockchain” as a synonym for a cryptocurrency network itself, this means we may talk about the Ethereum blockchain or Bitcoin blockchain when discussing the network as a whole.
However, when discussing permissionless, cryptocurrency networks (which is what most Web3 participants are focussed on), a blockchain is just one component along with other components like the currency, the network layer, its smart contracts and its consensus algorithm (which was last week’s topic!).
The “blockchain” component is a distributed ledger saved by network participants storing the network’s history of transactions - ie. its a database that stores all the network’s history!
Why is it called a “block” “chain” though?
Every cryptocurrency network is slightly different, but all have regular intervals defined by their consensus rules where the network adds new data to its historical database, in Bitcoin its approximately every 10 minutes, while in Ethereum its approximately every 15 seconds.
At these intervals the selected validator will package together a set of transactions from the “Mem Pool” to process and save - the Mem Pool being the place in the validator’s memory with all the transactions users are currently trying to submit. The transactions that the validator picks will be those that they deem most favourable, for example in Ethereum they’ll pick based on factors like gas price and transaction size.
To save this data the validator will group these transactions into a new “block” of transactions and “chain” them onto the end of the current history of transactions, hence making a “blockchain”.
What does this database store?
I’ve already said that the blockchain is a database with a history of transactions, and in truth it’s not much more complicated than that regardless of the chain, whether it be Bitcoin, Ethereum or any other.
A block will start with a header holding important metadata like the hash of the previous block, the timestamp for this block, and more, and after the block header it will store its list of transactions. Although these transactions can look very different on different crypto networks, fundamentally they are all stored in the same way on a blockchain.
On Ethereum the block header has some important variables like a “state root” hash used to prove what the state of the network should be. However, the state of the network is not stored on-chain itself but rather its interpreted from the history of transactions on the chain.
Ethereum nodes hold a data structure called a “state trie” that has the current state of user accounts and their assets. But the blockchain does not save this large data structure, it simply has the “state root” hash in the block header to check the validity of the state trie and the components necessary to recreate the state trie in full at any given moment, namely the history of all transactions themselves!
And that’s a wrap for this week!
Now you know that a blockchain is in fact just one component of a cryptocurrency network. So next time someone uses the word “blockchain” to speak generically about the network, you can be the annoying person in the corner who says “well actually” …