Blockchain Fundamentals:
Architecture, Block Structure,
and Merkle Trees
Dr. Ishan Bhardwaj
What is Blockchain
• A decentralized, distributed, and immutable ledger.
• A chain of blocks, each containing transactions.
• Secure and transparent record-keeping system.
• Enables trust and reduces the need for intermediaries.
Decentralized and Distributed
• Nodes (computers) connected in a network.
• Each node holds a copy of the blockchain.
• No single point of control.
• Resilience against censorship and single points of failure.
Consensus Mechanisms
• How nodes agree on the state of the blockchain.
• Examples: Proof-of-Work (PoW), Proof-of-Stake (PoS).
• PoW: Miners compete to solve complex cryptographic puzzles.
• PoS: Validators are chosen based on the amount of cryptocurrency they
hold.
Block Structure
Block Header
•Previous Block Hash: Cryptographic hash of
the previous block.
•Timestamp: Time the block was created.
•Nonce: A number used in PoW to find the
correct hash.
•Merkle Root: Root hash of all transactions in
the block.
• The previous block hash links blocks together chronologically, forming the
chain.
• The timestamp records when the block was created.
• The nonce is crucial for Proof-of-Work.
• The Merkle root efficiently summarizes all transactions within the block.
Block Body : Transactions
• List of all transactions included in the block.
• Transactions represent the transfer of value or information.
• Each transaction includes:Sender's address.
• Receiver's address.Amount of cryptocurrency (or other data).
• Digital signature for authentication.
Merkle Trees
•A tree-like data structure used to efficiently summarize a large
number of transactions.
•Each leaf node represents a transaction hash.
•Parent nodes are hashes of their children.
•The root node is the Merkle root.
Advantages of Merkle Trees
• Data Integrity: Any change in a transaction will change the Merkle
root.
• Efficient Verification: Allows for quick verification of transaction
inclusion without downloading the entire block.
• Space Efficiency: Reduces the amount of data needed to be stored
and transmitted.
Key Technologies
• Cryptography
• Hashing Algorithms: One-way functions that generate a unique, fixed-size
"fingerprint" of data (e.g., SHA-256). Crucial for data integrity and creating
block hashes.
• Digital Signatures: Used to authenticate transactions and ensure non-
repudiation. Based on asymmetric cryptography (public and private keys).
(e.g., ECDSA).
• Distributed Systems
Building the Network: Distributed Systems
• Peer-to-Peer (P2P) Networks: Decentralized network architecture where nodes
directly communicate with each other. No central server.
• Distributed Consensus: Mechanisms for nodes to agree on the state of the
blockchain (e.g., Proof-of-Work, Proof-of-Stake).
• Byzantine Fault Tolerance: The ability of the system to function even with some
malicious or faulty nodes.