Skip to main content
  1. Resources/
  2. Study Materials/
  3. Information Technology Engineering/
  4. IT Semester 6/
  5. Fundamentals of Blockchain (4361603)/

Foundation of Blockchain (4361603) - Winter 2024 Solution

·
Study-Material Solutions Blockchain 4361603 2024 Winter
Milav Dabgar
Author
Milav Dabgar
Experienced lecturer in the electrical and electronic manufacturing industry. Skilled in Embedded Systems, Image Processing, Data Science, MATLAB, Python, STM32. Strong education professional with a Master’s degree in Communication Systems Engineering from L.D. College of Engineering - Ahmedabad.
Table of Contents

Question 1(a) [3 marks]
#

Short Note on: Distributed Ledger

Answer:

Table: Distributed Ledger Features

FeatureDescription
DefinitionDatabase spread across multiple computers
StorageData stored in multiple locations
ControlNo single authority owns it
UpdatesAll copies updated simultaneously
  • Decentralized: No central server needed
  • Transparent: All participants can see transactions
  • Secure: Uses cryptography for protection

Mnemonic: “Data Stored Transparently Securely” (DSTS)


Question 1(b) [4 marks]
#

Describe the applications of Blockchain.

Answer:

Table: Blockchain Applications

ApplicationUse CaseBenefit
CryptocurrencyDigital money like BitcoinSecure payments
Supply ChainTrack products from sourcePrevent fake goods
HealthcareStore medical recordsData security
VotingElectronic voting systemTransparent elections
Real EstateProperty recordsFraud prevention
  • Finance: Faster cross-border payments
  • Identity: Digital ID verification
  • Smart Contracts: Automated agreements

Mnemonic: “Money, Medicine, Voting, Property” (MMVP)


Question 1(c) [7 marks]
#

Explain Asymmetric Encryption Model with example.

Answer:

Diagram: Asymmetric Encryption Process

graph LR
    A[Sender] --> B[Public Key]
    B --> C[Encrypt Message]
    C --> D[Encrypted Data]
    D --> E[Receiver]
    E --> F[Private Key]
    F --> G[Decrypt Message]
    G --> H[Original Message]

Table: Key Comparison

Key TypePurposeSharingExample
Public KeyEncryptionShared openlyRSA Public Key
Private KeyDecryptionKept secretRSA Private Key

Example Process:

  1. Alice wants to send message to Bob
  2. Alice uses Bob’s public key to encrypt
  3. Only Bob’s private key can decrypt
  4. Bob receives and decrypts message
  • Security: Even if public key is known, data stays safe
  • Authentication: Proves sender identity
  • Non-repudiation: Sender cannot deny sending

Mnemonic: “Public Encrypts, Private Decrypts” (PEPD)


Question 1(c OR) [7 marks]
#

Explain Consistency, Availability and Partition Tolerance (CAP) theorem in Blockchain.

Answer:

Diagram: CAP Theorem Triangle

graph TB
    A[CAP Theorem]
    A --> B[Consistency]
    A --> C[Availability]
    A --> D[Partition Tolerance]
    
    B --> E["All nodes see same data"]
    C --> F["System always responds"]
    D --> G["Works despite network failures"]

Table: CAP Properties

PropertyDefinitionBlockchain Focus
ConsistencyAll nodes have same dataMedium priority
AvailabilitySystem always respondsHigh priority
Partition ToleranceWorks with network splitsHigh priority

Key Points:

  • Trade-off: Can only guarantee 2 out of 3 properties
  • Blockchain Choice: Usually prioritizes Availability + Partition Tolerance
  • Real Example: Bitcoin chooses AP over C (eventual consistency)

Mnemonic: “Choose Any Two” (CAT)


Question 2(a) [3 marks]
#

Define: Public key, Private key, Digital Signature.

Answer:

Table: Cryptographic Components

