An introduction to blockchains
Blockchains — they’re all the buzz right now. You might have heard that they’re revolutionizing informatics, or maybe that they’re ruining the planet by using way too much power. You also might not have heard anything at all. So what exactly is a blockchain? And what do they do?
Throw the word ‘blockchain’ into a group of people and you’ll probably get any number of reactions, ranging from “a what chain?” through to “you should invest in X!” As with any technological advancement, there are nuances to blockchains that many simply don’t understand: but that shouldn’t stop you from learning! Blockchains are an incredible development, and regardless of how you feel about cryptocurrencies or even informatics in general, they’re here to stay and they’re already changing the world.
But a simple question remains…
What is a blockchain?
If you’ve never heard of a blockchain before, you would have at least heard about cryptocurrencies like Bitcoin. Blockchains are the technology that makes cryptocurrency possible, and cryptocurrencies play a key role in securing some blockchains. But digital money isn’t the only application that blockchains have.
In short, blockchains are a network of computers. Much like the internet or even computer networks at your office, blockchains are a way of communicating information between different points and users. But because of the way they’re designed, blockchains can do things that traditional computer networks simply can’t.
We’ve all had problems before while logging into something at work or online and discovering that a server somewhere is down: blockchain networks don’t fail in this way, because there isn’t a single server which can fail. Instead, many different computers in the network called nodes each share copies of the data. If one node fails, no worries: there are potentially thousands of others doing the exact same job.
A blockchain can’t be hacked like a traditional website either. They’re built on top of incredibly sophisticated cryptographic systems which makes accessing personal data virtually impossible without your private password. And what about getting those private passwords from hacking a database, like we’ve seen with so many other companies before? Your private password, often called a ‘private key’, isn’t stored anywhere on the network — the system can verify that it’s you without needing to save your key anywhere. Make sure you write it down though: if you forget it there’s no way to get it back!
Having distributed nodes and being tough to break into makes blockchains especially useful for resisting censorship. Imagine you’re a journalist in a country that doesn’t really like journalism — information you put on a blockchain can’t be deleted, and the networks themselves are virtually impossible to shut down. It’s also easy to imagine a voting system which cannot be compromised or tampered with after the fact, and how that could benefit democracies all over the world.
What is amazing about blockchains though is how they manage to not only share information, but also agree on it. If we have a bunch of different computers sharing data, how can we be sure that all the data is the same? Imagine if someone sneaks in and tries to do something bad at one of these nodes. Could they convince the rest of the computers to take in their dodgy information? If I want to add some information to the network, and you want to add some information to the network, who gets to add it first? And how quickly can all of the other computers take on this information and check that it’s legitimate?
Blockchains and digital gold
Imagine a bank branch collecting a book full of all the transactions people make that day. It would include the names, balances, deposits, withdrawals and transfers of all the people who went to the bank that day. At the end of the day, the book is closed and added to a safe with all the other books from the previous days. Tomorrow a new book will be started, and if anybody needed to check who sent what money on a day a few years prior, that book could be dug out of the archive and consulted.
This is easy if we have just one branch, but what about a network of branches around the country? We can imagine these branches hopping on a conference call at the end of the day and updating each other about the transactions that had occurred, but here the banks begin running into some problems. If a customer withdraws some money in New York, the bank needs to be sure that they can’t just hop on a plane, fly to California, and withdraw the same amount of money again before the other banks learn about their withdrawal. Likewise, the banks need to be sure that someone hasn’t snuck in and swapped one of the books with one that says that they have a big pile of money or that somebody else’s money is actually theirs.
This is the problem that Satoshi Nakomoto, the mysterious inventor of Bitcoin, managed to solve with blockchains. A blockchain is a record of transactions, with new transactions appearing sequentially after the old ones. To make life easier for the system, transactions that happen around the same time are grouped together in a ‘block’, and every now and then a new block full of transactions is added to the ‘chain’ — the existing record of all other groups of transactions. Blocks. Chains. Blockchain.
As we looked at before, a blockchain network is run by distributed nodes. If you wanted to run a Bitcoin node, there is theoretically nothing stopping you. When you set up the software, a copy of the entire blockchain, from the very first block, is downloaded onto your computer. You can see every single transaction that every single person has ever made with Bitcoin (although figuring out the names behind the transactions is a different thing entirely). As more people join the network, the network becomes more secure as more people have copies of the blockchain saved in different places around the world. If someone wanted to change a block from the past to, say, give them more money, they would need the permission of a majority of other nodes — and they’re unlikely to get permission to do that.