As we have previously discussed, Blockchain operates on multiple nodes, with each node interconnected in a decentralized network. We need to understand the Blockchain Architecture to make Blockchain apps.
Blockchain Network Topologies:
Cryptography in Blockchain:
Digital Signatures:
Consensus mechanisms are protocols used to validate and agree on the contents of a blockchain ledger. They ensure that all nodes are synchronized and have the same data.
Proof of Work (PoW):
Proof of Stake (PoS):
Smart Contracts:
Decentralized Applications (DApps):
A blockchain transaction starts when someone initiates it, and the information is encrypted and sent to a network of computers (nodes) to verify it. Once verified, the transaction joins a group of other approved transactions to form a new block.
The network then agrees on which block to add, and the selected node, or “miner,” earns a reward. The block is then linked to the previous one, forming a secure chain. Once added, the transaction is complete, and the details are permanently stored for anyone to view.
Initiating a Transaction: A new transaction is created and enters the blockchain network. The details are encrypted using public and private keys for security.
Verification of Transaction: The transaction is sent to multiple peer-to-peer computers (nodes) worldwide. These nodes check if the transaction is valid, like confirming if there’s enough balance.
Formation of a New Block: Verified transactions are collected in a "mempool" by each node. These mempools then group together to form a new block.
Consensus Algorithm: Nodes use a consensus mechanism to decide which block to add next, ensuring everyone agrees on the latest valid block. The node that successfully adds a block (a “miner”) receives a reward.
Addition of the New Block to the Blockchain: Once the block gets a unique hash value, it is added to the blockchain. Each block links to the previous one through its hash, creating a secure chain.
Transaction Complete: After the block is added, the transaction is finished. The record is stored permanently, and anyone can look it up to confirm.