0 to Blockchain in 5 minutes
There’s a lot of discussion about blockchain at the moment, on many different platforms and from all industries. It has been hailed as a ‘quantum leap forward’, while others take a more negative view on what its impact will be; however the consensus is that its impact will be huge.
Despite all the attention that blockchain has been getting, there remains a large amount of confusion over what this ‘blockchain’ really is, and how it actually works. In this article I’ll answer each of the following questions:
- What is ‘blockchain’?
- How does blockchain actually work?
- Is blockchain the same thing as Bitcoin? (Hint: no)
- What are the different types of blockchain? How do they differ?
- Why do we care so much about blockchain?
What is ‘blockchain’?
It’s simple really: a blockchain is just a place where records are stored. For example, each record could be a monetary transaction — ‘Alice sent 3 coins to Bob’. The records are stored in such a way that they are ‘immutable’— no one can maliciously edit them without being detected.
In most computer systems nowadays, records are stored in databases. These databases have rules outlining what information can be stored in each record, and further rules that specify the personnel and programs that are authorised to view and update the data stored. Blockchain works in the exact same way: there are rules laid out as to what information can be stored in each record, and then further rules specifying how this data is to be updated.
The two main differences between a blockchain and the ‘normal’ methods of data storage are:
- How the records are structured in storage, and
- The way that updates and additions to the data occur
These differences combined are what makes the records immutable — they will be explained below.
How does blockchain actually work?
The records in a blockchain are grouped into ‘blocks’. Each of the blocks holds some number, n, of records in the database. Every time n new records have been created, they are grouped together into a single block to be added as the newest block in the chain.
The way that these blocks are then chained together is using a special method called hashing. A function takes in a block, does some crazy merkle and hashing maths that you don’t need to understand just yet, and produces an output called a hash. It can be helpful to see this hash as a short summary of the block — changing the block even a tiny bit will change the hash that is produced. The hash of each block is then stored at the beginning of the next block in the chain. This effectively chains the blocks together, and means that no one can maliciously edit block x (as the hash of block x that’s stored at the beginning of block x+1 will no longer match up).
This data structure could be used to replace an existing database, allowing only a central company to add the updates to the end of the chain. For example, a bank could use a blockchain to store records of all monetary transactions to ensure the records cannot be changed. However, it is possible (and commonplace) to implement a blockchain in a ‘decentralised’ way, removing this central authority, and allowing the updates to be controlled by a larger group of individuals — thereby removing (at least some of) the power the central organisation holds.
The decentralised use of a blockchain can work as follows:
- A large group of individuals each store a copy of the blockchain
- Each new record to be added to the chain is broadcast to the group
- Once enough new records have been created, a group member proposes a new block, B, to the group
- Each member of the group separately decides whether B should be added to their copy of the blockchain. If a record within B is considered incorrect for any reason, then B can be rejected.
- If the majority of the group accept B, then it is added to the chain. If the majority of the group reject B, it is not.
The process of each group member checking the new block tends to be automated by a computer program that checks the validity of the block. For example, if ‘Alice sends 3 coins to Bob’ is a transaction within B, but Alice doesn’t own 3 coins, then the transaction is automatically noted as invalid and B is rejected.
This ‘group’ of individuals could be the entire network of individuals who use the system in question — or could be a smaller group. The larger the group, the more decentralised the network is considered.
Is there just one blockchain?
It is a common misunderstanding that blockchain=Bitcoin. That is when someone says ‘blockchain’, many people think of Bitcoin and are unaware as to what the difference is. Bitcoin is a currency, and it uses a blockchain to store the Bitcoin transactions that occur (every ‘record’ is a transaction e.g. ‘Alice sent 3 Bitcoin to Bob’). Within this blockchain, anyone in the world can choose to be a member of the group of individuals who keep the records up to date, thereby removing the need for a centralised banking authority.
The idea of blockchain was first published in the Bitcoin paper in 2008, and all other blockchains have stemmed from this moment, meaning that while Bitcoin may be the most famous application of blockchain in the world, it is certainly not the only one.
Are there different types of blockchain? How do they differ?
- Since the first use of blockchain in 2008 in the launch of Bitcoin, blockchains have been used to track thousands of different items, on hundreds of different blockchains. These blockchains differ in many different ways, the most notable of which are:
- What’s being tracked on-chain — the ‘record’ system allows for any number of different items to be tracked on-chain. This could be real-life items such as your IKEA shipment, or digital items such as monetary transactions (Bitcoin) or execution of code (Ethereum).
- Private vs Public — who can see the blockchain? Is it available to anyone internationally? Or is it only viewable by a select group of people?
- Decentralisation — as mentioned previously, the size of the group who are authorised to update the data stored on the chain affects how decentralised the network is. This group could be one central individual/company who run and control the network, or as large as a network where anyone can take part in the decisions. Having a smaller group in control isn’t always a negative thing — it just depends on the situation in which is blockchain is being used.
- Consensus mechanism — the way in which agreement is reached within the network as to the exact order and contents of blocks being added to the chain. For example, if Alice and Bob both propose new blocks at the same time, the Consensus Mechanism of the network will outline rules to decide which block should be chosen.
Why do we care so much about blockchain?
The invention of blockchain brought something that has never before been possible to the world — a way of decentralising networks without a huge number of discrepancies or uncertainty as to what the current state of information is. This means that there is now the potential to remove the trusted and fee-collecting ‘middleman’ from a large number of everyday services such as banks, insurance firms and auction sites.
Blockchain-based systems are applicable anywhere information is recorded. However the immutability of blockchain records makes it especially powerful where that information is prone to hacks, fraud, or theft. Identity verification. Crowdfunding. Voting. Contractual agreements. These are just a few examples of industries in which companies are already developing new ways of doing business enhanced by blockchain technology.
Stay tuned for future posts that delve into some of the terms mentioned in this article and read about the projects at Token Foundry for more interesting examples of companies using blockchain.
Originally published on medium.com
Sign up now and apply for roles at companies that interest you.
Engineers who find a new job through Golang Works average a 15% increase in salary.Start with GitHubStart with TwitterStart with Stack OverflowStart with Email