0% found this document useful (0 votes)
66 views

Block Chain Notes

Notes for blockchain for semester 8th BE engineering

Uploaded by

patole.yash56
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

Block Chain Notes

Notes for blockchain for semester 8th BE engineering

Uploaded by

patole.yash56
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

BlockChain Notes

Chapter 1 : Introduction to DLT and Blockchain

Q1. Explain blockchain CAP theorem. (5) Dec 2023


1. CAP Theorem stands for Consistency, Availability, and Partition Tolerance.
2. According to the theory, a distributed system cannot always ensure consistency, availability, and partition
tolerance.
3. When things go wrong, we must prioritize at most two distributed system features and trade-offs between
them.

 CA: CA database provides availability and consistency among all the nodes. However, it cannot
accomplish this if there is a partition between any two system nodes, hence it is unable to provide fault
tolerance. For eg: Postgres, MySQL.
 AP: AP database means that the system continues to operate even in the presence of node failures. AP-
based systems compromise consistency and availability. Examples: MongoDB, Cassandra.
 CP: CP database means that the system continues to operate even though network failures are occurring in
the database. CP systems are strongly consistent but they are not properly available. Exaples: MongoDB,
HBase.

Q2. What is Distributed Ledger Technologies (DLTs)? Differentiate DLT and Blockchain Technology.
(10) Dec 2023
1. Distributed Ledger Technology (DLT) is centered around an encoded and distributed database where
records regarding transactions are stored.
2. A distributed ledger is a database that is spread across various computers, nodes, institutions, or countries
accessible by multiple people around the globe.
3. Types of Distributed Ledger Technology
Permissioned DLT: Nodes have to take permission from a central authority to access or make any changes
in the network. Mostly these types of permissions include identity verification.
Permissionless DLT: There is no central authority to validate transactions, rather existing nodes are
collectively responsible for validating the transactions. Various consensus mechanisms are used to validate
transactions based on predefined algorithms. In the case of bitcoin proof of work consensus mechanism is
used.
Hybrid DLT: It is combined with both permissionless and permissioned DLTs and can benefit from both of
them.
Q3. Key features of blockchain (5) May2023
1. Immutable: Immutability means that the blockchain is a permanent and unalterable network. Blockchain
technology functions through a collection of nodes. Once a transaction is recorded on the blockchain, it
cannot be modified or deleted.
2. Distributed: All network participants have a copy of the ledger for complete transparency. A public ledger
will provide complete information about all the participants on the network and transactions.
3. Decentralized: Blockchain technology is a decentralized system, which means that there is no central
authority controlling the network. Instead, the network is made up of a large number of nodes that work
together to verify and validate transactions.
4. Secure: All the records in the blockchain are individually encrypted. Using encryption adds another layer
of security to the entire process on the blockchain network.
5. Consensus: Consensus is a decision-making algorithm for the group of nodes active on the network to
reach an agreement quickly and faster and for the smooth functioning of the system.
6. Unanimous: All the network participants agree to the validity of the records before they can be added to
the network.

Q4. Merkle Tree


1. A hash tree is also known as Merkle Tree. It is a tree in which each leaf node is labeled with the hash
value of a data block and each non-leaf node is labeled with the hash value of its child nodes labels. A
Merkle tree is a binary tree formed by hash pointers
2. A blockchain can potentially have thousands of blocks with thousands of transactions in each block.
Therefore, memory space and computing power are two main challenges.
3. It would be optimal to use as little data as possible for verifying transactions, which can reduce CPU
processing and provide better security, and this is exactly what Merkle trees offer
4. In a Merkle tree, transactions are grouped into pairs. The hash is computed for each pair and this is
stored in the parent node. Now the parent nodes are grouped into pairs and their hash is stored one level
up in the tree.

Q5. What is a block header? How are blocks linked in blockchain? (5) May2023
1. A block header is used to identify specific blocks within a blockchain network.
2. Each block has unique heather to aid with the monitoring of protocol changes.
3. The blocks are put in a vertical sequence, starting with the “genesis block.”
4. Each header has three layers of block data as well as Merkle root, Bitcoin version number, previous
block hash, nonce used by miners, and the timestamp of the block.
How are blocks linked in blockchain:
 Blocks in a blockchain are linked through a process called hashing.
 Each block contains a unique identifier known as a hash, which is generated by applying a
cryptographic algorithm to the data within the block.
 This hash serves as the digital fingerprint of the block and is used to ensure its integrity.
 To link blocks together, each block also includes the hash of the previous block in its data.
Chapter 2 : Bitcoin

