Blockchain: what is it, and how does it work?
by Alyona Shepilova
Jun 16, 2023
Blockchain vs Bitcoin
Very simple, Bitcoin is a currency. You send some to me, I send some to the next person, they send it back to you. We make transactions, so there must exist a method to record these transactions. And the method that was chosen was blockchain technology.
Note that each cryptocurrency has its own* blockchain to record transactions. In this article, we will focus specifically on Bitcoin's blockchain.
*Okay, this is not strictly true, see 'What are Ethereum tokens?' for a detailed explanation.
So, what's a blockchain?
A Bitcoin blockchain is a decentralised distributed digital ledger that consists of blocks that contain information about Bitcoin transactions.
Let's break it down.
Ledger is a collection of financial records. Every ~10 minutes, all recently made transactions are compiled into a new block, which gets added to the blockchain. New blocks are attached to the previous blocks. In fact, to create a new block, one needs to use the information included in the previous one. So, this is quite literally a chain.
Who maintains the blockchain?
The Bitcoin blockchain is maintained by the Bitcoin network. This includes two essential types of people – those who store information (full nodes) and those who add new blocks (miners).
Store entire blockchain data ->
Check transactions and blocks against the data they keep ->
Secure the network
(There are also lightweight nodes: they don't store the entire data and are dependent on the full nodes to receive information. But they can verify the validity of new blocks).
Also store entire blockchain data
Add new blocks to the blockchain.
Before any new block can be added to the blockchain, it must get verified by full nodes. They will then update their blockchain version following this new data (block).
There are thousands of miners and full nodes around the globe. But where miners compete with each other (and against the clock) to be the one who adds a new block to the blockchain, full nodes work together.
Suppose some malicious actor undertakes to hack the blockchain by falsifying information in just one block. In that case, it will automatically change hashes (for now, think of them as 'tags') of all the following blocks in their version of the blockchain. Other nodes will check this version against their records and reject it. So, the bigger the network of full nodes is, the more secure the network.
When people talk about blockchains, they often use words like distributed and decentralised. Don't let these words scare you. We've already touched on that there are thousands of people around the world who are not connected to each other but contribute to the development of the blockchain just the same. They store the same data and validate the same data – there's no single entity that can claim supremacy over others.
Distributed in this sense would mean that when it comes to processing information, there's a network of computers that store the same information (see redundancy below). Say, one computer is destroyed along with all the information it contains – there are still thousands of other people/computers/nodes who retain the very same information. Decentralised is very similar, but it also means that every node is equal. And this is what makes blockchain so efficient.
Structure of a block
The initial block that started it all is known as the genesis block. It was mined in January 2009. Since then BTC block structure has hardly changed.
To simplify: each block consists of a header part and a part that contains all newly-made transactions (you send 0.5 BTC to me, I send 0.3 BTC to John, John sends 22 BTC to Mary etc.).
The header part is a bit more complex than the transactions part as it contains information about the previous block and all the transactions this new block contains but hashed (think compressed and modified). There's also a timestamp (when the block was generated).
New blocks are generated by taking the hash of the previous block. When you change the source code even a little bit, the hash also changes, which results in a change of hashes for all blocks that follow (Team Full nodes - 1, team Hackers - 0).
Advantages of Blockchain
Unlike traditional brick-and-mortar banks, blockchain works 24/7. If you need to send some BTC at 5 am on a Saturday, there's a great chance the funds will reach the recipient by 5.30 am on the same day, if not sooner. (You can always give it a test drive – we humbly offer ourselves as a site for your experiments)
The same goes for when you're transferring funds abroad – there's no additional cost for sending to a wallet whose recipient lives on another continent, there's no paperwork to be done and no incessant waiting. It's practically the same as sending money to someone next door.
No middle man
You do need nodes and miners to process your transfers, but this is what you have in abundance. Someone's literally always there.
No room for errors
Every blockchain transaction goes through all available nodes. Any potential new block will be validated before being added to the blockchain. If someone tries to game the system, the nodes will see and reject the faulty transaction/block.
Disadvantages of Blockchain
Cryptocurrencies are volatile. It means that when they suddenly plummet or skyrocket in price, everyone suddenly has a brilliant idea to buy/sell/exchange between wallets. And since an average throughput of BTC is ~2,500 transactions/10 minutes, traffic jams inevitably occur. You are either forced to pay higher fees to get your transaction a preferential treatment or wait until the road clears in a few hours.
There's a nice word 'redundancy', which in relation to the BTC blockchain means roughly the following: there are too many miners who use inordinate amounts of energy to compete with each other. Considering that only one gets to add a new block to the blockchain, the computational efforts of others will, effectively, go to waste.
A Cambridge University study published in 2021 suggests that Bitcoin uses more electricity annually than the whole of Argentina. Cleaner, greener solutions are being worked on.
Not a bad thing per se, but this is something bad people can take advantage of. Once you make a transaction, it's pretty much set in stone – no one can revert it and return your hard-earned BTC to you. So be very careful with who you're sending money and always research beforehand. Don't make it easy for scammers.
Is blockchain really anonymous?
All bitcoin transactions are recorded on the blockchain. This includes the address from which the money was sent and where it was sent. Moreover, if somebody knows the address, they can track the movement of money on it right from the very start. Now, that's not very encouraging, is it?
Well, the good thing is, there's nothing that ties your identity to this or that address. So, as long as you don't share it publicly, there's no need to worry that anyone would find you and opine about your online financial activity. Transparency and semi-anonymity combined.
Who 'invented' the blockchain?
The concept was first outlined in 1991 by two mathematicians – Stuart Haber and W. Scott Stornetta. Working on the problem of digital document authentication, they were looking for a solution that would allow you to be confident a document hasn't been altered. Their answer was a system of interlinked documents with everyone as a witness, which would solve the problem of trusting just one party who might not be entirely impartial. At the same time, they were pretty ambitious – their invention was to cover all financial records globally, but also works of art and so on...
18 years later, an individual (or indeed a group of individuals) known as Satoshi Nakamoto would limit the technology to a very specific use case – Bitcoin.
Other use cases
Bitcoin made Blockchain relevant in the financial sector, but surely, if there is an efficient way to store and transmit securely encrypted information, why should cryptocurrencies have all the fun?
There are so many areas where the technology already is and can be applied to make this world better. Think fairer voting systems that can't be cheated. Better storage of medical records so they never get lost. Safer storage of personal information so your ID can never be used for illegal activities.
To sum it up
Blockchain is an instrument that records all bitcoin transactions. It's quite literally a chain of blocks: every new block containing new transactions is linked to the prior by using its encrypted information (hash).
Blockchain is both distributed and decentralised. This means that the information is stored by multiple people around the globe, and no one has supremacy over others when it comes to making decisions. Blockchain needs two kinds of people to operate – miners, who confirm transactions, and full nodes, who verify the information and keep records of all the transactions made on the blockchain.
Now that we have a rough picture of what blockchain is and how it works, let's look more closely into how transactions get confirmed on the blockchain.
Block – a container that accommodates a limited number of newly-made Bitcoin transactions. New blocks are created by using the information contained in the previous one.
Blockchain – quite literally a chain of blocks. Each one is connected to the previous one and the following one.
Decentralisation – in cryptocurrencies, when there's no single entity who calls the shots – every participant is equal.
Distribution – in cryptocurrencies, when information is stored by multiple participants who are not connected to each other.
Full node – a person who helps maintain the Bitcoin blockchain. Full nodes 1) store entire blockchain data and 2) check transactions and blocks against the data they keep, thus securing the network.
Genesis block – the very first block on the Bitcoin blockchain mined in 2009 by Satoshi Nakamoto.
Hash – a piece of data of any length turned into a piece of data of a fixed length. It's impossible to calculate the input from the output without a key – this is why it's a secure method to pass information.
Lightweight node – a person who helps maintain the Bitcoin blockchain. They don't store the entire blockchain data but store just enough to check the validity of new blocks.
Miner – a person who is responsible for adding new blocks (containing newly-made transactions) to the blockchain.
Redundancy – in mining, is when more than one person is doing the job that requires only one person. It's bad because it's a waste of a valuable resource (electricity). It's good because there's no downtime – there's always someone who will do what needs to be done (mining pays well for winners).