Blockchain is a technology behind Bitcoin, other cryptocurrencies and decentralized applications which allows the whole network to get a copy of records of transactions, also known as ledger or block. It is a public ledger of all transactions executed. It is a decentralized consensus system based on proof-of-work(read more). Blockchain is so secured that it contains a mathematical proof(hash) that verifies it is in sequence with the previous block. Blockchain consists of blocks which is often referred to as ledger or records of transactions. In programming, blockchain is structured as back-linked list. Blocks are chained together using hash(series of alpha-numeric characters) or simply referred to as block ID.
A simple analogy for the blockchain
For example, in your high school computer lab network, you have a text file on your computer that contains coupon numbers for a meal at the nearest diner(so valuable). You want to give it to Bob. How do you give Bob an assurance that the text file you gave is the original one? How can bob make sure that you didn’t give a copy of it to anyone in the computer lab network? This type of problem is called: “double-spending”. But this problem was solved already. By using ledgers where we will keep track of the text files you give to Bob and vice versa. How about, what if you want to cheat Bob and you want to replicate the ledger itself? The solution to this is we will give the exact copy of the ledger to every computer in the computer lab network. Each computer in the computer lab network has the history of all our text file exchange transactions. All computers in the network are in sync every time, that’s why you can’t cheat it. You can’t transfer a text file that you don’t have to Bob. In every exchange you do with Bob, all the copy of ledgers in the network are updated. You could also participate on updating the ledger. With your efforts on updating the ledger, you can get an incentive of 12.5 text files(12.5 meals at the diner). Your participation is called mining.
What is a node?
A node or sometimes called a participant, could be a client(you) that operates a full-node client(desktop wallet) or a miner. A node downloads the full blockchain automatically when the client software boots up. The downloaded blockchain consists of transactions from the beginning up to the latest.
How blockchain works?
Blockchain is like a network of trust. Each network participant or nodes keeps a copy of records or ledger making it decentralized. A network participant is simply called a miner.
Each transactions are verified by network participants using a special kind of computer that will perform cryptographic techniques then grouped in a block(read about mining).
The transaction then will be added to the distributed ledger(block) order by timestamp.
In this example, let us use bitcoin for the sake of demo.
Anna’s wallet address: 38qMct1hC7NxEWAVYPGHUdBVgBXeKtkvFW
Anna sends 0.00555455 millibits to Billy with an address of 35EsGVQEyQJPCGHaLSybMkEbGVdGehZgSA
A miner came across with this transaction, verifies it and included it in this block: https://blockchain.info/block-index/1458502
Check that link so you can view what a real block looks like. You can also search those addresses to view the transaction. Check also the blockchain here: https://blockchain.info/blocks to see the series of blocks.
There are 2 types of blockchain:
- Public – is like Bitcoin network.
- Private – when used as an internal system. Like a blockchain in a government or private company that implements a token within an organization.
Blockchain is categorized into 3 versions:
- Blockchain 1.0 – this is commonly used for cash type of cryptocurrency like Bitcoin, litecoin and many more.
- Blockchain 2.0 – this is called a smart contract. It is implemented in Ethereum platform. You should also know that blockchain can also be used in circulating different types of valuable documents like assets, titles, or votes.
- Blockchain 3.0 – is used for circulating applications like also in Ethereum platform. Under blockchain 3.0, you can develop a program that will circulate to the network.
How would the network know if a transaction is really yours? How would the network make sure that a certain number of bitcoin is yours? This amazing feature of Bitcoin protocol, the consensus system works like binding agreement between nodes and miners by letting anyone know of a transaction. This occurs by keeping posted all clients(running in full node) and miners in the network. This happens like:
Miner1: Hey! I got a new transaction written on my ledger. I traced its history, seems legit. Kindly check guys!
Miner2: Yeah, I’ve verified the transaction and linked back to it’s previous transactions. It is legit. (2nd confirmation)
Miner3: Alright guys I will check then I’ll update my ledger. (3rd confirmation)
What are the other uses of blockchain?
Blockchain technology can also be used in election, assets, real estate, money distribution, ecommerce, bidding system and many more. It can also be used as a cashflow system or money distribution in a company or government institution to avoid corruption.