Q1. Explain and differentiate Blockchain Forks. (5) (10) Dec 2023
1. In simple terms, Forks in blockchain means copying the code and modifying it to create a new software
or product.
2. In open-source projects Forks are very common and used widely.
3. Open source with the help of fork can make user interface more interactive and look good, helping in
gaining more users worldwide.
Types of Blockchain Forks:
1. CODEBASE FORK: In codebase blockchain fork you can copy the entire code of a particular
software. Many of these ALT COINS which are now running on the blockchain are been made in these
way only by using the codebase fork i.e. they have made little up and down changes in the code of
BITCOIN and created their whole new ALT COIN.
2. LIVE BLOCKCHAIN FORK: Live Blockchain fork means a running blockchain is been divided
further into two parts or two ways. It has two types Accidental Fork and Intentional Fork.
3. ACCIDENTAL FORK: When multiple miners mine a new block at nearly the same time, the entire
network may not agree on the choice of the new block.
4. INTENTIONAL FORK: In intentional fork the rules of the blockchain are been changed, knowing the
code of the software and by modifying it intentionally. It has two types: Hard Fork and Soft Fork.
5. SOFT FORK: When the blockchain protocol is altered in a backwards-compatible way.
6. HARD FORK: When the blockchain protocol is altered in a non backwards-compatible way.

Q2. Explain ECC algorithm in detail. (5) Dec 2023


1. Elliptic Curve Cryptography (ECC) is a form of public-key cryptography, that leverages the algebraic
structure of elliptic curves over finite fields.
2. This means it uses mathematical equations based on curved graphs to secure data.
3. The strength of ECC lies in the difficulty of solving these equations, making it a robust choice for
digital security
4. A Bitcoin wallet uses ECC to generate a pair of keys: a private key, which is a randomly generated
number, and a public key, derived from this private key using elliptic curve multiplication.
5. The public key is your wallet address, shareable without compromising security.
6. The ECDSA relies on elliptic curve cryptography to generate key pairs- one private key and one
public key.

Q3. Discuss block validates in the Bitcoin with POW consensus algorithm. (10) Dec 2023
1. Proof of Work consensus is the mechanism of choice for the majority of cryptocurrencies currently in
circulation.
2. The algorithm is used to verify the transaction and create a new block in the blockchain.
3. Bitcoin uses the Hashcash Proof of Work system as the mining basis.
How is block validated:

 The PoW consensus algorithm involves verifying a transaction through the mining process.
 This section focuses on discussing the mining process and resource consumption during the mining
process.
 The Proof of Work (POW) consensus algorithm involves solving a computationally challenging puzzle
in order to create new blocks in the Bitcoin blockchain.
 The process is known as ‘mining’, and the nodes in the network that engages in mining are known as
‘miners’.
 The reward for mining transactions lies in economic payoffs, where competing miners are rewarded
with 6.25 bitcoins and a small transaction fee.
 This reward will get reduced by half its current value with time.
Q4. Discuss Bitcoin Mining steps to validate the block. What is difficulty level and how does it calculate
in terms of bitcoin. (10) Dec 2023
1. Bitcoin mining is a computation-intensive process that uses complicated computer code to generate a secure
cryptographic system.
2. The bitcoin miner is the person who solves mathematical puzzles(also called proof of work) to validate the
transaction.
Steps:
1. Transaction Verification: Miners collect and verify new transactions broadcasted to the network. They
ensure that each transaction is valid, adheres to Bitcoin's rules, and has sufficient fees attached.
2. Creating the Block: Miners group verified transactions into a block and add a header containing metadata
such as a timestamp and a reference to the previous block's hash.
3. Finding the Nonce: Miners attempt to find a nonce (a random number) that, when combined with the block's
data, produces a hash value that meets the target criteria set by the network. This process is known as proof
of work.
4. Proof of Work: Miners repeatedly hash the block's data with different nonces until they find a hash value
that meets the target difficulty level. This requires significant computational power and energy expenditure.
5. Block Addition: Once a miner discovers a valid nonce, they broadcast the new block to the network. Other
miners then verify the block's validity and add it to their copy of the blockchain.
Difficulty Level and how it’s calculated:
Mining difficulty is how much work it takes to generate a number less than the target hash.
Mining difficulty changes every 2,016 blocks or approximately every two weeks. The next difficulty level
depends on how efficient miners were in the preceding cycle and how many miners are participating.

Q5. Wallet Technologies in Bitcoin (5) Dec 2023


Q6. Transaction Pools (5) Dec 2023
1. Transaction pool is used by bitcoin nodes to track transaction that have been shared with the network.
2. A transaction pool is a data structure that stores a set of transactions that have been validated and not yet
mined.
3. In Bitcoin, transactions are received, verified, and added to the transaction pool awaiting confirmation the
relayed to neighboring nodes for propagation across the entire blockchain.
4. While the transaction and orphan pools house unconfirmed transactions, UTXO pools contain confirmed
outputs.
5. Transaction pools can serve two different purposes leading to two different types of transaction pools, the
mempool or the non-final pool.
 Mempool: This is a set of validated transactions known to the miner.
 Non-final pool: This pool tracks transactions that may need further revisions from the involved parties.

