Foundation of Blockchain
This page is aligned to the GTU COGC-2021 syllabus for Course Code 4361603. It follows the official unit order, outcomes, and practical outcomes so you can study, revise, and prepare for assessments with full syllabus coverage.
| Unit | Title | Teaching Hours | Theory Marks |
|---|---|---|---|
| 1 | Introduction to Blockchain and Distributed Ledgers | 8 | 14 |
| 2 | Structure of Blockchain | 10 | 16 |
| 3 | Essentials of Blockchain | 8 | 14 |
| 4 | Conceptualization of Blockchain as Cryptocurrency | 10 | 18 |
| 5 | Decentralization using Blockchain | 6 | 8 |
Where to prioritize
Unit 4 has the highest weightage. Unit 2 is the next heaviest. Use this to plan revision cycles and mock tests.
What You Must Be Able To Do
CO1
Understand concepts of cryptography, blockchain, and distributed ledger.
CO2
Categorize blockchain structure and types.
CO3
Examine consensus mechanisms and attack types in blockchain.
CO4
Apply cryptography and blockchain concepts to cryptocurrency.
CO5
Understand decentralization using blockchain.
Lab Path and Micro-Projects
Practical Outcome 1: Cryptography Foundations
Implement and test Diffie-Hellman key exchange, RSA key generation and encryption/decryption, and SHA-1 hashing. Focus on inputs, outputs, and security properties.
Practical Outcome 2: Blockchain Core Implementation
Build a Merkle tree, define a block structure, implement a basic blockchain, and simulate mining with adjustable difficulty. Extend this by creating an ERC20-style token model.
Practical Outcome 3: Case Study
Prepare a comparative case study on any two blockchain implementations (e.g., Bitcoin vs Hyperledger, or Ethereum vs Corda). Highlight consensus, identity model, privacy, and performance.
1.1 Blockchain and Distributed Ledger
Blockchain is a distributed ledger where transactions are grouped into blocks that are chained using cryptographic hashes. Each participant keeps a replicated copy, which provides transparency and tamper evidence.
Distributed Ledger vs Centralized Ledger
Centralized ledgers have a single owner and failure point. Distributed ledgers share authority across nodes and rely on consensus to update state.
Why Blockchain?
It offers auditability, tamper resistance, and shared truth without a single controlling entity.
1.2 Applications, Limits, and Challenges
Applications
Finance and payments, supply chain provenance, healthcare records, digital identity, and asset tokenization.
Limits
Lower throughput than centralized systems, higher latency, and storage growth.
Challenges
Scalability, privacy, regulation, and governance. Choosing the right blockchain type is critical.
Answer structure
For 4-6 mark questions, state the use case, then list benefits and limitations with brief examples.
1.3 Cryptography Basics for Blockchain
Key Concepts
Public and private keys enable asymmetric encryption, hashing ensures data integrity, and digital signatures provide authenticity and non-repudiation.
| Primitive | Purpose | Blockchain Usage |
|---|---|---|
| Asymmetric Encryption | Confidentiality and key exchange | Address creation, key ownership |
| Hashing | Integrity and tamper evidence | Block linking, Merkle tree |
| Digital Signature | Authentication and non-repudiation | Transaction signing and verification |
| Elliptic Curve Cryptography | Smaller keys with strong security | Compact public keys (e.g., Bitcoin) |
Diffie-Hellman: Establishes a shared secret over an insecure channel. Focus on modular exponentiation and key exchange flow.
RSA: Based on large prime factorization. Know key generation steps, public/private key roles, and encryption/decryption.
SHA-1: Hash function producing 160-bit output. It is part of syllabus for implementation practice, though modern systems prefer SHA-256 or stronger.
1.4 Consistency, Availability, Partition Tolerance
CAP states that in the presence of network partition, a distributed system must choose between consistency and availability. Public blockchains typically prioritize availability and partition tolerance, accepting eventual consistency.
Consistency
All nodes see the same data at the same time. Strong consistency reduces forks but increases latency.
Availability
Every request receives a response, even if it might not be the latest state.
Partition Tolerance
System continues despite network splits. Critical for global blockchain networks.
2.1 Types of Blockchain
| Dimension | Type | Characteristics |
|---|---|---|
| Access | Public | Open participation, transparent ledger, slower consensus |
| Access | Private | Controlled participation, faster consensus, enterprise use |
| Permission | Permissioned | Identities are known, policies enforced, higher throughput |
| Permission | Permissionless | Anyone can validate, strong decentralization, higher cost |
| Asset | Tokenized | Native tokens used for incentives and transaction fees |
| Asset | Tokenless | No native token, often used for enterprise workflows |
2.2 Sidechains
Sidechains are separate blockchains that are interoperable with a main chain. Assets can be moved between chains using a peg mechanism, enabling experimentation or scalability without changing the main chain.
Where sidechains help
Faster transaction processing, privacy-preserving workflows, and prototyping new features without risk to the main network.
2.3 Core Components of Blockchain
Nodes
Participants that store ledger copies, validate transactions, and broadcast updates.
Transactions
State changes signed by users that are verified before being added to blocks.
Blocks
Containers for transactions, linked with hashes to preserve order and integrity.
Consensus
Rules that allow nodes to agree on the latest valid block and ledger state.
2.4 Distributed Identity
Identity in blockchain is based on public/private key pairs. The public key (or derived address) identifies the user, while the private key authorizes actions.
Digital Identification
Uses cryptographic proofs to verify ownership and permissions without central authorities.
Wallets
Software or hardware for storing keys and signing transactions. Not a bank account, but key management.
2.5 Decentralized Network and Ledger
In a decentralized network, multiple nodes store the ledger and validate updates. No single node has exclusive control, improving resilience and trust.
- Multiple independent validators
- Open or fair participation rules
- Transparent, shared state
- Consensus-driven updates
2.6 Data Structure of a Blockchain
| Block Field | Purpose |
|---|---|
| Previous Hash | Links to the parent block for immutability |
| Merkle Root | Compact summary of all transactions |
| Timestamp | Ordering of blocks |
| Nonce | Variable for PoW mining |
| Difficulty/Target | Controls mining rate |
3.1 Consensus Mechanisms
Proof of Work (PoW)
Miners solve computational puzzles to earn the right to append blocks, providing Sybil resistance.
Proof of Stake (PoS)
Validators lock stake and are chosen to propose blocks based on stake and randomness.
BFT-style Consensus
Used in permissioned chains. Provides fast finality but requires known participants.
3.2 Confirmation and Finality
Finality describes when a transaction is considered irreversible. PoW blockchains have probabilistic finality, while many PoS and BFT systems offer deterministic finality.
Limits of PoW
High energy use and slower finality. Alternative consensus models aim to improve speed and efficiency.
3.3 Block Rewards, Miners, Difficulty
Block rewards incentivize miners to secure the network. Difficulty adjusts based on network power to keep block intervals stable.
| Concept | Explanation |
|---|---|
| Block Reward | Newly minted coins plus transaction fees |
| Difficulty | Target threshold controlling puzzle hardness |
| Competition | More miners increases total hash rate and difficulty |
3.4 Forks and Consensus Chain
Soft Fork
Backward-compatible changes; old nodes still accept new blocks.
Hard Fork
Not backward-compatible; results in chain split if nodes do not upgrade.
Longest Chain Rule
Nodes follow the chain with the most cumulative work or stake.
3.5 Sybil and 51% Attacks
Sybil attacks create many fake identities to influence consensus. A 51% attack occurs when a single entity controls the majority of consensus power, enabling double-spending or censorship.
Attack response
Always mention the defense: economic cost in PoW/PoS and identity-based control in permissioned chains.
4.1 Bitcoin and Merkle Tree
Bitcoin uses Merkle trees to efficiently summarize and verify transactions. A Merkle root is stored in each block header and allows inclusion proofs with minimal data.
- Hash each transaction to create leaf nodes.
- Pair hashes and hash again to form the next level.
- Repeat until a single root hash remains.
4.2 Bitcoin, Eventual Consistency, BFT
Bitcoin provides eventual consistency. BFT concepts explain how distributed systems tolerate faulty nodes while still reaching agreement.
Eventual Consistency
Nodes may temporarily disagree, but converge as more blocks are added.
Byzantine Fault Tolerance
System can still function correctly even when some nodes behave maliciously.
4.3 Secure Hashing, Blocksize, Mining
Secure hashing links blocks and prevents tampering. Blocksize impacts throughput and decentralization. Mining is the competitive process of finding a valid block hash.
| Area | Impact |
|---|---|
| Hashing | Integrity and immutability |
| Blocksize | Throughput vs decentralization tradeoff |
| Mining | Secures network and issues new coins |
4.4 PoW and Bitcoin Script
PoW uses computational puzzles to secure the ledger. Bitcoin Script is a simple, stack-based language for specifying spending conditions.
- Not Turing complete; avoids infinite loops.
- Uses opcodes like OP_CHECKSIG for signature validation.
- Typical script pattern: pay-to-public-key-hash.
4.5 Collaborative Implementations
| Platform | Focus | Key Feature |
|---|---|---|
| Hyperledger Fabric | Enterprise permissioned blockchain | Pluggable consensus and private channels |
| Corda | Financial workflows | Point-to-point data sharing |
| ERC20 | Token standard on Ethereum | Interoperable fungible token contracts |
5.1 Full Decentralization and Smart Contracts
Smart contracts are programs deployed on the blockchain that execute automatically when conditions are met. They eliminate intermediaries and enable transparent automation.
Key points for answers
Define smart contract, list features (automation, immutability, transparency), and give a simple use case.
5.2 Decentralized Autonomous Organization (DAO)
DAOs are organizations governed by smart contracts and community voting. Rules are encoded in code and decisions are executed transparently.
5.3 Decentralized Applications (DApps)
DApps are applications that use blockchain for data, logic, or identity. Typically composed of a front end, smart contracts, and decentralized storage or backend services.
Core Properties
Open source, decentralized data storage, cryptographic token use, and consensus-driven updates.
Examples
Decentralized exchanges, NFT marketplaces, and blockchain voting systems.