Professional Documents
Culture Documents
Module-1
1. Define Blockchain. List down types of Blockchain and give features and examples
of each of them. Compare different types of Blockchains.
Blockchain is a mechanism for permanently recording cryptographically signed,
time-stamped transactions, sequentially linked in a chain. It is a type of Distributed
Ledger Technology (DLT) where multiple nodes in a network share the same database,
and it is decentralized, removing intermediaries by establishing trust through a consensus
model.
There are several types of blockchains based on their level of decentralization:
Public Blockchain:
Anyone can join the network and participate in the consensus process.
Transactions are transparent and can be viewed by anyone.
Immutable ledger ensures data integrity.
Examples: Bitcoin, Ethereum, etc.
Private Blockchain:
Permissioned access, where only selected entities can join the network.
More control over who can read, write, and validate transactions.
Increased privacy compared to public blockchains.
Examples: Hyperledger Fabric, Corda, etc.
Consortium Blockchain:
Shared control among a group of organizations.
Intermediate level of decentralization between public and private blockchains.
Suitable for industries where multiple parties collaborate but still want some level of
control.
Examples: R3 Corda, Quorum, etc.
Features of a Blockchain
● Immutable - the blockchain is a permanent and unalterable network. Once a
transaction is recorded on the blockchain, it cannot be modified or deleted.
● Distributed - All network participants have a copy of the ledger for complete
transparency.
● Decentralized - Blockchain technology is a decentralized system, which means
that there is no central authority controlling the network.
● 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.
2. What is DLT? What are its key features? Discuss some examples of DLT.
Differentiate between DLT and Blockchain.
Distributed Ledger Technology (DLT) is a concept centered around an encoded and
distributed database where records regarding transactions are stored. It involves a
database spread across various computers, nodes, institutions, or countries, accessible by
multiple individuals globally. Here are its key features:
● Decentralized: DLT operates on a decentralized model where every node
maintains the ledger independently. Updates to the ledger occur autonomously at
each node, ensuring transparency and eliminating the need for a central
authority.
● Immutable: DLT utilizes cryptography to create a secure database where once
data is stored, it cannot be altered or changed. This feature ensures the integrity
and security of the data recorded on the ledger.
● Append-only: Distributed ledgers are append-only, meaning that new data can
only be added to the ledger and cannot be modified or deleted. This feature
ensures the traceability and auditability of transactions.
● Distributed: DLT does not rely on a central server or authority to manage the
database. Instead, the ledger is distributed among multiple nodes in the network,
enhancing transparency and resilience.
● Shared: The distributed ledger is shared among the nodes in the network, with
some nodes having a full copy of the ledger and others having only the
necessary information. This sharing ensures that the ledger is accessible and
functional across the network.
● Smart Contracts: DLT supports smart contracts, which are self-executing
contracts with predefined terms written into code. Smart contracts automate
transactions, making them secure and transparent.
● Fault Tolerance: Due to its decentralized nature, DLT is highly fault-tolerant. If
one node fails, the data remains available on other nodes, ensuring continuous
operation of the network.
● Transparency: DLT offers high transparency, as every participant in the network
can view the transactions recorded on the ledger. This transparency fosters trust
among participants.
● Examples of DLT include:
● Blockchain: A type of DLT where transactions are stored in a chain of blocks,
each containing a unique hash. Bitcoin and Ethereum are examples of
blockchain-based DLT.
● Directed Acyclic Graphs (DAG): DAG uses a different data structure to organize
data and achieve consensus. IOTA and Nano are examples of DAG-based DLT.
● Hashgraph: Hashgraph stores records in a directed acyclic graph and uses virtual
voting for consensus. Hedera Hashgraph is an example of Hashgraph-based
DLT.
● Holochain: Holochain operates on a peer-to-peer network where each node runs
on its own chain. It offers a highly decentralized form of DLT.
5. What are the properties of cryptographic hash function? Which hash functions are
used in Blockchain? Explain each one of them with example and neat diagram.
Cryptographic hash functions have several properties that make them suitable for various
applications, including blockchain. Here are the common properties of cryptographic
hash functions:
● Deterministic: For the same input, the hash function always produces the same
output.
● Fast Computation: Hash functions should be computationally efficient to
calculate.
● Pre-image Resistance: Given a hash value, it should be computationally
infeasible to determine the input that produced that hash.
● Second Pre-image Resistance: Given an input and its hash value, it should be
computationally infeasible to find another input that produces the same hash.
● Collision Resistance: It should be computationally infeasible to find two
different inputs that produce the same hash value.
● Fixed Output Size: The output size of the hash function should be fixed,
regardless of the size of the input.
● Avalanche Effect: A small change in the input should result in a significant
change in the output.
7. With neat diagram illustrate the structure of Block (Header and Body) in the
Blockchain. Write short note on Genesis block and Merkle tree.
In a blockchain, each block consists of two main components: the block header and the
block body. Let's discuss each of these components in detail:
Block Header:
The block header contains metadata about the block and is essential for maintaining
the integrity and security of the blockchain. It typically includes the following fields:
● Version: This field specifies the version of the blockchain protocol being used
for the block.
● Previous Block Hash: This field contains the cryptographic hash of the previous
block's header, linking the current block to its predecessor. This linkage ensures
the chronological order and immutability of the blockchain.
● Merkle Root: The Merkle root is the hash of all the transactions included in the
block. It is derived from the Merkle tree, which provides a concise and efficient
way to summarize and verify the integrity of the transactions.
● Timestamp: This field records the time when the block was created or mined. It
helps establish the chronological order of blocks in the blockchain.
● Difficulty Target: The difficulty target determines the level of difficulty required
to mine a new block. It adjusts dynamically based on the network's hashing
power to maintain a consistent block creation rate.
● Nonce: The nonce is a 32-bit number that miners incrementally adjust during the
mining process to find a valid hash for the block. It is crucial for proof-of-work
consensus mechanisms.
Block Body:
The block body contains the actual data stored within the block. This data typically
consists of transactions, smart contracts, or other relevant information depending on
the blockchain's use case.
For example, in a cryptocurrency blockchain like Bitcoin, the block body contains a
list of transactions. Each transaction represents the transfer of cryptocurrency from one
address to another.
In other blockchain applications, such as Ethereum, the block body may include smart
contract code and state changes resulting from contract execution.
Genesis Block:
The Genesis block is the very first block in a blockchain. It serves as the foundation
upon which all subsequent blocks are built.
Unlike regular blocks, the Genesis block does not have a previous block hash because
it has no predecessor.
The creation of the Genesis block marks the birth of the blockchain network and
typically includes special metadata or messages to commemorate its significance.
For example, in the Bitcoin blockchain, the Genesis block includes a message
referencing a newspaper headline from January 3, 2009, indicating the block's creation
date.
Merkle Tree:
A Merkle tree is a data structure used to efficiently summarize and verify the integrity
of large sets of data, such as transactions in a block.
It is constructed by recursively hashing pairs of data (transactions) until a single root
hash, known as the Merkle root, is obtained.
The Merkle root is stored in the block header and serves as a compact representation
of all the transactions in the block.
By verifying the Merkle root, nodes in the blockchain network can quickly confirm the
validity of transactions without having to process each transaction individually.
The Merkle tree enhances the security and efficiency of blockchain networks by
facilitating fast and secure verification of block contents.
Module-2
1. What is Bitcoin? Explain double spending problem and how it is handled in
Bitcoin.
Bitcoin (BTC) is a virtual currency that works like a real-world currency. It's a
cryptocurrency, which means it's designed to be a form of payment outside the
control of any one person, group, or entity. It was invented in 2008 by an
anonymous person or group of people using the pseudonym Satoshi Nakamoto
and was released as open-source software in 2009. Bitcoin is not regulated by a
third party like banks, the government, or a company.
Double spending problem
The double spending problem refers to the risk associated with spending the
same digital currency more than once. In a traditional monetary system, this
issue doesn't arise because physical currency cannot be duplicated. However, in
digital transactions, since currency exists as data, there's a risk that a malicious
actor could spend the same digital currency multiple times, leading to fraudulent
transactions and undermining the integrity of the payment system.
In Bitcoin and other blockchain-based cryptocurrencies, the double spending
problem is addressed through a decentralized consensus mechanism and
cryptographic techniques. Here's how Bitcoin handles the double spending
problem:
● Decentralized Ledger: Bitcoin operates on a decentralized ledger called the
blockchain. This ledger is maintained by a network of nodes (computers)
spread across the globe. Each node maintains a copy of the entire
blockchain, which contains a record of all transactions ever executed on
the network.
● Transaction Verification: When a user initiates a Bitcoin transaction, it is
broadcast to the network of nodes. These nodes validate the transaction to
ensure that the sender has sufficient funds and that the transaction adheres
to the network's rules (e.g., no double spending).
● Consensus Mechanism: Bitcoin uses a consensus mechanism called Proof
of Work (PoW) to agree on the state of the blockchain. Miners, who are
specialized nodes, compete to solve complex mathematical puzzles to
validate and add new blocks of transactions to the blockchain. This
process requires significant computational power and ensures that no
single entity can control the network.
● Confirmation: After a transaction is included in a block by a miner and
added to the blockchain, it receives a certain number of confirmations.
Each confirmation represents a subsequent block added to the blockchain
after the block containing the transaction. The more confirmations a
transaction has, the more secure and irreversible it becomes.
3. Illustrate generation of private key, public key (using ECC) and Address of
Bitcoin (Using hash and Base58 encoding).
Generation of Private Key:
A private key is a randomly generated 256-bit number.
Example of a private key:
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF
Generation of Public Key (Using ECC):
The public key is derived from the private key using Elliptic Curve
Cryptography.
Bitcoin uses the secp256k1 elliptic curve.
The public key is a point on the elliptic curve calculated by multiplying a
predetermined generator point (G) by the private key (k).
Example of a public key (uncompressed format):
0431c1e9f0e124b3e4f2c4c4b5f3c49d204d774f147bb9db3e6e5f7b3f2062c3b15a
173b23db20084a2f8c6ef87b6f78ef85aafef204199f3a5ef0b1d0794bcb5
Derivation of Bitcoin Address:
A Bitcoin address is derived from the public key through a series of
cryptographic operations.
The public key is first hashed using the SHA-256 algorithm.
The resulting hash is then hashed again using the RIPEMD-160 algorithm.
The RIPEMD-160 hash is then prefixed with a version byte (usually 0x00 for
mainnet) to identify the network and create a checksum.
The checksum is calculated by taking the first four bytes of the double SHA-256
hash of the prefixed hash.
The checksum is appended to the prefixed hash, forming the payload.
The payload is encoded using Base58Check encoding to create the Bitcoin
address.
Example of a Bitcoin address: 1J7mdg5rbQyUHENYdx39WVWK7fsLpEoXZy
4. What is wallet? What are types of wallets. What are wallet technologies?
Explain with neat diagram the concept of HD deterministic wallet
(specification-BIP0032).
A cryptocurrency wallet is a software or hardware tool used to securely store,
manage, and interact with digital assets such as Bitcoin and other
cryptocurrencies. It's called a wallet because, like a physical wallet, it allows
users to send, receive, and manage their funds. However, instead of holding
physical currency, a cryptocurrency wallet stores the private keys necessary to
access and control the user's digital assets on the blockchain.
Types of Wallets:
Hot Wallets:
● Software Wallets: Software wallets include applications for desktops and
mobile devices. These wallets are installed on a desktop or laptop
computer and can access your cryptocurrency, make transactions, display
your balance, and much more. Some software wallets also include
additional functionality, such as exchange integration if you're using a
wallet designed by a cryptocurrency exchange.
● Online Wallets: Also known as web wallets, they run on cloud servers and
can be accessed from anywhere via a web browser.
Cold Wallets:
● Hardware Wallets: Physical devices that generate and store keys offline,
providing enhanced security against online threats.
● Paper Wallets: Physical printouts or handwritten records of keys, typically
in the form of QR codes, offering offline storage but vulnerable to physical
damage or loss.
Wallet Technologies:
● Nondeterministic Wallets: Each key is independently generated from a
random number, known as a JBOK (Just a Bunch Of Keys) wallet.
Cumbersome to manage and require frequent backups to prevent loss of
funds.
● Deterministic Wallets: Keys are derived from a single master key, known
as the seed, making it possible to recreate the entire wallet from the seed.
Two types: hierarchical deterministic (HD) wallets and non-hierarchical
deterministic wallets.
Hierarchical Deterministic (HD) wallets
Hierarchical Deterministic (HD) wallets, as defined by the BIP-32 standard,
offer a sophisticated approach to cryptocurrency wallet management. They
organize keys in a tree structure, where a parent key can derive a sequence of
children keys, and each child key can further derive its own set of keys,
extending to an infinite depth. HD wallets are created from a single root seed,
typically generated from a mnemonic phrase. Every key in the HD wallet is
deterministically derived from this root seed, enabling the recreation of the
entire wallet from the seed in any compatible HD wallet. This feature facilitates
easy backup, restoration, export, and import of HD wallets by simply
transferring the mnemonic phrase. HD wallets provide numerous advantages,
including organizational structuring, enhanced privacy, and improved security
through hierarchical key derivation. Additionally, HD wallets allow the creation
of a sequence of public keys without access to corresponding private keys,
enabling their use in insecure environments or for specific purposes like
receiving payments. The child key derivation process in HD wallets utilizes a
one-way hash function, combining a parent key, a chain code, and an index
number to generate child keys, ensuring that knowledge of a child key does not
compromise its siblings' security. Overall, HD wallets offer a powerful and
flexible solution for managing cryptocurrency funds, catering to both individual
and organizational needs.
5. With the help of diagram explain bitcoin UTXO model for transaction and
transaction lifecycle.
Module-5
1. What is Cryptocurrency? What are their characteristics? List down various types
of Cryptocurrencies and compare Bitcoin and Ethereum
Cryptocurrency is a type of digital or virtual currency that uses cryptography for
security and operates on decentralized networks based on blockchain technology.
Here are its characteristics:
● Decentralization: Cryptocurrencies are typically decentralized, meaning
they are not controlled by any single entity or government. Instead, they
rely on distributed ledger technology, such as blockchain, to record
transactions and manage the network.
● Cryptography: Cryptocurrencies use cryptographic techniques to secure
transactions and control the creation of new units. This ensures the
integrity and security of the network, as well as the anonymity of users.
● Digital Nature: Cryptocurrencies exist purely in digital form and do not
have a physical counterpart like traditional currencies. They are stored in
digital wallets and can be transferred electronically between users.
● Limited Supply: Many cryptocurrencies have a predetermined maximum
supply, which is coded into their protocol. This ensures scarcity and can
contribute to their value over time.
● Irreversible Transactions: Once a transaction is confirmed on the
blockchain, it cannot be reversed or altered. This immutability ensures the
integrity of the transaction history.
● Global Accessibility: Cryptocurrencies can be accessed and used by
anyone with an internet connection, regardless of geographic location or
socioeconomic status.
Types of cryptocurrencies
Bitcoin-derived cryptocurrencies: These are cryptocurrencies that are either directly
forked from Bitcoin's codebase or are built using similar principles. They often share
many characteristics with Bitcoin, such as proof-of-work consensus mechanisms and a
focus on decentralization and digital currency use cases.
Examples of Bitcoin-derived cryptocurrencies include:
● Bitcoin Cash (BCH): Forked from Bitcoin in 2017 to increase the block size
limit, allowing for more transactions per block and faster transaction speeds.
● Bitcoin SV (BSV): Another fork of Bitcoin, created to maintain the original
vision of Bitcoin as outlined in the Satoshi Nakamoto whitepaper. It aims to
scale Bitcoin for global adoption by increasing the block size and restoring
certain protocol features.
● Litecoin (LTC): While not a direct fork of Bitcoin, Litecoin shares many
similarities with Bitcoin and is often considered a "silver" to Bitcoin's "gold." It
was created by Charlie Lee in 2011 and offers faster transaction confirmations
and a different hashing algorithm (Scrypt) compared to Bitcoin.
Native blockchain cryptocurrencies: These are cryptocurrencies that operate on their
own blockchain networks and are not directly derived from Bitcoin's codebase. They
often have unique features, consensus mechanisms, and use cases beyond serving as
digital currencies.
Examples of native blockchain cryptocurrencies include:
● Ethereum (ETH): A decentralized platform that enables the creation and
execution of smart contracts and decentralized applications (DApps). Ether
(ETH) is the native cryptocurrency of the Ethereum platform, used to pay for
transaction fees and computational services.
● Ripple (XRP): Developed by Ripple Labs, XRP is designed to facilitate fast and
low-cost cross-border payments. It aims to provide solutions for banks and
financial institutions to improve the efficiency of international money transfers.
● Cardano (ADA): A blockchain platform focused on scalability, sustainability,
and interoperability. Cardano aims to provide a secure and scalable infrastructure
for the development of decentralized applications and smart contracts.
● Polkadot (DOT): A multi-chain blockchain platform that enables interoperability
between different blockchains. It aims to create a decentralized and interoperable
ecosystem where different blockchain networks can communicate and share
information.
2. What do you understand by Crypto-Tokens in Blockchain? How they work?
What are the different types of Crypto-Tokens? Give suitable examples.
Crypto-tokens in blockchain are digital assets that are created, traded, and stored
on a blockchain platform. These tokens can represent various assets, such as
commodities, loyalty points, or even other cryptocurrencies, and are often used
for specific purposes within a blockchain ecosystem. Here's an overview of how
crypto-tokens work and the different types:
How Crypto-Tokens Work:
● The token is given a numerical value to represent a monetary digital asset.
● Crypto tokens are programmable, permissionless, trustless, and
transparent.
● The token can be programmed to represent any tradable asset or utility that
resides on the blockchain and allows the holder to use it for investment or
economic purposes.
● The person owning the token essentially holds a key that lets them create a
new entry on the public blockchain ledger.
Types of Crypto-Tokens:
● Governance Tokens: These tokens enable holders to participate in the
governance of a blockchain network by voting on protocol upgrades,
parameter changes, or other governance decisions. Examples include
MakerDAO's MKR token and Compound's COMP token.
● Utility Tokens: Utility tokens are used to access or pay for services,
products, or features within a blockchain platform or decentralized
application (DApp). Examples include Basic Attention Token (BAT),
which is used within the Brave browser for advertising and content
rewards.
● Security Tokens: Security tokens represent ownership or investment in
real-world assets, such as equity shares, bonds, or real estate. They often
offer holders certain rights, such as voting or dividends. Security tokens
are subject to regulatory compliance and securities laws. Examples include
tokenized stocks and real estate.
● Non-Fungible Tokens (NFTs): NFTs are unique tokens that represent
ownership or proof of authenticity of a specific digital or physical asset.
Each NFT has unique properties and cannot be exchanged on a one-to-one
basis like fungible tokens. NFTs are commonly used for digital art,
collectibles, gaming items, and more. Examples include CryptoKitties,
NBA Top Shot moments, and digital artworks by Beeple.
Examples:
Ethereum-based Tokens: Many tokens are created and operate on the Ethereum
blockchain using ERC-20, ERC-721, or ERC-1155 standards. Examples include
DAI stablecoin (ERC-20), CryptoKitties (ERC-721), and Decentraland's MANA
token (ERC-20).