Q7. Explain Simplified Payment Verification Nodes. What is the Privacy solution for SPV nodes? (5)
May2023
1. Simple Payment Verification (SPV) is a method that allows a lightweight client to check if a
transaction is on the Bitcoin blockchain without having to download the entire blockchain.
2. These nodes simply keep track of a subset of the blockchain and use the SPV system to validate
transaction.
3. The SPV just downloads the block headers for each block as opposed to downloading all the blocks
like the full nodes do.
4. An SPV node will establish a connection between the transaction it needs to verify and the block in
which they are contained.
Privacy Solution for SPV:
1. Bloom Filters: To determine if an element is a part of set, the Bloom Filter is a probabilistic data
structure that uses little storage space.
2. Bloom filters are used to preserve the privacy of lightweight nodes.
3. It is a memory efficient randomized data structure to represent a set in order to support associate
queries.
4. Bloom filters offer a trade-off between (elements size in the network and bandwidth) and privacy
metrics in untrusted environments.

Q8. Explain bitcoin mining with the help of a neat diagram. (10) May2023
1. Bitcoin mining is a computation-intensive process that uses complicated computer code to generate a
secure cryptographic system.
2. The bitcoin miner is the person who solves mathematical puzzles(also called proof of work) to validate
the transaction.
3. Miner verifies the transactions(after solving the puzzle) and then adds the block to the blockchain when
confirmed.
Working:
1. The nodes of the blockchain network are based on the concept that no one in the network can be trusted.
Proof of work is accepted by nodes to validate any transaction.
2. Proof of work involves doing hefty calculations to find a 32-bit hash value called nonce to solve the
mathematical puzzle.
3. The miners create new blocks by abiding by the fact that the transaction volume must be less than 21
million.
4. 21 million is the total number of bitcoins that can be generated.
5. The verified transaction gets a unique
identification code and is linked with
the previous verified transaction.
Q9. What is a Blockchain fork? Differentiate between soft fork and hard fork. (10) May2023
1. In simple terms, Forks in blockchain means copying the code and modifying it to create a new
software or product.
2. In open-source projects Forks are very common and used widely.
3. Open source with the help of fork can make user interface more interactive and look good, helping in
gaining more users worldwide.

Q10. UTXO in Bitcoin (5) May2023


1. UTXO stands for Unspent Transaction Output.
2. It is the amount of digital currency someone has left remaining after executing a transaction.
3. When a transaction is completed, the unspent output is deposited back into the database as input which
can be used later for another transaction.
4. UTXOs are created through the consumption of existing UTXOs.
5. Every Bitcoin transaction is composed of inputs and outputs.
6. Inputs consume an existing UTXO, while outputs create a new UTXO.
7. The UTXO model does not incorporate wallets at the protocol level.
8. It is based on individual transactions that are grouped in blocks.

Q11. Short note on BIP – 38.


1. BIP38 is a BIP that describes a method for encrypting private keys using a password.
2. BIP38-encrypted keys are used to provide an added layer of security for Bitcoin wallets, as the private
keys are protected by a password.
3. If theft or loss occurs, the encrypted private key cannot be used without the passphrase, which provides
users with a secure backup solution.
4. BIP38 provides users with a secure backup solution by encrypting private keys with a passphrase.
5. Because BIP 38 also makes it more challenging to crack your password because it is employing brute-
force attacks.
6. There are two ways you can use BIP38
 To use a password to encrypt an existing private key
 To allow someone else to generate a private key on your behalf while preventing them from using your
bitcoins.
Q12. Explain Proof of Work ( POW ) and Proof of Stake ( POS ).
Proof of Work:
1. Proof of Work (PoW) is a protocol designed to form digital transactions secure without having to believe
a 3rd party.
2. This work builds on previous puzzle solutions. PoW is a way of verifying current and past transactions.
3. The work that goes into solving puzzle generates rewards for whoever solves it called it as mining.
4. this is often an algorithm that’s designed to verify transactions and obtain new blocks added to
blockchain.
5. With Proof of Work, miners are competing to be primary to finish a complex mathematical puzzle which
will generate this new block in blockchain.
Proof of Stake:
1. Proof-of-stake is a consensus algorithm that decides on who validate next block, according to how
many coins you hold.
2. The probability of validating a new block is determined by how large a stake of a person.
3. The validator do not receive a block reward, instead they collect network fees as their reward.
4. Peercoin was first cryptocurrency to implement a full-scale PoS consensus model.
5. Handling Monopoly and Power Consumption.

Q13. Difference between Hard Fork and Soft Fork. ( Pg.2-49 )

Q14. Types of Wallets in Bitcoin.


