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ā ā¦