ComponentDefinitionUsage
Public KeyEncryption key shared openlyEncrypt data, verify signatures
Private KeySecret key kept by ownerDecrypt data, create signatures
Digital SignatureEncrypted hash of messageProve authenticity and integrity

Mnemonic: “Public Protects, Private Proves” (PPPP)


Question 2(b) [4 marks]
#

Explain Public blockchain with its advantage and disadvantage.

Answer:

Table: Public Blockchain Analysis

AspectDetails
DefinitionOpen network accessible to everyone
ExamplesBitcoin, Ethereum

Advantages:

  • Transparency: All transactions visible
  • Decentralization: No single control
  • Security: Many nodes validate

Disadvantages:

  • Speed: Slow transaction processing
  • Energy: High power consumption
  • Scalability: Limited transactions per second

Mnemonic: “Transparent but Slow” (TBS)


Question 2(c) [7 marks]
#

Describe Core components of Blockchain.

Answer:

Diagram: Blockchain Structure

graph TB
    A[Block N-1] --> B[Block N]
    B --> C[Block N+1]
    
    B --> D[Block Header]
    B --> E[Transaction Data]
    
    D --> F[Previous Hash]
    D --> G[Merkle Root]
    D --> H[Timestamp]
    D --> I[Nonce]

Table: Core Components

ComponentFunctionImportance
BlockContainer for transactionsData storage
HashUnique identifierSecurity
Merkle TreeTransaction summaryVerification
NonceMining numberProof of work
TimestampTime recordChronological order
Previous HashLinks to previous blockChain integrity
  • Immutability: Cannot change past records
  • Transparency: All data visible
  • Consensus: Network agrees on validity

Mnemonic: “Blocks Hash Merkle Nonce Time Previous” (BHMNTP)


Question 2(a OR) [3 marks]
#

Short Note on: SideChain

Answer:

Table: SideChain Features

FeatureDescription
DefinitionSeparate blockchain connected to main chain
PurposeExtend main blockchain functionality
ConnectionTwo-way peg mechanism
  • Scalability: Reduces main chain load
  • Flexibility: Custom features possible
  • Security: Inherits main chain security

Mnemonic: “Separate Side Scales” (SSS)


Question 2(b OR) [4 marks]
#

Explain Private blockchain with its advantage and disadvantage.

Answer:

Table: Private Blockchain Analysis

AspectDetails
DefinitionRestricted network with controlled access
ControlSingle organization manages

Advantages:

  • Speed: Faster transactions
  • Privacy: Controlled data access
  • Efficiency: Lower energy consumption
  • Compliance: Meets regulatory requirements

Disadvantages:

  • Centralization: Single point of control
  • Trust: Relies on controlling organization
  • Limited: Fewer participants

Mnemonic: “Fast Private Controlled” (FPC)


Question 2(c OR) [7 marks]
#

Explain Data structure of Blockchain.

Answer:

Diagram: Blockchain Data Structure

PMTNTTTreiorrrermnaaavkecnnnBilsesssloetaaaouaccccsRmtttkopiiiHoooo1atnnnsh123:0PMTNTTTreiorrrermnaaavkecnnnBilsesssloetaaaouaccccsRmtttkopiiiHoooo2atnnnsh123PMTNTTTreiorrrermnaaavkecnnnBilsesssloetaaaouaccccsRmtttkopiiiHoooo3atnnnsh123

Table: Data Structure Elements

ElementPurposeSize
Block HeaderContains metadataFixed size
Transaction ListActual dataVariable size
Hash PointerLinks blocks256 bits
Merkle TreeTransaction summaryLogarithmic

Key Features:

  • Linear Structure: Blocks linked in sequence
  • Hash Linking: Each block references previous
  • Merkle Trees: Efficient transaction verification
  • Immutable: Cannot modify without detection

Mnemonic: “Linear Hash Merkle Immutable” (LHMI)


Question 3(a) [3 marks]
#

Short Note on: Consensus Mechanism in Blockchain.

