M.
Sc (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
BLOCKCHAIN TECHNOLOGY
Module 1 — Introduction and Working of Blockchain
[Link] (Information Technology) | Year II / Semester IV
SVKM's UPG College of Arts, Science & Commerce | 2024-25
Duration: 15 Lectures · Exam Weightage: ~25%
Topics Covered in This Module:
• Section A — Blockchain: Introduction, History, Centralised vs Decentralised Systems,
Layers of Blockchain, Importance, Uses and Use Cases
• Section B — Working of Blockchain: Blockchain Foundation, Cryptography, Game Theory,
Computer Science Engineering, Properties of Blockchain Solutions, Blockchain
Transactions, Distributed Consensus Mechanisms, Blockchain Mechanisms, Scaling
Blockchain
Page 1 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
SECTION A
Blockchain — Introduction & Fundamentals
1. Introduction to Blockchain
Blockchain is a distributed, decentralised, immutable digital ledger that records transactions across
many computers in such a way that no single record can be altered retroactively without altering all
subsequent blocks and the consensus of the network.
Think of it as a Google Spreadsheet that is shared across thousands of computers worldwide —
but unlike Google Sheets, no one owns it, no one can secretly edit a past entry, and everyone can
independently verify every record.
Formal Definition
📌 Blockchain: A continuously growing list of records (blocks) that are linked and secured using
cryptographic hash functions, forming a tamper-evident chain.
📌 Block: A data structure containing: a set of transactions, a timestamp, a reference (hash) to the
previous block, and a nonce (for PoW).
📌 Chain: The sequential linkage of blocks via cryptographic hashes — changing any block breaks
all subsequent links.
📌 Distributed Ledger: A database that is shared, replicated, and synchronised across multiple
sites, institutions, or geographies.
Core Pillars of Blockchain
• Decentralisation — No single authority controls the network; all nodes have equal standing.
• Immutability — Once data is recorded in a block and buried under subsequent blocks, it
cannot be practically altered.
• Transparency — All participants can verify transactions (in public blockchains).
Pseudonymous but auditable.
• Security — Cryptographic hashing and consensus mechanisms make the chain tamper-
resistant.
• Trustlessness — Participants don't need to trust each other; the protocol enforces
correctness.
💡 EXAM TIP: In exams, always give all 5 pillars when asked 'what is blockchain' — each pillar
carries 1 mark.
2. History of Blockchain
Blockchain did not emerge suddenly — it is the culmination of decades of cryptography, distributed
systems, and digital currency research.
Pre-Bitcoin Era (1980s–2008)
• 1976 — Diffie-Hellman key exchange: First public-key cryptography, enabling secure
communication without shared secrets.
• 1979 — Ralph Merkle patents Merkle Trees — the data structure used to efficiently
summarise and verify transactions in a block.
Page 2 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• 1991 — Stuart Haber & W. Scott Stornetta propose a cryptographically secured chain of
blocks for time-stamping digital documents — the first conceptual blockchain.
• 1992 — Bayer, Haber, Stornetta incorporate Merkle Trees into the design, allowing multiple
documents to be certified in one block.
• 1997 — Adam Back invents Hashcash — a Proof of Work system to combat email spam.
The same idea later forms Bitcoin's mining.
• 1998 — Wei Dai proposes b-money — an anonymous, distributed electronic cash system.
Never implemented but influenced Bitcoin.
• 2005 — Nick Szabo proposes Bit Gold — a digital collectible using PoW chains. Never
implemented; very similar conceptually to Bitcoin.
Bitcoin Era (2008–2015)
• October 2008 — Satoshi Nakamoto publishes 'Bitcoin: A Peer-to-Peer Electronic Cash
System' under a pseudonym. Combines Hashcash PoW + Merkle Trees + P2P network +
UTXO model into the first working blockchain.
• January 3, 2009 — Genesis Block (Block 0) mined. Coinbase text: 'The Times 03/Jan/2009
Chancellor on brink of second bailout for banks' — a political statement embedded forever.
• January 12, 2009 — First Bitcoin transaction: Satoshi sends 10 BTC to Hal Finney.
• May 22, 2010 — First commercial Bitcoin transaction: Laszlo Hanyecz pays 10,000 BTC for
2 pizzas (~$41 at the time). Now ~$600M — celebrated as 'Bitcoin Pizza Day'.
• 2013 — Vitalik Buterin proposes Ethereum: blockchain + smart contracts. Blockchain as a
programmable platform, not just a currency.
Blockchain 2.0 and Beyond (2015–present)
• 2015 — Ethereum mainnet launches. Smart contracts enable DeFi, NFTs, DAOs —
'programmable blockchain'.
• 2015 — Linux Foundation launches Hyperledger for enterprise-grade permissioned
blockchains.
• 2017 — ICO (Initial Coin Offering) boom. Thousands of tokens launched on Ethereum. Also
Bitcoin Cash hard fork over block size debate.
• 2020 — DeFi (Decentralised Finance) explosion: Uniswap, Aave, Compound — $10B+
locked in smart contracts.
• 2021 — NFT boom: CryptoPunks, Bored Apes. $69M Beeple NFT sale at Christie's.
• 2022 — Ethereum Merge: transition from PoW to PoS, reducing energy use by 99.95%.
• 2023-present — Layer 2 scaling (rollups), RWA (Real World Assets) tokenisation, CBDC
pilots by 130+ countries.
💡 EXAM TIP: History is often asked as '5 marks — trace the evolution of blockchain'. Cover
pre-Bitcoin cryptography, Bitcoin 2009, Ethereum 2015, and modern era.
3. Centralised vs Decentralised Systems
Understanding this contrast is fundamental — it explains WHY blockchain was created and what
problem it solves.
Centralised Systems
A centralised system has a single controlling entity (server, authority, organisation) that manages
all data and operations. All participants connect to and trust this central point.
• Examples: Gmail (Google's servers), online banking (bank's database), Facebook (Meta's
data centres), PayPal (PayPal Inc.'s ledger).
Page 3 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• How trust works: Users trust the central authority to be honest, secure, and available.
• Single Point of Failure: If the central server goes down, the entire system is unavailable.
• Single Point of Control: The central authority can censor, modify, or delete data.
Decentralised Systems
In a decentralised system, control is distributed across many nodes. No single entity has overriding
authority. Consensus rules determine what is valid.
• Examples: Bitcoin, Ethereum, BitTorrent (file sharing), IPFS (storage).
• How trust works: Participants trust the mathematical protocol and consensus rules — not
any individual or company.
• Resilience: No single point of failure — the network continues as long as any nodes are
online.
• Censorship resistance: No single entity can block a transaction or alter history.
Centralised System Decentralised System (Blockchain)
Single authority controls data No single authority — consensus governs
Fast (milliseconds per query) Slower (seconds to minutes for finality)
Data can be modified/deleted Immutable — practically cannot be changed
Single point of failure No single point of failure
Privacy — data hidden from public Transparency — all can verify (public chains)
Low cost to operate Higher operational overhead
Requires trust in the operator Trustless — protocol enforces correctness
Examples: Banks, Google, PayPal Examples: Bitcoin, Ethereum, Hyperledger
Distributed vs Decentralised — Important Distinction
These terms are often confused. A distributed system spreads data/computation across multiple
nodes for efficiency or fault tolerance — but may still have central control. A decentralised system
additionally removes central authority.
• Distributed but Centralised: Google's data centres (many servers, but all owned and
controlled by Google).
• Distributed AND Decentralised: Bitcoin network (thousands of independent nodes
worldwide, no central owner).
💡 EXAM TIP: Exam question: 'Difference between centralised and decentralised' — use the 8-
row table above. Always mention trust, immutability, fault tolerance, and examples.
4. Layers of Blockchain
Blockchain architecture is organised into layers, each handling a specific function — similar to the
TCP/IP model in networking. Understanding layers helps explain how different components
interact.
Layer 0 — Network/Infrastructure Layer
• The physical and internet infrastructure underlying the blockchain.
Page 4 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• Handles: peer discovery (how nodes find each other), message propagation (gossip
protocol — nodes relay messages to neighbours), and data transmission.
• Protocol: In Bitcoin/Ethereum, nodes use a TCP-based P2P protocol. Ethereum uses
libp2p. Messages include block announcements, transaction broadcasts, peer exchange.
• Key concept: Gossip protocol — when a node receives a new transaction, it forwards it to
all its peers, who forward to their peers, until the entire network knows within seconds.
Layer 1 — Data & Consensus Layer (Base Chain)
• The core blockchain: block structure, transaction format, cryptographic hashing (SHA-256,
Keccak-256), Merkle Trees.
• Consensus mechanism lives here: PoW, PoS, PBFT — determines how nodes agree on
which chain is canonical.
• Examples: Bitcoin blockchain, Ethereum mainnet, Hyperledger Fabric.
• Layer 1 defines the security and finality guarantees of the entire system.
Layer 2 — Scaling / Extension Layer
• Off-chain protocols built on top of Layer 1 to increase throughput without changing the base
chain.
• They inherit Layer 1's security by periodically anchoring state to the base chain.
• Examples: Bitcoin Lightning Network (payment channels, millions of TPS off-chain),
Ethereum Optimistic Rollups (Arbitrum, Optimism — 2,000-4,000 TPS), ZK-Rollups
(zkSync, StarkNet — 10,000+ TPS).
• Why needed: Bitcoin does 7 TPS on-chain. Visa does 24,000 TPS. Layer 2 bridges this
gap.
Layer 3 — Application Layer
• Smart contracts and DApps running on the blockchain.
• Defines business logic: token standards (ERC-20, ERC-721), DeFi protocols, NFT
platforms, DAOs.
• Examples: Uniswap (DEX), Aave (lending), OpenSea (NFT marketplace), Chainlink
(oracle).
Layer 4 — User Interface Layer
• Frontend applications that users interact with: wallets, web/mobile apps.
• Communicates with the blockchain via [Link] / [Link] JavaScript libraries and JSON-
RPC APIs (e.g., MetaMask injects [Link]).
• Examples: MetaMask, Coinbase Wallet, Uniswap web interface, Ledger hardware wallet.
💡 EXAM TIP: Layers are often asked as a 5-mark question. Name all 5 layers, give the
function of each, and one example per layer.
5. Importance of Blockchain
Blockchain addresses fundamental limitations of existing digital systems across multiple industries.
Its importance stems from five transformative properties:
1. Eliminating Intermediaries
• Traditional finance requires banks, clearing houses, notaries, and brokers to facilitate trust
between strangers.
Page 5 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• Each intermediary adds cost (fees), time (settlement delays), and risk (single point of
failure).
• Blockchain replaces trusted intermediaries with trusted code (smart contracts) — removing
the cost layer entirely.
• Impact: International wire transfer via SWIFT takes 2-5 days and costs $25-50.
Bitcoin/Stellar can do it in minutes for cents.
2. Immutable Audit Trail
• Every transaction is timestamped and permanently recorded — creating an unalterable
audit trail.
• Critical for: financial auditing, supply chain provenance, medical record integrity, legal
document certification.
• Example: Walmart uses blockchain to trace food from farm to shelf. In a contamination
event, it traced spinach origin in 2.2 seconds vs 7 days with paper records.
3. Financial Inclusion
• 1.4 billion adults globally are 'unbanked' — no access to banking services.
• Blockchain enables anyone with a smartphone to participate in financial services:
send/receive money, borrow, earn yield — without a bank account.
• DeFi protocols like Aave allow lending/borrowing using only a crypto wallet — no credit
check, no KYC, no geography restriction.
4. Tokenisation of Assets
• Any real-world asset (real estate, art, gold, company shares) can be represented as a
digital token on a blockchain.
• Enables fractional ownership: buy 0.001% of a $10M painting for $100.
• Increases liquidity for traditionally illiquid assets (real estate, private equity).
5. Programmable Money (Smart Contracts)
• Money that executes automatically when conditions are met — no human intervention
needed.
• Example: An insurance smart contract that automatically pays crop insurance when a
satellite weather oracle reports rainfall below threshold — no claim form, no adjuster,
instant payout.
• Eliminates fraud risk in insurance, escrow, and contract execution.
6. Blockchain Uses and Use Cases
Cryptocurrency & Payments
• Bitcoin (BTC): Store of value, peer-to-peer payment system. 7 TPS. $1 trillion+ market cap.
• Ethereum (ETH): Programmable blockchain. Gas fees paid in ETH. Powers DeFi, NFTs,
DAOs.
• Stablecoins (USDC, DAI): Price-stable tokens pegged to USD — used for payments and
DeFi without volatility risk.
• Ripple (XRP): Cross-border bank settlement. Partnered with 300+ financial institutions.
Supply Chain Management
• IBM Food Trust (Hyperledger Fabric): Walmart, Nestlé, Dole use it to trace food origin,
handling, and safety.
Page 6 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• Maersk TradeLens: Tracks shipping containers across 94 ports. Reduces paperwork from
200+ documents to digital smart contracts.
• De Beers Tracr: Tracks diamonds from mine to retailer, certifying they are conflict-free.
Healthcare
• Medical record management: Patient data shared securely across hospitals with full audit
trail.
• Drug supply chain: Verifying drug authenticity, preventing counterfeit medicines.
• Clinical trials: Immutable recording of trial data prevents result manipulation.
• MedRec (MIT): Blockchain-based electronic health record system for patient-controlled
data sharing.
Finance & DeFi
• DeFi (Decentralised Finance): $50B+ in Total Value Locked (TVL). Protocols: Uniswap
(DEX), Aave (lending), Compound, MakerDAO (DAI stablecoin).
• Trade finance: Letter of credit processing reduced from 7-10 days to hours (Contour
network).
• Securities settlement: DTCC exploring blockchain to reduce T+2 settlement to T+0 (same
day).
Digital Identity
• Self-Sovereign Identity (SSI): Users own and control their digital identity — share specific
credentials without revealing full identity.
• Civic, uPort, Hyperledger Indy: Blockchain-based identity platforms.
• Use case: Proving you are over 18 to a bar without showing your full ID (age credential
only).
Voting Systems
• Immutable vote records prevent manipulation. Every vote cryptographically signed by
voter's key.
• West Virginia (2018) and Utah (2019): Used Voatz blockchain voting app for overseas
military voters.
• Challenges: Voter privacy (blockchain is transparent), identity verification, coercion
resistance.
NFTs and Digital Ownership
• NFTs (Non-Fungible Tokens): Unique digital tokens proving ownership of digital or physical
assets.
• Use cases: Digital art (Beeple's $69M sale), gaming items (Axie Infinity), music royalties
([Link]), real estate deeds.
• ERC-721 standard defines NFT interface on Ethereum.
Industry Use Case Example Platform
Finance Cross-border payments Ripple, Stellar
Supply Chain Product traceability IBM Food Trust
Healthcare Medical records MedRec, Patientory
Government Land registry Georgia, Honduras
Energy Peer-to-peer trading Power Ledger
Education Certificate verification MIT Digital Diplomas
Page 7 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
Industry Use Case Example Platform
Insurance Automated claims Etherisc
Gaming Digital asset ownership Axie Infinity, Decentraland
Page 8 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
SECTION B
Working of Blockchain
7. Blockchain Foundation
The foundation of blockchain rests on three core technical pillars working together: cryptographic
hashing, the block-and-chain data structure, and peer-to-peer networking.
7.1 Cryptographic Hash Functions
A hash function takes an input of any size and produces a fixed-size output (digest) such that: the
same input always produces the same output; tiny input changes completely change the output
(avalanche effect); and it is computationally infeasible to reverse (pre-image resistance).
📌 SHA-256: Secure Hash Algorithm 256-bit — used in Bitcoin. Produces a 64-character
hexadecimal string regardless of input size.
📌 Keccak-256: Ethereum's hash function. Used for address generation and state root
computation.
• Example: SHA256('Hello') =
'185f8db32921bd46d35cde48e5e36e6a2a487d9fac1e977dea29c6e81c5a6bc4'
• SHA256('hello') =
'2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824' —
completely different for lowercase!
4 Properties of Cryptographic Hash Functions:
• Deterministic: Same input → always same output.
• Avalanche Effect: Tiny change in input → completely different hash. Makes tampering
detectable.
• Pre-image Resistance: Cannot compute input from output (one-way function).
• Collision Resistance: Computationally infeasible to find two different inputs producing the
same hash.
7.2 Block Structure
Each block has two parts: a Header and a Body.
Block Header (80 bytes in Bitcoin):
• Version: Protocol version number.
• Previous Block Hash: SHA256(SHA256(previous header)) — the chain link. This is what
makes it a 'chain'.
• Merkle Root: Hash summarising all transactions in this block. Any transaction change alters
the root.
• Timestamp: Unix time of block creation.
• Bits/Target: Current mining difficulty encoded compactly.
• Nonce: 32-bit counter miners increment to find a valid hash.
Block Body:
• Transaction count (varint).
• Coinbase transaction (first): Creates new cryptocurrency, no inputs. Miner's reward.
• All other transactions included by the miner from the mempool.
7.3 The Chain Linkage — Tamper Proofing
The 'chain' property comes from each block storing the hash of the previous block's header. This
creates a cryptographic dependency:
Page 9 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• If Block 5's data is changed → Block 5's hash changes → Block 6's stored 'previous hash'
no longer matches → Block 6 is invalid → all subsequent blocks are invalid.
• An attacker must recompute PoW for Block 5 AND every block after it, faster than the
honest network adds new blocks — practically impossible for Bitcoin (>600 EH/s hashrate).
• The deeper a block is buried (more confirmations), the harder it is to alter — exponential
security growth.
7.4 Merkle Trees — Efficient Transaction Verification
📌 Merkle Tree: A binary hash tree where each leaf is the hash of a transaction, and each parent
is the hash of its two children, up to a single Merkle Root.
• Construction: Hash each transaction → pair and hash consecutive pairs → repeat until one
root remains.
• Merkle Root in Block Header: Summarises ALL transactions in 32 bytes.
• Merkle Proof (SPV): To verify transaction Tx5 exists: need only O(log N) hashes — not all
N transactions. Enables lightweight mobile wallets.
• Tamper Detection: Any change to any transaction cascades up to change the Merkle Root
→ invalid block.
💡 EXAM TIP: Merkle Tree is very commonly examined. Remember: log2(N) proof size, Merkle
Root in header, used in SPV wallets.
8. Cryptography in Blockchain
Blockchain relies on two types of cryptography: symmetric (single key, used for data encryption)
and asymmetric (public-private key pair, used for identity and signatures). The primary
cryptographic tools are:
8.1 Asymmetric (Public-Key) Cryptography
• Every blockchain user has a key pair: Private Key (secret, ~256-bit random number) and
Public Key (derived from private key, shareable).
• Bitcoin and Ethereum use ECDSA (Elliptic Curve Digital Signature Algorithm) on the
secp256k1 curve.
• Public key derivation: Q = d × G, where d = private key, G = generator point on the curve.
This is a one-way function — cannot compute d from Q (Elliptic Curve Discrete Log
Problem).
• Bitcoin address = RIPEMD160(SHA256(public_key)) — 20-byte hash, encoded as
Base58Check.
• Ethereum address = last 20 bytes of Keccak256(public_key).
8.2 Digital Signatures — Transaction Authentication
A digital signature proves that a transaction was authorised by the private key holder, without
revealing the private key.
• Signing: Signature (r, s) = ECDSA_Sign(private_key, SHA256(transaction_data))
• Verification: Any node can verify using: public_key + signature + transaction_data →
valid/invalid.
• Properties: Authentication (only key holder can sign), Non-repudiation (cannot deny
signing), Integrity (any change to transaction invalidates signature).
8.3 Public Key Infrastructure in Bitcoin
• Wallet = software that manages private keys (not the coins themselves).
Page 10 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• HD Wallets (BIP-32): One master seed generates a tree of key pairs — easier backup (only
12/24 seed words).
• Multisig (M-of-N): M signatures from N different private keys required to spend — used for
security and corporate wallets.
8.4 Zero-Knowledge Proofs (Advanced)
📌 Zero-Knowledge Proof (ZKP): A cryptographic method allowing one party (prover) to prove to
another (verifier) that a statement is true, without revealing any information beyond the truth of the
statement.
• zk-SNARKs (Succinct Non-interactive ARguments of Knowledge): Used in Zcash (private
transactions) and ZK-Rollups (Ethereum scaling).
• zk-STARKs: Scalable, transparent ZKPs. Used in StarkWare, Polygon zkEVM.
• Use case: Prove you are over 18 without revealing your birthdate. Prove a transaction is
valid without revealing sender, receiver, or amount.
💡 EXAM TIP: Digital signatures are very exam-friendly: explain ECDSA, what private/public
key do, signing + verification process.
9. Game Theory in Blockchain
Game theory studies strategic decision-making between rational agents. Blockchain consensus
mechanisms are carefully engineered games where following the rules is the most profitable
strategy for all participants.
9.1 Nash Equilibrium in Blockchain
📌 Nash Equilibrium: A stable state where no participant can benefit by unilaterally changing their
strategy, given the strategies of all other participants.
• In Bitcoin PoW: Miners' dominant strategy is to mine honestly. A miner who tries to cheat
(mine invalid blocks) wastes electricity with no reward — all other nodes reject invalid
blocks.
• If all miners mine honestly, no single miner benefits from switching to dishonest mining →
Nash Equilibrium at honest behavior.
9.2 Incentive Compatibility
• Blockchain protocols are designed to be incentive-compatible: the rules reward honest
participation and punish dishonest behavior.
• Block Reward: Miner who successfully mines a block receives newly created
cryptocurrency + transaction fees. This creates a financial incentive to do honest work.
• Transaction Fees: Users compete to get their transaction included — higher fee = priority.
Miners maximise fees.
• Slashing (PoS): Validators who misbehave (e.g., double-sign blocks) lose a portion of their
staked collateral. Dishonesty is financially punished.
9.3 The Prisoner's Dilemma & 51% Attack
• A 51% attacker faces a prisoner's dilemma: attack and double-spend vs mine honestly and
earn rewards.
• Attacking requires >50% hashrate (billions of dollars of hardware + electricity). If
successful, the attack destroys network trust → price crashes → attacker's own holdings
lose value.
• Rational analysis: The expected profit from honest mining typically exceeds the expected
profit from attacking (especially for large networks like Bitcoin).
Page 11 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• This is why Bitcoin has never been successfully 51%-attacked despite being 15+ years old.
9.4 Selfish Mining — A Game Theory Attack
📌 Selfish Mining: A strategy where a miner withholds a newly found block, continues mining
secretly, then releases blocks strategically to waste honest miners' effort and gain a
disproportionate share of rewards.
• Theoretical attack: With >33% hashrate, selfish mining can be profitable. In practice, it
requires precise execution and risks discovery.
• Countermeasures: Ethereum's GHOST protocol penalises withheld blocks. Bitcoin's 10-
minute block time reduces selfish mining incentive.
💡 EXAM TIP: Game theory question: Explain Nash equilibrium + incentive compatibility +
why 51% attack is irrational for Bitcoin. This combination scores full marks.
10. Computer Science Engineering Foundations
Blockchain is built on established Computer Science fundamentals. Understanding these
foundations explains how blockchain achieves its properties.
10.1 Distributed Systems Concepts
• CAP Theorem: A distributed system can guarantee at most 2 of 3: Consistency (all nodes
see the same data), Availability (every request gets a response), Partition Tolerance
(system works despite network splits). Bitcoin sacrifices Consistency for Availability +
Partition Tolerance (eventually consistent).
• Eventual Consistency: Nodes may temporarily disagree on the latest state, but will
converge to the same state given enough time — Bitcoin achieves this via longest-chain
rule.
• Byzantine Fault Tolerance (BFT): The ability to function correctly even when some nodes
behave arbitrarily maliciously. PoW is a probabilistic BFT solution. PBFT is a deterministic
BFT solution.
📌 Byzantine General's Problem: A distributed system problem: N generals must agree on a
battle plan but some may be traitors. Solution requires n ≥ 3f+1 where f = number of traitors.
10.2 P2P (Peer-to-Peer) Networking
• All blockchain nodes communicate via P2P networks — no central server.
• Structured P2P (Kademlia DHT): Used by Ethereum for peer discovery. Nodes organised
by XOR distance.
• Unstructured P2P (gossip/flooding): Used by Bitcoin. When a node discovers a new
transaction/block, it sends to all connected peers.
• Node types in Bitcoin: Full Nodes (download entire blockchain, validate everything), SPV
Nodes (download only block headers), Mining Nodes (compete to produce blocks), Archive
Nodes (store complete historical state).
10.3 Data Structures
• Merkle Patricia Trie (Ethereum): Modified radix trie storing key-value pairs. Used to store
world state (all account balances and storage). Root hash represents entire state.
• UTXO Set (Bitcoin): Unspent Transaction Outputs — the set of all unspent coins. Bitcoin
nodes maintain this set for efficient validation.
• Mempool: Memory pool of unconfirmed transactions waiting to be mined. Miners select
from mempool (typically highest fee/byte first).
Page 12 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
10.4 Consensus Algorithm Classification
Category Examples
Proof of Work (PoW) Bitcoin, Litecoin, Dogecoin
Proof of Stake (PoS) Ethereum (post-Merge), Cardano, Solana
Delegated PoS (DPoS) EOS (21 elected BPs), TRON
Byzantine Fault Tolerant (BFT) Hyperledger Fabric (PBFT), Tendermint
Proof of Authority (PoA) Private chains, Clique (Ethereum testnets)
Proof of History (PoH) Solana (timestamps before consensus)
11. Properties of Blockchain Solutions
A well-designed blockchain solution exhibits the following core properties. These are frequently
tested in exams.
1. Decentralisation
• No single authority owns or controls the network.
• Decision-making power is distributed among all participants.
• Measured by: number of active nodes, geographic distribution, mining/stake concentration.
2. Immutability
• Once data is confirmed in a block, it cannot be altered without redoing all subsequent proof-
of-work.
• Technically: Changing Block N requires recomputing PoW for Block N, N+1, N+2... faster
than the honest network adds new blocks.
• Practical immutability: With 6+ confirmations (Bitcoin), the cost to reverse exceeds any
potential gain.
3. Transparency
• Public blockchains: All transactions visible to anyone. Pseudonymous (addresses, not
names) but auditable.
• Private/consortium chains: Selective transparency — members see shared data; non-
members cannot.
• Smart contract code is public on Etherscan — users can verify what code they are
interacting with.
4. Security
• Cryptographic signing: Transactions cannot be forged without the private key.
• PoW security: Attacking Bitcoin requires >50% of ~600 EH/s hashrate — requires millions
of ASIC miners.
• Network security: No single point of attack — thousands of geographically distributed
nodes.
5. Trustlessness
• Participants do not need to know or trust each other. The protocol enforces correctness.
Page 13 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• 'Don't trust — verify': Anyone can download the blockchain and independently verify every
transaction since genesis.
• Smart contracts are trustless — code executes exactly as written, no counterparty risk.
6. Anonymity / Pseudonymity
• Bitcoin: Pseudonymous — addresses are not directly linked to real identities, but all
transactions are public.
• Monero/Zcash: True anonymity via ring signatures / zk-SNARKs — sender, receiver,
amount are hidden.
• Ethereum: Pseudonymous on-chain; off-chain KYC at centralised exchanges de-
anonymises users.
7. Consensus-Driven
• All changes to the blockchain state require network-wide consensus — no unilateral
authority.
• Fork governance: Protocol changes require miner/validator majority + community
agreement.
12. Blockchain Transactions
Bitcoin UTXO Transaction Model
📌 UTXO: Unspent Transaction Output — the fundamental unit of value in Bitcoin. Every UTXO is
an unspent 'coin' locked to an address.
• Transactions consume (spend) existing UTXOs as inputs and create new UTXOs as
outputs.
• A UTXO must be spent entirely — cannot partially spend. Change is returned as a new
UTXO to the sender's change address.
• Transaction fee = total inputs - total outputs (implicit, goes to miner).
Transaction Structure:
• Version: Transaction format version.
• Inputs: List of UTXOs being spent. Each input references: txid (previous transaction) + vout
(output index) + scriptSig (unlocking script with signature + public key).
• Outputs: List of new UTXOs created. Each output has: value (in satoshis) + scriptPubKey
(locking script specifying who can spend it).
• Locktime: Earliest time/block the transaction can be mined (0 = no lock).
Transaction Lifecycle
• 1. Construction: Wallet selects UTXOs to spend, builds transaction, computes fee.
• 2. Signing: Private key signs the transaction hash (ECDSA). Signature placed in scriptSig.
• 3. Broadcasting: Signed transaction sent to connected nodes via P2P network.
• 4. Mempool: Nodes validate and store in mempool. Propagated to entire network via
gossip.
• 5. Mining: Miner includes transaction in a block. Mines the block (finds valid nonce).
• 6. Confirmation: Block added to chain → 1 confirmation. Each subsequent block = +1
confirmation.
• 7. Finality: 6 confirmations for Bitcoin (~60 min) considered highly secure.
Page 14 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
Ethereum Account-Based Transaction Model
Unlike Bitcoin's UTXO model, Ethereum uses an account-based model — similar to a bank
account. State is maintained as account balances rather than UTXOs.
• Account types: EOA (Externally Owned Account — controlled by private key) and Contract
Account (controlled by code).
• Transaction fields: from, to, value (ETH to send), data (calldata for smart contracts), nonce,
gasLimit, maxFeePerGas, v/r/s (signature).
• Nonce: Sequential counter per account — prevents replay attacks.
• Gas: Unit of computation cost. gasLimit = max gas to use. Actual fee = gasUsed ×
effectiveGasPrice.
Bitcoin UTXO Model Ethereum Account Model
Tracks unspent outputs Tracks account balances directly
No concept of 'account' Accounts with balance, nonce, code
Transaction graph is explicit State is implicit (world state trie)
Better privacy (change addresses) Easier to build applications on
Complex smart contracts harder Native smart contract support
UTXO set ~ 5GB (2024) State trie grows with contract use
💡 EXAM TIP: Transaction lifecycle is often asked as a process-flow question. Remember all 7
steps: construct → sign → broadcast → mempool → mine → confirm → finality.
13. Distributed Consensus Mechanisms
A consensus mechanism is a set of rules that allows all nodes in a distributed network to agree on
the valid state of the ledger, even in the presence of faulty or malicious nodes.
13.1 Proof of Work (PoW)
Nodes (miners) compete to solve a computationally intensive puzzle. The winner proposes the
next block and earns a reward.
• The Puzzle: Find a nonce such that SHA256(SHA256(block_header + nonce)) < Target.
• Target: A 256-bit number. Smaller target = harder puzzle = more leading zeros required.
• Difficulty Adjustment: Bitcoin adjusts every 2016 blocks (~2 weeks) to maintain ~10-minute
block time. If blocks arrived faster → increase difficulty; slower → decrease.
• Security: Attacking requires >50% of total hashrate. Bitcoin's hashrate (~600 EH/s) makes
this cost billions of dollars.
• Energy Consumption: Major criticism. Bitcoin uses ~100-150 TWh/year.
• Used by: Bitcoin, Litecoin, Dogecoin, Ethereum Classic.
13.2 Proof of Stake (PoS)
Validators are chosen to propose/attest blocks based on their staked cryptocurrency — no
computational race.
• Validators stake (lock) cryptocurrency as collateral. Ethereum: minimum 32 ETH per
validator.
Page 15 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
• Validator selection: Pseudo-random, weighted by stake size. Larger stake = higher chance
of selection.
• Slashing: Validators who misbehave (double-sign, equivocate) lose a portion of their stake
— severe financial penalty.
• Energy: ~99.95% less energy than PoW — validators don't need powerful hardware.
• Ethereum PoS: 2 phases. Proposer suggests block. ~128 validators randomly selected as
Committee attest (vote). Block finalised after 2 epochs (~12.8 min).
• Used by: Ethereum (post-2022 Merge), Cardano, Polkadot, Solana, Avalanche.
13.3 Byzantine Fault Tolerant (BFT) Consensus
Designed for known validator sets where some may be Byzantine (arbitrarily malicious). Provides
deterministic (instant) finality.
📌 PBFT (Practical Byzantine Fault Tolerance): A 3-phase protocol (pre-prepare, prepare,
commit) achieving consensus when < 1/3 of validators are Byzantine. O(N²) message complexity.
• Phase 1 — Pre-prepare: Leader broadcasts proposed block to all validators.
• Phase 2 — Prepare: Each validator broadcasts its acknowledgement. When 2f+1 prepares
received, validator moves to commit.
• Phase 3 — Commit: Each validator broadcasts commit. When 2f+1 commits received,
block is finalised.
• Finality: Instant and deterministic — once committed, a block cannot be reversed. No
probabilistic waiting.
• Limitation: O(N²) messages — doesn't scale beyond ~100 validators. Used in permissioned
chains.
• Used by: Hyperledger Fabric (PBFT variant), Tendermint/Cosmos, IOTA.
13.4 Delegated Proof of Stake (DPoS)
• Token holders vote for a small set of 'delegates' (block producers) — e.g., 21 in EOS, 27 in
TRON.
• Elected delegates take turns producing blocks in round-robin fashion.
• Very high throughput (1,000-4,000 TPS) but more centralised than PoW/PoS.
• Controversy: 21 block producers controlling a multi-billion dollar network is arguably
centralised.
13.5 Proof of Authority (PoA)
• Validators are pre-approved, real-world identities (not anonymous). They stake their
reputation.
• Used in: Private/enterprise blockchains, Ethereum testnets (Goerli used Clique PoA).
• Very fast and efficient — no resource expenditure. Not suitable for public, permissionless
chains.
Mechanism Throughput Finalit y
PoW (Bitcoin) ~7 TPS Probabilistic (~60 min)
PoS (Ethereum) ~15-30 TPS ~12.8 min (2 epochs)
DPoS (EOS) ~4,000 TPS ~0.5 seconds
PBFT (Fabric) ~3,500 TPS Instant (deterministic)
PoA ~1,000+ TPS Instant
Page 16 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
💡 EXAM TIP: Consensus mechanisms = guaranteed 5-10 mark question. For each: explain
the mechanism, energy, finality, security, and 2 examples.
14. Blockchain Mechanisms
14.1 Mining Mechanism (PoW)
• Miners assemble pending transactions from their mempool into a candidate block.
• Set the coinbase transaction (block reward to their address) as the first transaction.
• Compute Merkle Root of all transactions. Build block header.
• Begin iterating nonce from 0 to 2^32. For each nonce: compute block header hash. If hash
< target: block found! Broadcast immediately.
• If nonce space exhausted (2^32 attempts): change extra nonce in coinbase transaction
(changes Merkle Root, resets nonce space).
• Reward: 3.125 BTC (post-April 2024 halving) + transaction fees.
• Mining pools: Miners combine hashrate. Share rewards proportionally. Solo mining
probability too low for individuals.
14.2 Validation Mechanism
• When a node receives a new block, it independently validates: previous hash matches,
PoW solution is valid (hash < target), all transactions are valid (signatures, no double-
spends), Merkle Root matches transactions, timestamp is within acceptable range.
• If valid: add to local blockchain, forward to peers.
• If invalid: reject silently, do not forward.
• This decentralised validation is why no trusted third party is needed — every node is a
validator.
14.3 Fork Handling Mechanism
📌 Fork: A divergence in the blockchain where two or more valid competing chains exist
simultaneously.
Accidental Fork: Two miners find valid blocks simultaneously. Each half of the network extends a
different chain. Resolved when the next block is found — the chain that gets extended becomes
the winner; the other block is orphaned.
Soft Fork: Backward-compatible protocol change. Old nodes still accept new blocks as valid (new
rules are a subset of old rules). Example: Bitcoin SegWit (2017).
Hard Fork: Non-backward-compatible change. Old nodes reject new blocks. Chain permanently
splits into two. Example: Ethereum Classic split (2016 DAO hack). Example: Bitcoin Cash (2017
block size dispute).
• Longest Chain Rule: Nodes always extend the chain with the most accumulated Proof of
Work. This resolves accidental forks automatically.
• Replay Attack: After a hard fork, transactions valid on one chain may be valid on the other.
Mitigation: replay protection (different chain IDs).
Page 17 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
15. Scaling Blockchain
The Blockchain Scalability Trilemma (Vitalik Buterin) states that a blockchain can achieve at most
2 of 3 properties simultaneously: Security, Decentralisation, and Scalability. Most scaling solutions
sacrifice some decentralisation to gain throughput.
The Trilemma Explained
• Bitcoin: Maximum security + decentralisation, minimal scalability (7 TPS).
• EOS: Maximum scalability + reasonable security, minimal decentralisation (21 block
producers).
• Rollups: Attempt all 3 by moving computation off-chain while inheriting L1 security.
15.1 Layer 1 Scaling Solutions
Block Size Increase: Larger blocks = more transactions per block. Bitcoin Cash (BCH) increased
from 1MB to 32MB. Drawback: larger blocks are slower to propagate and harder for nodes to store
— pushes out small nodes, increasing centralisation.
Block Time Reduction: Litecoin uses 2.5-minute blocks (vs Bitcoin's 10). More frequent blocks =
higher TPS. Risk: higher uncle/orphan rate (less time for propagation).
Sharding: Split the blockchain into parallel 'shards', each processing its own subset of
transactions. Ethereum's Danksharding (in progress): 64 shards, each ~100,000 TPS — combined
~6.4M TPS theoretically. Challenge: cross-shard communication and security.
SegWit (Segregated Witness): Bitcoin upgrade that removes signatures (witness data) from
transaction data, increasing effective block capacity from 1MB to ~4MB equivalent without
technically changing the block size limit.
15.2 Layer 2 Scaling Solutions
Payment Channels / Lightning Network (Bitcoin):
• Two parties lock funds in a multi-sig contract on-chain (opening channel).
• Conduct unlimited off-chain transactions — just exchanging signed IOUs.
• Only final balances are settled on-chain (closing channel).
• Enables millions of micro-transactions (coffee purchases, streaming sats) at negligible cost.
• Limitation: Both parties must be online; requires locking up capital.
Optimistic Rollups (Arbitrum, Optimism):
• Transactions processed off-chain by a sequencer. Compressed transaction data posted to
Ethereum.
• 'Optimistic': Assume transactions are valid. Fraud proofs submitted by watchers if invalid.
• 7-day challenge period before withdrawal (for fraud proof submission).
• Throughput: 2,000-4,000 TPS. Security inherited from Ethereum.
ZK-Rollups (zkSync, StarkNet, Polygon zkEVM):
• Transactions processed off-chain. A cryptographic validity proof (zk-SNARK/STARK)
proves all transactions were correctly executed.
• Proof posted on-chain — Ethereum verifies the proof (not each transaction individually).
• Immediate finality: No fraud proof window. Withdrawals available quickly.
• Throughput: 10,000-100,000 TPS. Technically more secure than Optimistic Rollups.
• Challenge: Generating ZK proofs is computationally intensive (minutes on powerful
hardware).
State Channels: Generalised payment channels for any smart contract interaction, not just
payments (e.g., game state updates).
Plasma: Child chains anchored to Ethereum mainchain. Periodic state commitments. Largely
superseded by rollups.
Page 18 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
15.3 Layer 3 — Application-Specific Scaling
• Application-specific chains optimised for one use case (Dydx perpetuals exchange,
Immutable X NFT platform).
• Cross-chain interoperability (Polkadot, Cosmos): Multiple specialist blockchains
communicating via a relay chain / IBC protocol — total throughput = sum of all chains.
Scaling Solution Throughput Key Trade-off
Bitcoin (base) ~7 TPS Benchmark
Ethereum (base) ~15-30 TPS Benchmark
Lightning Network (L2) Millions TPS Capital locking, online req.
Optimistic Rollup (L2) 2,000-4,000 TPS 7-day withdrawal delay
ZK-Rollup (L2) 10,000-100,000 TPS Proof generation cost
Sharding (L1) ~100,000 TPS/shard Cross-shard complexity
💡 EXAM TIP: Scaling is a 5-10 mark question. Cover trilemma, L1 solutions (sharding,
SegWit), L2 solutions (Lightning, Optimistic Rollups, ZK-Rollups) with their trade-offs.
MODULE 1 — QUICK REVISION SUMMARY
Key Definitions to Know:
• Blockchain = distributed, decentralised, immutable digital ledger secured by cryptographic
hashing.
• Block = header (prev_hash, merkle_root, nonce, timestamp, target) + body (transactions).
• Merkle Tree = binary hash tree summarising transactions. Root in header. SPV proofs need
O(log N) hashes.
• UTXO = Unspent Transaction Output. Bitcoin's accounting model.
• Consensus = mechanism for all nodes to agree. PoW, PoS, PBFT, DPoS.
• Gas = Ethereum's unit of computation cost. Prevents infinite loops. Fee = gasUsed ×
gasPrice.
• Fork = chain divergence. Soft (backward-compatible), Hard (chain splits), Accidental
(natural).
• Trilemma = Security + Decentralisation + Scalability: can achieve max 2 at L1.
Topic Likely Exam Question Type
Introduction & History 5 marks — trace evolution of blockchain
Centralised vs Decentralised 5 marks — comparison table (8 points)
Layers of Blockchain 5 marks — name & explain all 5 layers
Cryptography (hashing, ECDSA) 5 marks — hash properties + digital
signatures
Game Theory 5 marks — Nash equilibrium + incentive
compatibility
Page 19 | SVKM's UPG College | Exam Notes 2024-25
[Link] (IT) Sem IV | Blockchain Technology | Module 1: Introduction & Working of Blockchain
Topic Likely Exam Question Type
Transaction lifecycle 5 marks — 7 steps from construct to finality
Consensus Mechanisms 10 marks — explain PoW + PoS + BFT with
comparison
Scaling Solutions 5-10 marks — trilemma + L1/L2 solutions
— END OF MODULE 1 NOTES —
15 Lectures covered · 9 Major Topics · All Exam Topics Included
Page 20 | SVKM's UPG College | Exam Notes 2024-25