Bitcoin wallets come in various forms, each with its own features, security measures, and convenience. Here
are some common types of Bitcoin wallet technologies:
1. Software Wallets: These wallets are only operated through devices such as computers or mobile devices
and the wallet doesn’t exist in hardware copy. It consist of Desktop wallets, Mobile wallets and Web
wallet.
2. Desktop Wallets: These are software applications installed on desktop or laptop computers.
3. Mobile Wallets: These are apps installed on smartphones or tablets, offering convenience for everyday
transactions.
4. Web Wallets: These are wallets accessed via a web browser, making them convenient for accessing
funds from various devices.
5. Hardware Wallets: These are physical devices that securely store a user's private keys offline. They are
considered one of the most secure ways to store bitcoins
6. Paper Wallets: A paper wallet is a physical document containing a Bitcoin address for receiving funds
and a corresponding private key for spending funds.
Chapter 3 : Permissionless Blockchain: Ethereum

Q1. Describe terms: Structure of Transaction, Transaction Nonce, Transaction GAS, Recipient, Values
and data. (10) Dec 2023

Transaction Structure of BlockChain consists of Transaction Nonce, Transaction GAS, Recipient


and Values and Data. Which are as follows:
1. Transaction Nonce: A nonce is a unique number that is required for every single transaction. It is a
number showing the sequence a transaction.
 For an externally owned account.
 This number is the number of transactions sent from the account. For a contract account, it is the
number of contracts created by account.
2. Transaction GAS: A gas limit and a gas charge are applied to each transaction for confirming (or
mining) that transaction, miners are compensated with this fee.
 Gas is not ether, it is a separate virtual currency.
 Gas has its own exchange rate against ether.
 Ethereum uses gas to control resource usage of transactions.
3. Recipient: The recipient must a contract account for the transaction to cause the contract's code to run
or execute.
4. Values and Data: Value and data fields each comprise the primary "payload" of a transaction.
 Value: The quantity of ether you wish to send your receiven (in WEI or ETH)
 DATA: Data that can be sent.

Q2. What are the essential tools and frameworks for setting up a development environment for Solidity
programming? (10) Dec 2023
Setting up a development environment is necessary in order to begin using a smart contract We'll explore
the procedures needed to set up the development environment and the various choices.
There are two options for creating ideal conditions for creating Smart Contract.
 Remix Online IDE
 Local set up
1. Remix IDE : The first option is to create and test the smart contract using the online remix IDE. This
method is quick, simple, and used by beginners.
Pros
 No installation is necessary, all online.
 Start right away with no obstacles, and quickly for prototype and validating A local Ethereum
virtual network is made available using smart contracts.
Cons
 Remix IDE has significant restrictions as one moves from creating smart contracts to utilizing
them in distributed applications (DApps).
2. Local Setup : Setting up a kxal machine for creating Smart Contracts is an alternative to using Remix
IDE. Various tools are provided for local setup.
 NodeJS
 Visual Studio Code
 Truffle suit
 Ganche
Tools required for smart contract development is as follows :
1. NodeJS: Using NVM Version Manager)
2. Visual Studio Code: One of Microsoft's greatest IDES for developing Solidity smart contracts is
Visual Studio
3. Truffle Suite: A great framework for Smart Contracts is offered by the truffle suite. Npm( node
package management), whichis installed with node, is used to install truffle.

Q3. Discuss the role of tools like Remix and Truffle in the development process. (10) Dec 2023
1. Remix IDE : The first option is to create and test the smart contract using the online remix IDE. This
method is quick, simple, and used by beginners.
Pros
 No installation is necessary, all online.
 Start right away with no obstacles, and quickly for prototype and validating A local Ethereum
virtual network is made available using smart contracts.
Cons
 Remix IDE has significant restrictions as one moves from creating smart contracts to utilizing
them in distributed applications (DApps).
2. Truffle Suit:
1. Truffle offers a top-notch development platform, testing framework, and asset pipeline for
blockchains that make use of the Ethereum Virtual Machine (EVM).
2. It's a platform for developing decentralized apps on the Ethereum blockchain.
3. It is the most well-known and innovative framework.
4. Due to its configuration being user-friendly for beginners, Truffle is likely to be your first contact if
you are new to DAPP development.

Q4. Metamask. (5) Dec 2023


1. MetaMask is a type of Ethereum wallet that bridges the gap between the user interfaces for Ethereum
(e.g. Mist browsers, DApps) and the regular web (e.g. Chrome, Firefox, websites).
2. Its function is to inject a JavaScript library called web3.js into the namespace of each page your browser
loads.
3. Web3.js is written by the Ethereum core team. MetaMask is mainly used as a plugin in chrome.
4. MetaMask allows users to store and manage account keys, broadcast transactions, send and receive
Ethereum-based cryptocurrencies and tokens
5. It can securely connect to decentralized applications through a compatible web browser or the mobile
app's built-in browser.

Q5. What is nonce in blockchain and how does it work? (5) May2023
1. The Nonce is a random whole number, which is a 32-bit (4 byte) field, which is adjusted by the miners,
so that it becomes a valid number to be used for hashing the value of block.
2. Nonce is the number which can be used only once.
3. Once the perfect Nonce is found, it is added to the hashed block.
4. Along with this number, the hash value of that block will get rehashed and creates a difficult algorithm.
Working:
 Nonce is included in the block header, then that information is hashed.
 If the resulting hexadecimal number adds up to a value of less than or equal to the network's difficulty