Answer:

Table: Consensus Mechanism

AspectDescription
PurposeAgree on network state
NeedPrevent double spending
TypesPoW, PoS, DPoS
  • Agreement: All nodes must agree
  • Decentralization: No central authority
  • Security: Prevents malicious activities

Mnemonic: “Agreement Prevents Security” (APS)


Question 3(b) [4 marks]
#

Compare Hard Fork and Soft Fork in Blockchain.

Answer:

Table: Fork Comparison

FeatureHard ForkSoft Fork
CompatibilityNot backward compatibleBackward compatible
RulesCreates new rulesTightens existing rules
UpgradeAll nodes must upgradeOptional upgrade
ResultTwo separate chainsSingle chain continues
ExampleEthereum to Ethereum ClassicBitcoin SegWit

Key Differences:

  • Hard Fork: Permanent split in blockchain
  • Soft Fork: Temporary restriction that becomes permanent

Mnemonic: “Hard Splits, Soft Restricts” (HSSR)


Question 3(c) [7 marks]
#

What is Proof of Work? How does it work? Explain with example.

Answer:

Diagram: Proof of Work Process

graph TD
    A[New Transactions] --> B[Create Block]
    B --> C[Calculate Hash]
    C --> D{Hash starts with zeros?}
    D -->|No| E[Change Nonce]
    E --> C
    D -->|Yes| F[Block Valid]
    F --> G[Add to Blockchain]
    G --> H[Miner Rewarded]

Table: PoW Components

ComponentFunctionExample
Hash FunctionCreates unique fingerprintSHA-256
NonceRandom number to change hash12345
DifficultyRequired number of leading zeros4 zeros
MiningComputing processBitcoin mining

Working Process:

  1. Collect pending transactions
  2. Create block with transactions
  3. Try different nonce values
  4. Calculate hash repeatedly
  5. Find hash with required zeros
  6. Broadcast valid block to network

Bitcoin Example:

  • Target: Hash must start with specific zeros
  • Time: ~10 minutes per block
  • Reward: 6.25 BTC (as of 2024)

Mnemonic: “Try Calculate Until Zero” (TCUZ)


Question 3(a OR) [3 marks]
#

Short Note on: Block Rewards in Blockchain.

Answer:

Table: Block Rewards

FeatureDescription
PurposeIncentivize miners
ComponentsBlock reward + transaction fees
BitcoinStarted at 50 BTC, halves every 4 years
  • Motivation: Encourages network participation
  • Halving: Reduces inflation over time
  • Fees: Additional income for miners

Mnemonic: “Miners Motivated Money” (MMM)


Question 3(b OR) [4 marks]
#

What is 51% attack and how does it work?

Answer:

Table: 51% Attack Analysis

AspectDetails
DefinitionControlling majority mining power
ThresholdMore than 50% network hash rate
CapabilityCan reverse transactions
LimitationCannot steal others’ coins

How it Works:

  1. Attacker gains majority mining power
  2. Creates private blockchain fork
  3. Mines faster than honest network
  4. Releases longer chain to network
  5. Network accepts longer chain as valid

Consequences:

  • Double Spending: Spend same coins twice
  • Transaction Reversal: Cancel confirmed transactions
  • Network Trust: Damages blockchain credibility

Mnemonic: “Majority Controls Chain” (MCC)


Question 3(c OR) [7 marks]
#

What is Proof of Stake? How does it work? Explain with example.

Answer:

Diagram: Proof of Stake Process

graph TD
    A[Validators Stake Coins] --> B[Random Selection]
    B --> C[Selected Validator]
    C --> D[Propose New Block]
    D --> E[Other Validators Vote]
    E --> F{Majority Agrees?}
    F -->|Yes| G[Block Added]
    F -->|No| H[Block Rejected]
    G --> I[Validator Rewarded]
    H --> J[Validator Penalized]

Table: PoS vs PoW

