Blockchain Notes
Blockchain Notes
Blockchain-2022
1.What is a blockchain?
(a) Centralized digital ledger consisting of records called blocks
(b) Decentralized, distributed, digital ledger consisting of records called blocks
(c) Digital database consisting of records called class (d) Chain of laptops
Ans- b
2.Which is not a part of asymmetric encryption?
(a) Mining (b) Confusion and diffusion
(c) Public key (d) Private key
Ans- a
3.P2P stands for
(a) Peer-to-peer (b) peer-to-private
(c) peer-to-public (d) peer-to-public/private
Ans- a
4. Bitcoin is created by
(a) Prince Kumar (Chhotka wala) (b) Santoshi Nakamoto
(c) Rohan and akash (d) Dr. Sudhir kushwaha
Ans- b (except)
5.Fork in blockchain means
(a) a child process (b) a background script
(c) a split (d) None of the above
Ans- c
6.A node in blockchain environment is
(a) a type of cryptocurrency (b) a blockchain
(c) a computer on a blockchain network (d) an exchange
Ans- c
7.A cryptocurrency is stored in
(a) bank account (b) floppy disk
(c) wallet (d) your pocket
2
Ans- c
8.A miner is
(a) a type of blockchain (b) a computer program that validates and process blockchain
transactions
(c) a fast calculator (d) an algorithm with high complexity
Ans- b
9.What is a genesis block?
(a) The first block (b) The last block
(c) The most valued block (d) Block just created after the fork
Ans- a
10._____ Characteristic makes blockchain tamper-proof
(a) Cryptocurrency (b) VPN
(c) Immutability (d) All of the above
Ans- c
11.Encryption is
(a) putting data into code making it difficult to read or understand (b) jumbling data
(c) a formal language (d) a secret way of writing programs
Ans- a
12.A computer program that validates and process blockchain transaction is
(a) an adder (b) a miner
(c) a mixer (d) a manager
Ans- b
13.A hot wallet is connected to the internet
(a) True (b) False
(c) Depends on connectivity (d) Internet is not an issue for using wallet
Ans- a
14.Hash functions are used in
(a) Cryptocurrency (b) Blockchain
(c) cryptography (d) All of the above
Ans- d
3
(b) Proof of Stake (PoS): Proof of Stake is an alternative consensus mechanism that doesn't rely on
solving complex puzzles. Instead, validators (stakers) are chosen to create new blocks and validate
transactions based on the number of cryptocurrency tokens they "stake" or hold. PoS is energy-
efficient compared to PoW and aims to achieve consensus by rewarding those with a significant
stake in the network.
(c) Mining Incentive: Mining incentive refers to the reward miners receive for participating in the
process of validating transactions and adding new blocks to the blockchain. This incentive usually
consists of newly minted cryptocurrency coins, along with transaction fees paid by users. Mining
incentives play a crucial role in motivating miners to secure the network and maintain the
blockchain.
(d) Elliptic Curve: Elliptic curve cryptography (ECC) is a cryptographic technique that uses the
mathematics of elliptic curves to provide secure communication and digital signatures. It's widely
used in blockchain networks for creating public and private key pairs, ensuring data integrity, and
enabling secure transactions.
(e) Proof of Burn: Proof of Burn is a lesser-known consensus mechanism where participants
intentionally "burn" or destroy a certain amount of cryptocurrency tokens to demonstrate their
commitment to the network. This can give them the right to mine or validate transactions. Proof of
Burn aims to align incentives by requiring participants to invest in the network.
4
(f) Mining Pool vs. Mining Difficulty: A mining pool is a group of miners who combine their
computational power to increase the chances of solving blocks and receiving rewards. Mining
difficulty is a measure of how hard it is to find a valid block. As more miners join the network, the
difficulty increases to maintain a consistent block time.
(g) RAFT: RAFT is a consensus algorithm used in distributed systems to ensure consistency and fault
tolerance. It's not specific to blockchain but is relevant in discussions about consensus mechanisms
and network reliability.
Encryption is used in blockchain to secure the data stored on the blockchain. The
data on the blockchain is encrypted using a variety of techniques, including
symmetric encryption, asymmetric encryption, and hashing.
• Symmetric encryption uses the same key to encrypt and decrypt the data.
This is a simple and efficient encryption technique, but it requires that both
parties have the same key.
• Asymmetric encryption uses two keys, a public key and a private key. The
public key is used to encrypt the data, and the private key is used to decrypt
the data. This is a more secure encryption technique than symmetric
encryption, but it is also more complex.
• Hashing is a technique that converts data into a unique value called a hash.
The hash cannot be reversed, so it cannot be used to decrypt the data.
Hashing is used in blockchain to secure the data by creating a hash of each
block and storing the hash in the next block. This creates a chain of hashes,
and if any data in a block is changed, the hash of the block will change. This
makes it very difficult to tamper with the data on the blockchain.
Encryption plays a critical role in blockchain security. It helps to protect the data
stored on the blockchain from unauthorized access, modification, and disclosure.
Ans- Here are two consensus algorithms and a brief explanation of how they work:
(a) Node
(b) Chain
A chain is a series of blocks that are linked together. Each block contains a record of
transactions that have been verified by the nodes in the network. The blocks are
chained together using cryptography, which makes it very difficult to tamper with the
data in the blockchain.
(c) Miner
A miner is a node that is responsible for adding new blocks to the blockchain. Miners
do this by solving a computationally difficult puzzle. The first miner to solve the
puzzle is rewarded with cryptocurrency and is allowed to add the next block to the
blockchain.
(d) Transaction
6
Ans- some of the key differences between a blockchain ledger and an ordinary
ledger:
Ans- Here are the differences between plaintext, cleartext, and ciphertext:
Here is a table that summarizes the differences between plaintext, cleartext, and
ciphertext:
Unencrypted data
Meaning Unencrypted data Encrypted data that is not intended to
be kept secret
Not human-
Readability Human-readable Human-readable
readable
9
Not intelligible
Intelligibility Intelligible to humans Intelligible to humans
to humans
10.What do you mean by hashing? With the help of a neat diagram, explain SHA-256 algorithm.
Ans- In cryptography, hashing is a process that converts data of any size into a fixed-
size string of characters. The resulting string is called a hash value, or simply a hash.
Hashing is used to verify the authenticity and integrity of data, and to create digital
signatures.
The SHA-256 algorithm takes an input of any size and produces an output of 256
bits. The input is divided into blocks of 512 bits, and each block is processed through
a series of mathematical operations. The output of each operation is then used as
the input for the next operation. This process is repeated 64 times, and the final
output is the hash value.
The SHA-256 algorithm is a secure and versatile hash function that is used in a
variety of applications. It is a critical component of many security systems, and it is
likely to remain in use for many years to come.
The signature is created using the private key of the sender's Bitcoin wallet. The
nonce is used to ensure that the transaction is unique.
To send a Bitcoin transaction, the sender must first create a transaction object. The
transaction object contains the source address, destination address, amount,
signature, and nonce. The sender then broadcasts the transaction to the Bitcoin
network.
Ans- A Merkle tree, also known as a hash tree, plays a crucial role in the structure and
security of a blockchain. It is a hierarchical data structure that is used to efficiently
organize and verify the integrity of large amounts of data, such as transactions,
within a blockchain. The Merkle tree is named after its inventor, Ralph Merkle.
The primary role of a Merkle tree in a blockchain is to provide a secure and efficient
way to verify the consistency and authenticity of data stored within a block. Here's
how it works:
1. Data Organization:
• In a blockchain, a block contains multiple transactions or data records.
• The transactions are grouped together in pairs, and the cryptographic
hash of each pair is computed.
2. Hash Pairing and Tree Structure:
• The computed hashes are then paired together and hashed again to
form a new set of hashes.
• This process is repeated iteratively until a single hash, known as the
"root hash" or "Merkle root," is obtained at the top of the tree.
3. Verification of Data Integrity:
• The Merkle root hash is included in the header of the block.
• When a user or node wants to verify the integrity of a specific
transaction, they only need to request and verify the relevant branches
12
of the Merkle tree, rather than downloading and verifying the entire
block.
• This optimization allows for efficient verification of data integrity.
4. Security and Tamper Detection:
• If any individual transaction is altered or tampered with, it would result
in a change in the hash value of the corresponding leaf node in the
Merkle tree.
• This change would propagate up the tree, affecting the hashes at
higher levels, including the Merkle root.
• As a result, any tampering can be quickly detected by comparing the
recalculated Merkle root with the one stored in the block's header.
5. Space Efficiency:
• The Merkle tree enables efficient storage of a large number of
transactions within a block.
• By using hashes, the tree reduces the amount of data that needs to be
stored, improving space efficiency.