target, the miner's block is added to the blockchain.
 Another is opened, and the process begins again.
Q6. Differentiate between Bitcoin blockchain and Ethereum Blockchain. (10) May2023
Bitcoin Ethereum

1 Bitcoin is a decentralized digital currency that


Ethereum is a decentralized global software
can be transferred on the peer-to-peer bitcoin
platform powered by blockchain technology.
network.

2 The purpose of bitcoin was to replace national The purpose of Ethereum was to utilize blockchain
currencies during the financial crisis of 2008. technology

3 Ethereum allows us to create smart contracts.


Although bitcoin do have smart contracts, they
Smart contracts are computer codes that is stored
are not as flexible or complete as Ethereum
on a blockchain and executed when the
smart contracts.
predetermined terms and conditions are met.

4 Smart contracts on Bitcoin are written in Smart contracts on Ethereum are written in
programming languages like Script, Clarity. programming languages like Solidity, Vyper, etc.

5 Bitcoin runs on the SHA-256 hash algorithm. Ethereum runs on the Keccak-256 hash algorithm.

6 The Proof-of-Work (PoW) is the consensus The Proof-of-Stake is the consensus mechanism
mechanism used by the Bitcoin network. used by Ethereum.

7 The block time of bitcoin is 10 minutes. The block time of Ethereum is 14 to 15 seconds.

8 The bitcoin blockchain has a block limit of 1 The Ethereum blockchain does not have a block
MB. limit.

9 Energy consumption is very high. Energy consumption is very low.

10 Structure of bitcoin is simple and robust. Structure of Ethereum is complex and feature rich

11 Miner got nearly 5 BTC along with same


Miner got nearly 6.25 BTC on successfully
additional rewards on successfully adding new
adding new block in network.
block in network.
Q7. Explain different List and explain the parts of EVM memory. (10) May2023
The Ethereum Virtual Machine (EVM) manages data through three crucial data areas: storage, memory. and the
stock Each of these areas plays a distinct role in the execution of smart contracts and transactions on the
Ethereum network.
1. Storage:
• Storage serves as a persistent key-value store within each Ethereum account.
• It provides persistent storage for accounts on the Ethereum network.
• Developers need to optimize storage usage to minimize gas costs and ensure efficient contract execution.
2. Memory:
• Memory provides a temporary workspace for contracts during message calls.
• Each message call results in a new instance of memory, offering a temporary storage area for contract
execution.
• Developers should manage memory efficiently to avoid unnecessary data retention and optimize gas
consumption.
3. Stack :
• The stock is the primary data area for executing computations within the EVM.
• It facilitates data flow and computation, enabling the EVM to process instructions and perform operations.
• The stack is crucial for managing data flow and executing computational tasks efficiently within the EVM.

Q8. With the help of a suitable diagram explain the life-cycle of a smart contract in Ethereum. (10)
May2023
1. Create: Contract reiteration and negotiation constitute a significant part of the first phase. First, the parties
must agree on the contract’s overall content and goals. This can be done online or offline. This is similar to
traditional contract negotiations.
2. Freeze: The smart contract and its participants become open to the public on the public ledger during the
‘freeze’ phase. Digital assets of both involved parties in the smart contracts are locked via freezing the
corresponding digital wallets, and nodes operate as a governance board that verifies whether the
preconditions for smart contract execution have been satisfied.
3. Execute: This phase involves the actual execution of the smart contract's code. Users interact with the
contract by sending transactions, triggering the execution of its predefined instructions.
4. Finalize: The finalize phase marks the end of the contract's execution. It involves completing any
remaining transactions or state updates and may include termination conditions or manual termination by
the contract owner. Once finalized, the contract's execution is complete.
Q9. EOA and contracts address ( could be contracts account, given in book, mistake in print) (5) May2023
EOA:
1. EOA is controlled via private keys from a user and the contract accounts are controlled by their contract code.
2. The term "Extemally Owned Account" is referred to as EOA. This is the type of account that is owned by
people on the Ethereum network.
3. A public-private key pair is produced for an account once the user creates one on Ethereum. The name or any
other personal information of the user does not identify the account.

Contracts Account:
1. A smart contract's code is contained in a contract account.
2. This account doesn't have a public or private key; the public address of the contract account is used to identify
it. Private keys are not owned by this account.
3. This account is managed by the smart contract's logic. The owner of the contract's account is the smart
contract that is implemented on the Ethereum blockchain.

Q10. Explain Smart Contract.


1. Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are
met.
2. They typically are used to automate the execution of an agreement so that all participants can be
immediately certain of the outcome, without any intermediary's involvement or time loss.
3. A smart contract is a self-executing program that automates the actions required in an agreement or
contract.
4. Once completed, the transactions are trackable and irreversible.
5. Smart Contracts play a crucial role in transaction script as they help to automate the process of validating
transactions on the blockchain.
Chapter 4 : Permissioned Blockchain: Hyperledger Fabric

Q1. Discuss Certificate Authority in Hyperledger Fabric. (5) Dec 2023


1. In Hyperledger Fabric, Certificate Authorities (CAs) play a crucial role in managing digital identities and
ensuring secure communication within the network.
2. A Certificate Authority is responsible for issuing, revoking, and managing digital certificates that
authenticate network participants and enable secure interactions between them.
3. CAs are responsible for managing the identities of participants within the Hyperledger Fabric network.
4. Each participant, whether it's an organization, a peer, or a client, is assigned a unique digital identity in
the form of an X.509 certificate issued by the CA.
5. This certificate contains information such as the participant's public key, identity information, and
expiration date.
6. If a participant's private key is compromised or if the participant is no longer authorized to access the
network, the CA can revoke their digital certificate.

Q2. Explain scalability issue of permissioned blockchain. (5) Dec 2023


1. Scalability has been identified as the most significant barrier to establishing public blockchains.
2. Blockchain scalability problems basically refer to the challenges in the blockchain network.
3. These challenges include: limited throughput, high fees and long confirmation times.
4. One of the primary limitations of many popular blockchains is their limited transaction throughput and
latency in processing transactions promptly.
5. Scalability issues can arise when a blockchain network is unable to process a sufficient number of
transactions when there is a significant increase in the number of transactions, leading to slower
confirmation and processing times and higher fees.

Q3. Short note on Chaincodes. (5) Dec 2023


1. A Chaincode (or “smart contract”) is an application that runs on top of the underlying architecture to
enforce business rules and maintain the state.
2. This application can define its own data structures, or use the types of services exposed by other chain
codes running in parallel on the same peer node.
3. The node that participates in the consensus protocol validates blocks and distributes them to other peers.
4. Each node has access to all information required for this task and runs an internal chaincode that
enforces business rules.
5. Chaincode is the program that is running on a peer node.
6. There are many chaincodes out there and they all run the same way,
enforcing business rules on transactions.
7. Chaincode can be written in any language supported by the underlying platform.

Q4. Enumerate the interoperability and scalability issues in Hyperledger fabric. (5) May2023
Interoperability Challenges:
1) Different Protocols: Blockchains use varied protocols and languages, complicating direct
communication.
2) Data Formats: There's no universal data format, hindering seamless interaction across networks.
3) Cross-Chain Communication: Specialized solutions for network interaction add complexity and
security concerns.
4) Smart Contract Compatibility: Contracts often aren't directly transferable due to distinct
architectures and languages.
Scalability Challenges:
1) Transaction Limits: Blockchain networks face limits on transactions per second, leading to
congestion.
2) Consensus Latency: Reaching consensus in large networks adds delays, impacting scalability.
3) Resource Demands: Increasing blockchain size requires more storage and bandwidth, limiting
participant inclusivity.
4) Block Propagation: Larger blocks can slow down propagation times, risking centralization as only
well-resourced nodes can efficiently participate.
Q5. Describe the various projects covered under Hyperledger umbrella projects. (10) May 2023
1. Hyperledger Frabic:
 Hyperledger Fabric emphasizes modular architecture for flexibility and scalability.
 It prioritizes permissioned networks for controlled access.
 Fabric focuses on confidentiality through private transactions.
 It stresses on plug-and-play consensus mechanisms.
2. Hyperledger Burrow:
 It provides a simplified execution environment for smart contracts.
 Burrow emphasizes compatibility with Ethereum tools and contracts.
 It prioritizes efficiency and scalability in blockchain transactions.
 Burrow offers enhanced security features for enterprise-grade applications.
3. Hyperledger Indy:
 Hyperledger Indy is an open-source, decentralized identity management platform for
individuals and organizations.
 It focuses on providing tools and libraries for building self-sovereign identity solutions
(SSI).
 Indy uses blockchain technology and cryptographic algorithms to ensure the privacy and
security of identity information.
 The Hyperledger Indy blockchain is both public and permissioned.
4. Hyperledger Sawtooth:
 Hyperledger Sawtooth is a toolbox for building business-focused blockchains.
 Sawtooth uses blockchain technology as a service (BaaS).
 Sawtooth features modularity for easy integration of custom features.
 Businesses can use it for tasks like supply chain tracking or secure payments.
5. Hyperledger Iroha:
 A Hyperledger Iroha is a simple, distributed ledger system.
 It emphasizes easy integration into infrastructural projects.
 It provides a set of predefined commands for asset management.
 Hyperledger Iroha prioritizes speed and simplicity for blockchain operations.

Q6. Channels in Hyperledger Fabric (5) May2023