FeatureProof of StakeProof of Work
EnergyLow consumptionHigh consumption
SelectionStake-basedComputing power
HardwareRegular computerSpecialized miners
SpeedFasterSlower

Working Process:

  1. Validators lock coins as stake
  2. Algorithm selects validator randomly
  3. Selection probability based on stake size
  4. Chosen validator proposes block
  5. Other validators verify and vote
  6. Rewards distributed to honest validators

Ethereum Example:

  • Minimum Stake: 32 ETH required
  • Penalties: Slashing for malicious behavior
  • Rewards: Annual percentage yield

Key Benefits:

  • Energy Efficient: No intensive mining
  • Economic Security: Validators lose stake if dishonest
  • Scalability: Faster transaction processing

Mnemonic: “Stake Select Validate Reward” (SSVR)


Question 4(a) [3 marks]
#

Describe Byzantine Fault Tolerance.

Answer:

Table: Byzantine Fault Tolerance

AspectDescription
ProblemSome nodes may act maliciously
ToleranceSystem works despite faulty nodes
RequirementLess than 1/3 nodes can be faulty
  • Consensus: Honest nodes must agree
  • Resilience: Network survives attacks
  • Application: Used in blockchain consensus

Mnemonic: “Faulty Nodes Tolerated” (FNT)


Question 4(b) [4 marks]
#

How smart contract works in blockchain?

Answer:

Diagram: Smart Contract Execution

graph LR
    A[Contract Created] --> B[Deployed on Blockchain]
    B --> C[Conditions Met]
    C --> D[Automatic Execution]
    D --> E[Results Recorded]

Working Process:

  • Creation: Developer writes contract code
  • Deployment: Contract stored on blockchain
  • Trigger: External event activates contract
  • Execution: Code runs automatically
  • Immutable: Cannot be changed after deployment

Key Features:

  • Self-executing: No intermediary needed
  • Transparent: Code visible to all
  • Cost-effective: Reduces transaction costs

Mnemonic: “Code Executes Automatically” (CEA)


Question 4(c) [7 marks]
#

What is SHA-256 and what is the use of SHA-256 in Blockchain.

Answer:

Table: SHA-256 Properties

PropertyDescription
Full NameSecure Hash Algorithm 256-bit
OutputAlways 256 bits (64 hex characters)
InputAny size data
NatureOne-way function

Diagram: SHA-256 in Blockchain

graph TD
    A[Block Data] --> B[SHA-256 Hash]
    B --> C[Block Hash]
    C --> D[Previous Hash Reference]
    D --> E[Chain Integrity]

Uses in Blockchain:

  1. Block Hashing: Create unique block identifier
  2. Merkle Trees: Summarize all transactions
  3. Proof of Work: Mining difficulty target
  4. Digital Signatures: Secure transaction signing
  5. Wallet Addresses: Generate Bitcoin addresses

Key Properties:

  • Deterministic: Same input = same output
  • Avalanche Effect: Small change = completely different hash
  • Irreversible: Cannot find input from output
  • Collision Resistant: Two inputs rarely same output

Example:

  • Input: “Hello World”
  • SHA-256: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e

Mnemonic: “Hash Identifies Secures Proves” (HISP)


Question 4(a OR) [3 marks]
#

Explain Bitcoin and eventual consistency.

Answer:

Table: Bitcoin Consistency

ConceptDescription
Eventual ConsistencyAll nodes eventually agree
Temporary ForksMultiple valid chains exist
ResolutionLongest chain wins
  • Time Delay: Network propagation takes time
  • Confirmation: More blocks = higher certainty
  • Finality: Becomes practically irreversible

Mnemonic: “Eventually Everyone Agrees” (EEA)


Question 4(b OR) [4 marks]
#

Discuss types of smart contract in blockchain.

Answer:

Table: Smart Contract Types

