Episode 1 - Blockchain
Blockchain — A system that allows two or more mutually unknown parties to reach an agreement without middlemen. The agreement could be on the state of any kind of data: Fintech — accounts and balances (like in Bitcoin); Supply chain — the temperature of a shipping container at a point in time. Fintech Example — Buyer, seller, bank. The buyer wants to transfer money to the seller. Bank transaction. The bank is the middleman here. Single point of control and failure. If the bank is hacked, the outcome of the transaction could be manipulated.
Blockchain solves this problem. There is no single point of control and failure in a blockchain. Data once written to blockchain could not be changed — immutability. Multiple nodes store and verify all the data. Even if some of the nodes are hacked or not working, they cannot change or control the state of data if a majority of nodes are working properly.
How blockchains work?
State changes are done using transactions. Transactions are signed by users to associate and record identity. Blocks are groups of transactions. Nodes produce blocks using various algorithms and if a block is accepted by all the nodes, then it is appended to the chain — hence blockchain. All transactions in the newly accepted block are executed to update the state of the blockchain. And the process continues.
Database layer: To store the data.
Networking layer: To get the nodes connected with each other for exchange and broadcast of data.
Consensus protocol: To reach an agreement on the state of data.
Transaction queue: To accept, validate, and process transactions received from users.
Business logic: Rules on how the transactions update the state of data.