1. A Hyperledger Fabric channel is a private “subnet” of communication between two or more
specific network members, for the purpose of conducting private and confidential transactions.
2. A channel is defined by members (organizations), anchor peers per member, the shared ledger,
chaincode application(s) and the ordering service node(s).
3. Each transaction on the network is executed on a channel, where each party must be
authenticated and authorized to transact on that channel.
4. Each peer that joins a channel, has its own identity given by a membership services provider
(MSP), which authenticates each peer to its channel peers and services.
5. Any one anchor peer can belong to multiple channels, and therefore maintain multiple ledgers,
no ledger data can pass from one channel to another.
Q7. Hyperledger transaction flow.
1) Endorsement:
• Transactions are initially proposed to specific peer nodes, known as endorsers, which execute the proposed
transaction against the current state database.
• Endorsers check the transaction proposal for correctness, endorse it by signing it if it's valid, and return the
endorsed transaction to the client.
2) Order:
• The client collects the required endorsements and submits the endorsed transactions to the ordering service.
• The ordering service batches transactions into blocks and delivers these blocks to all peers in the network, ensuring
consistency and integrity of the transaction order.
3) Validate:
• Upon receiving a block, each peer node validates the transactions within it. This includes checking the
endorsement policy and verifying that the state changes are consistent.
• Valid transactions are committed to the ledger, updating the current state, while invalid transactions are marked
and logged but not applied to the state.

Q8. Hyperledger Architecture ( components ).

In the fabric architecture, the key components are:


i. Membership Services
ii. Certificate Authorities
iii. Nodes
iv. Peers
1) Membership Services (MSP): Manages user identities using digital certificates. These certificates grant
access and define user permissions within the network.
2) Certificate Authorities (CA): Issue digital certificates that verify user identities. They rely on Public Key
Infrastructure (PKI) for secure authentication.
3) Nodes: Different types of nodes fulfil specific roles:
Client Nodes: Initiate transactions and interact with the network.
• Peer Nodes: Maintain a ledger copy, validate transactions, and can endorse them (optional).
• Orderer Nodes: Order transactions and ensure a specific sequence when adding them to the ledger.
4) Peers: Crucial components, with organizations having one or more in the network. Peers can be:
• Endorsing Peers: Simulate transactions and vote on their approval using smart contracts.
• Committing Peers: Validate endorsed transactions and commit them to the ledger.
Chapter 5 : Crypto assets and Cryptocurrencies

Q1. List the key differences between an ICO and STO. (10) Dec 2023
Initial Coin Offering
1) ICO is a method for obtaining money from prospective investors or venture capitalists before an initiative
is launched on the cryptocurrency market.
2) An initial coin offering (ICO) is a type of capital-raising activity in the cryptocurrency and blockchain
environment.
3) The main advantage of ICOs is that they remove middleman from the capital-raising process and create
direct connections between the company and investors.
4) Types of ICO are Private ICO and Public ICOs.
Security Token Offering
1) STO stands for Security Token Offering.
2) It's a method of raising funds in which tokens are issued representing ownership rights in the company.
3) Unlike ICOs, STOs are regulated by financial authorities and offer investors legal protections, as they are
considered securities.
4) This means they must comply with securities laws, providing investors with more transparency and
potentially reducing the risk of fraud.

Q2. Explain Fungible tokens. Describe the steps to create ERC20 tokens. (10) May Dec 2023
1. ERC-20 is the technical standard for fungible tokens created using the Ethereum blockchain.
2. A fungible token is one that is exchangeable with another token, whereas the well-known ERC-721 non-
fungible tokens (NFTs) are not.
3. ERC-20 allows developers to create smart-contract-enabled tokens that can be used with other products
and services.
4. These tokens are a representation of an asset, right, ownership, access, cryptocurrency, or anything else
that is not unique in and of itself but can be transferred.
Steps to create ERC20 Tokens:
 Understand ERC-20 Standards: Make sure you understand the requirements and functionalities of
ERC-20 tokens. These include functions like transfer(), transferFrom(), approve(), etc.
 Setup Development Environment: Set up a development environment like Solidity the programming
language for Ethereum smart contracts.
 Write Smart Contract: Implement functions for transferring tokens, checking balances, and approving
transfers.
 Compile Smart Contract: Once your smart contract is written, compile it using a Solidity compiler.
 Deploy Smart Contract: Deploy your compiled smart contract to the Ethereum blockchain.
 Market and Support: Market your token to attract users and investors.

Q3. ERC721. (NFT) (10) Dec 2023 (10) May2023