TypeFunctionExample
Legal ContractLegally binding agreementsReal estate transfer
Application LogicDecentralized app functionsToken exchange
Decentralized AutonomousSelf-governing organizationsDAO voting
Multi-signatureRequire multiple approvalsEscrow services

Key Categories:

  • Financial: Payment and lending contracts
  • Insurance: Automated claim processing
  • Supply Chain: Track product authenticity
  • Gaming: In-game asset management

Mnemonic: “Legal Logic Autonomous Multi” (LLAM)


Question 4(c OR) [7 marks]
#

Define Merkle Tree and explain how it works in blockchain.

Answer:

Diagram: Merkle Tree Structure

HaTsxh(AHAa)sh(AHTRBax)sohBt(BH)ash(HTAaxBsChCD()CH)ashT(HxCaDsD)h(D)

Table: Merkle Tree Benefits

BenefitDescription
EfficiencyVerify transactions without downloading all data
SecurityAny change detected immediately
ScalabilityLogarithmic verification time
StorageCompact representation

Working Process:

  1. Hash Transactions: Each transaction gets hash
  2. Pair Hashing: Combine adjacent hashes
  3. Repeat Process: Continue until single root hash
  4. Root Storage: Store only root in block header
  5. Verification: Prove transaction with path to root

Blockchain Usage:

  • Block Header: Contains Merkle root
  • SPV Verification: Light clients verify without full blockchain
  • Tamper Detection: Any change breaks tree structure
  • Efficient Sync: Download only necessary parts

Bitcoin Example:

  • Block contains thousands of transactions
  • Only 32-byte Merkle root stored in header
  • Can verify any transaction with ~10 hashes

Mnemonic: “Tree Organizes Verifies Efficiently” (TOVE)


Question 5(a) [3 marks]
#

Short Note on: Bitcoin Scripting

Answer:

Table: Bitcoin Scripting

FeatureDescription
LanguageStack-based programming language
PurposeDefine spending conditions
ExecutionRuns when coins are spent
  • Simple: Basic operations only
  • Secure: Limited functionality prevents abuse
  • Flexible: Various transaction types possible

Mnemonic: “Stack Defines Spending” (SDS)


Question 5(b) [4 marks]
#

Explain Decentralized Applications (dApps) in Blockchain and how does it work?

Answer:

Table: dApp Components

ComponentFunction
FrontendUser interface
BackendSmart contracts on blockchain
StorageDecentralized storage systems
NetworkPeer-to-peer communication

Working Process:

  1. User interacts with web interface
  2. Frontend connects to blockchain
  3. Smart contracts execute business logic
  4. Results stored on blockchain
  5. Updates reflect across network

Key Features:

  • No Central Server: Runs on distributed network
  • Open Source: Code publicly available
  • Autonomous: Operates without company control

Mnemonic: “Decentralized Apps Run Everywhere” (DARE)


Question 5(c) [7 marks]
#

Explain Hyperledger with its advantages and disadvantages.

Answer:

Table: Hyperledger Overview

AspectDescription
TypePrivate/Consortium blockchain platform
DeveloperLinux Foundation
TargetEnterprise applications
ConsensusPluggable consensus mechanisms

Diagram: Hyperledger Architecture

graph TB
    A[Application Layer] --> B[Hyperledger Fabric]
    B --> C[Chaincode/Smart Contracts]
    B --> D[Consensus Layer]
    B --> E[Membership Services]
    D --> F[Ordering Service]
    E --> G[Certificate Authority]

Advantages:

  • Performance: High transaction throughput
  • Privacy: Confidential transactions
  • Modular: Pluggable components
  • Enterprise Ready: Production-grade features
  • Governance: Controlled network access
  • Compliance: Meets regulatory requirements

Disadvantages:

  • Centralization: Not fully decentralized
  • Complexity: Difficult to set up
  • Vendor Lock-in: Platform dependency
  • Limited Transparency: Private network
  • Cost: Expensive infrastructure