1. ERC-721 is a non-fungible token standard on the Ethereum blockchain.
2. It provides a set of guidelines for creating unique tokens that represent digital assets.
3. These tokens are non-fungible, meaning that they cannot be exchanged on a one-to-one basis due to
their unique properties.
4. The significance of ERC-721 lies in its potential to facilitate the creation of NFTs, which have a wide
range of applications in gaming, art, collectibles, and more.
5. The ERC-721 standard consists of a set of functions that developers can implement in their smart
contracts to create, transfer, and manage NFTs.
6. These functions allow for the creation of unique tokens with their own metadata, making them
distinguishable from one another.
7. ERC-721 smart contracts maintain a record of token ownership, allowing for the transfer of tokens
between users.
Q4. List the different advantages and disadvantages of ICO. (5) May2023
ICO Advantages:
1. Easy Access to Funds: Startups can raise money quickly without relying on banks or traditional
investors.
2. Global Reach: Anyone from anywhere in the world can invest, expanding the pool of potential
supporters.
3. Innovative: ICOs use new technology like blockchain and smart contracts, making them a cutting-edge
way to fund projects.
4. Token Trading: Tokens from ICOs can be traded on cryptocurrency exchanges, offering liquidity to
investors.
ICO Disadvantages:
1. Risky: Many ICOs are high-risk investments, with no guarantees of returns or project success.
2. Regulatory Uncertainty: Regulations around ICOs are often unclear, leading to legal risks for both
investors and projects.
3. Potential for Scams: Some ICOs turn out to be scams, with fraudulent projects taking investors'
money and disappearing.
4. Market Volatility: The value of ICO tokens can be highly volatile, leading to potential losses for
investors.
Chapter 6 : Blockchain Applications & case studies
Q1. Enlist and discuss the key challenges addressed by blockchain technology in the domains AI and
Cyber Security. (10) Dec 2023
Challenges addressed in AI:
1. Data Privacy and Security: Blockchain provides cryptographic techniques and decentralized storage
solutions that enhance data privacy and security.
2. Data Integrity: Blockchain's immutable ledger records all data transactions in a transparent and
tamper-resistant manner, enabling users to trace the provenance of data and verify its integrity.
3. Data Monetization: Blockchain-based data marketplaces enable data providers to monetize their data
assets directly, bypassing intermediaries and ensuring fair compensation.
4. Model Transparency: Blockchain-based solutions enable the transparent and auditable deployment of
AI models by recording model parameters, training data, and prediction outcomes on a blockchain
ledger.
Challenges addressed in Cybersecurity:
1. Data Integrity: Blockchain's decentralized and immutable ledger ensures that once data is recorded, it
cannot be altered retroactively without the consensus of the network.
2. Fraud Detection and Prevention: Blockchain provides a transparent and tamper-resistant record of
transactions, enabling organizations to detect and prevent fraudulent activities in real-time.
3. Identity Management: Blockchain offers decentralized identity management solutions where users
have control over their identity information and can authenticate themselves without relying on a
central authority.
4. Secure Communication and Data Exchange: Blockchain enables secure peer-to-peer communication
and data exchange through cryptographic techniques such as encryption and digital signatures.

Q2. Discuss the different challenges addressed by blockchain in the Energy sector. (10) May2023
1. Decentralization of Energy Grids: Blockchain enables the creation of decentralized energy grids
where energy can be generated, stored, and traded peer-to-peer without the need for intermediaries.
2. Energy Trading and Peer-to-Peer Transactions: Blockchain-based energy trading platforms enable
peer-to-peer energy transactions between producers and consumers, bypassing traditional energy
suppliers and distributors. Smart contracts facilitate automated, secure, and transparent energy
transactions, allowing consumers to buy and sell excess energy in real-time.
3. Grid Management and Optimization: Blockchain enables real-time monitoring, control, and
optimization of energy grids through decentralized energy management systems.
4. Renewable Energy Certificate (REC) Tracking: Blockchain-based REC tracking platforms provide a
transparent and tamper-resistant ledger for recording the generation, transfer, and retirement of RECs.
5. Energy Data Management and Security: Blockchain provides cryptographic techniques and
decentralized storage solutions that enhance the security and privacy of energy data.
6. Grid Resilience and Disaster Recovery: Blockchain enables the creation of decentralized microgrids
and energy communities that can operate independently during emergencies or grid outages.

Q3. Write a short note on Blockchain in AI.


1) Enhanced AI Security: Blockchain's immutability and transparency can secure AI training data,
preventing manipulation and ensuring data integrity for reliable AI models.
2) Improved AI Model Training: Secure and decentralized data storage on blockchains can facilitate access
to vast amounts of training data for AI algorithms, leading to more robust and accurate models.
3) Fairer AI Model Governance: Blockchain-based smart contracts can automate the execution of rules and
agreements for AI model development and deployment, promoting responsible AI practices.
4) Traceable AI Decisions: Recording AI decision-making processes on a tamper-proof blockchain allows
for auditing and explanation, improving transparency and trust in AI systems.
5) Collaborative AI Development: Blockchain can facilitate secure data sharing and collaboration between
different entities for AI development
6) Applications:
• Data Protection
• Data Monetization
• Supply chain Transparency
• Cryptocurrency analysis

You might also like