Use Cases:

  • Supply chain management
  • Trade finance
  • Healthcare records
  • Identity management

Mnemonic: “Private Performance Enterprise” (PPE)


Question 5(a OR) [3 marks]
#

Short Note on: Bitcoin Mining

Answer:

Table: Bitcoin Mining

AspectDescription
PurposeValidate transactions and create blocks
ProcessSolve cryptographic puzzles
RewardBTC + transaction fees
  • Hardware: Specialized ASIC miners
  • Energy: High electricity consumption
  • Competition: Global mining pools compete

Mnemonic: “Validate Solve Reward” (VSR)


Question 5(b OR) [4 marks]
#

Short Note on: Decentralized Autonomous Organization (DAO)

Answer:

Table: DAO Features

FeatureDescription
GovernanceCommunity-driven decisions
VotingToken-based voting rights
AutomationSmart contracts execute decisions
TransparencyAll activities on blockchain

Key Characteristics:

  • No Central Authority: Community controlled
  • Token Ownership: Voting power based on tokens
  • Proposal System: Members suggest changes
  • Automatic Execution: Approved proposals execute automatically

Examples:

  • MakerDAO (DeFi protocol)
  • Uniswap (Decentralized exchange)
  • Aragon (DAO infrastructure)

Challenges:

  • Security Risks: Smart contract vulnerabilities
  • Governance Issues: Low voter participation
  • Legal Status: Regulatory uncertainty

Mnemonic: “Community Votes Automatically” (CVA)


Question 5(c OR) [7 marks]
#

Explain ERC-20 with its advantages and disadvantages

Answer:

Table: ERC-20 Standard

AspectDescription
Full NameEthereum Request for Comments 20
TypeToken standard on Ethereum
FunctionsStandardized token operations
CompatibilityWorks with all Ethereum wallets

Diagram: ERC-20 Token Flow

graph LR
    A[Token Contract] --> B[Transfer Function]
    B --> C[Update Balances]
    C --> D[Emit Event]
    D --> E[Wallet Updates]

Required Functions:

FunctionPurpose
totalSupply()Return total token supply
balanceOf()Check account balance
transfer()Send tokens to address
approve()Allow spending on behalf
transferFrom()Transfer approved tokens
allowance()Check approved amount

Advantages:

  • Standardization: Uniform interface for all tokens
  • Interoperability: Works with any Ethereum wallet/exchange
  • Easy Integration: Simple for developers to implement
  • Liquidity: Can trade on decentralized exchanges
  • Smart Contract: Programmable money features
  • Global Access: Available worldwide 24/7

Disadvantages:

  • Gas Fees: Ethereum transaction costs
  • Scalability: Network congestion issues
  • Flexibility: Limited compared to newer standards
  • Security: Smart contract vulnerabilities
  • Complexity: Technical knowledge required
  • Regulatory: Unclear legal status

Popular ERC-20 Tokens:

  • USDT (Tether)
  • LINK (Chainlink)
  • UNI (Uniswap)

Mnemonic: “Standard Tokens Trade Everywhere” (STTE)

Related

Foundation of Blockchain (4361603) - Summer 2024 Solution
Study-Material Solutions Blockchain 4361603 2024 Summer
Mobile Computing and Networks (4351602) - Winter 2024 Solution
Study-Material Solutions Mobile-Computing 4351602 2024 Winter
OOPS & Python Programming (4351108) - Winter 2024 Solution
Study-Material Solutions Python Oops 4351108 2024 Winter
Renewable Energy & Emerging Trends in Electronics (4361106) - Winter 2024 Solution
Study-Material Solutions Renewable-Energy 4361106 2024 Winter
Software Engineering (4353202) - Winter 2024 Solution
19 mins
Study-Material Solutions Software-Engineering 4353202 2024 Winter
Essentials of Digital Marketing (4341601) - Winter 2024 Solution
Study-Material Solutions Digital-Marketing 4341601 2024 Winter