Block Chain Answer
Block Chain Answer
a. Web browser
b. E-commerce platforms
c. Amazon Web Services
d. Email
Ans: b and c
2. Consider the fork() system call in Unix-based operating systems. How many
processes are created from the following executions of the fork() system call?
int main() {
fork();
fork();
return 0;
}
a. 2
b. 4
c. 6
d. 8
Ans: b
3. What is the output of the following piece of code written in C programming language?
int main() {
int x = 10, y = 20;
swap(x, y);
printf(“%d %d”, x, x);
return 0;
}
a. 10 20
b. 20 10
c. 10 10
d. 20 20
Ans: c
4. Which of the following network protocols is used to get the MAC address of a network
interface from its IP address?
a. DNS
b. ARP
c. RARP
d. TELNET
Ans: b
5. Consider that the IP address of a network is 202.141.80.20 and the subnet mask is
255.255.255.0. How many hosts are supported by this network?
a. 256
b. 254
c. 128
d. 126
Ans: b
6. Which of the following is/are used in operating systems to solve the mutual exclusion
problems for critical sections?
a. Semaphore
b. Spinlocks
c. Process states
d. Deadlock detection
Ans: a and b
Ans: c
Ans: c
9. Which of the following IP addresses cannot be used to host a web server that needs
access from a public Internet?
a. 202.141.80.9
b. 10.10.178.2
c. 152.58.9.9
d. 8.8.8.8
Ans: b
Ans: c
1. What are the features of a hash function?
a. Puzzle-friendly
b. Collision-resistance
c. Deterministic
d. Post image resistance
2. For a SHA 256 bit hash function, the attacker needs to compute how many hash
operations in order to find two matching outputs?
a. 0.3 ×2128
b. 0.2×1050
c. 0.25X2130
d. 1 ×2256
Hint: If a hash function produces 𝑁 bits of output, an attacker needs to compute only 2𝑁/2 hash
operations on a random input to find two matching outputs. 2256/2 = 2128 =
=(0.25)X2^130
4. Which of the statements below is/are true for decentralized distributed systems?
a. Players may or may not trust each other
b. Players must trust each other
c. Central body should govern the communication
d. None of the above
5. Miner nodes only execute new transactions but can not verify previous transaction
hash?
a. True
b. False
Hint: Answer b. miners can verify previous transaction hash and create new transactions
Hint: answer is c.
Hint: answer is c. The Genesis block always contains the first transaction block but not
necessarily the last one.
Hint: answer is a,b,c. UTXO is feature for handing unspent amount, it is not an blockchain app
Blockchain and Its Applications
Assignment 2
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Alice employs the RSA cryptosystem with the prime numbers p = 7 and q = 17 to
derive her public and private keys. Given that Alice's public key is 11, her
corresponding private key is ____________.
2. Bob wishes to send a lengthy message to Alice with the requirement that Alice can
verify its origin and Bob cannot later disown the message. They also want to ensure
the confidentiality of the message. Alice and Bob decide to employ public key
cryptography and cryptographic hashing techniques. Let the key pairs for Alice and
Bob be (Pub A, Pri A) and (Pub B, Pri B) respectively, and let E, D, and H denote the
encryption, decryption, and hash functions respectively. M represents the message,
and H(M) is its digest. Which of the following outlines the correct sequence of steps
for Alice to send the digitally signed message?
i. At Bob: M’ = E(M, KpubA)
ii. At Alice: M = E(M’, KpriA)
iii. Bob sends the message M’ to Alice
iv. The signature along with the message is sent to Alice (M, M’)
v. Bob: M’ = E(M, KpriB)
vi. Signing the message with his private key: S = E(H(M), KpriB)
vii. M = E(M’, KpubB)
3. The act of digitally signing transactions by the sender in Blockchain ensures the
resolution of repudiation/verifiability problems.
a. True
b. False
4. Which of the following is used to point to a block in the blockchain:
a. Hash Pointer
b. User ID
c. Transaction ID
d. Timestamp
5. Suppose you have 6 data points -- A to F. The post-order traversal of the Merkle Tree
is given by (here A means hash of A, DC means the combined hash of D and C, and
so on):
a. {ABCDEFEF, ABCD, EFEF, AB, CD, EF, EF, A, B, C, D, E, F}
b. {A, AB, B, C, D, CD, ABCD, E, F, EF, ABCDEF}
c. {A, B, AB, C, D, CD, ABCD, E, F, EF, GH, EFGH, ABCDEFGH}
d. {A, B, AB, C, D, CD, ABCD, E, F, EF, EF, EFEF, ABCDEFEF}
Hint:
Post order Traversal : {A, B, AB, C, D, CD, ABCD, E, F, EF, EF, EFEF, ABCDEFEF}
Hint: Due to a lack of global timing reference, and various kinds of faults it is very difficult to
agree with nodes unanimously.
9. The Liveliness property ensures the output should be produced within a finite time
limit?
a. False
b. True
Hint: Refer to Week 2 Slide, liveliness property talks about eventual termination.
10. Paxos consensus support(s) which of the below properties
e. Liveliness
f. Safety
g. Both
h. None of the above
Hint: Refer to Week 2 Slide, Paxos supports safety but not liveliness.
Blockchain and Its Applications 2024
Assignment 3
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Inspect and explore block #828070 using this link to solve the below question. What
is the hash of the previous block for Bitcoin block #828070? Copy and paste the
answer into the box below.
a. 0000000000000000000246ef8870310474e18acbd1fd8453abbb6f367f74816f
b. 00000000000000000001d857c22ab5211e2173e4f970eb15f04f64e692587aa
1
c. 000000000000000000034511894ee97dfa62803bb338335a12e40f6e5a45172
0
d. 00000000000000000002c2c0e69e794d1968382626109ed1d6441020105e7d
4e
b. scriptSig: <pubKey>
scriptPubKey: OP_HASH160 <pubKeyHash> OP_EQUAL
c. scriptSig: <pubKey>
scriptPubKey: <pubKey> OP_EQUALVERIFY
d. scriptSig: <sig>
scriptPubKey: <pubKey> OP_CHECKSIG
A. a, b, c
B. c, d
C. a, b, d
D. a, c, d
4. If the six-byte difficulty bits in the hexadecimal form are 0x1a05f20881ab, and the
target value is calculated using X * 2^(Y), what are the values for X and Y
respectively?
a. X = 0x5f20881ab, Y = 0x1a
b. X = 0x1a05f2, Y = 0x0881ab
c. X = 0x1a05f2, Y = 0x18
d. X = 0x5f20881ab, Y = 0x1a0
6. Which one of the following opcodes is needed to remove the second-to-top stack
item?
a. OP_DELETE
b. OP_2POP
c. OP_DEQUE
d. OP_NIP
9. What is nonce?
a. The transaction ID number
b. A miner ASIC chip array
c. The generator point used in elliptic curve cryptography
d. The number miners run through to generate a correct hash
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. After a hard fork, the emerging two chains are incompatible. True or False?
a. True
b. False
Hint: After adding a new rule to the code, it creates a fork in the blockchain: one
path follows the updated blockchain, and the other path continues along the old path,
hence incompatible with each other. After a short duration, those on the old chain will
realize that their version of the blockchain is outdated and quickly upgraded to the
latest version.
b. Brady bought a car using ‘m’ bitcoins. On delivery, the bitcoins are transferred
from his wallet to the dealer’s wallet.
c. Karan has 180 unspent bitcoins. He sends the equal amount each to Dev and
Tarun one by one
Hint: Double spending is when a person tries to use the same bitcoin for more
than one Transaction knowingly or accidentally.
3. Blocks of a blockchain?
a. Transaction data
b. Hash
c. Time stamp
d. None of the above
Hint: All of a,b,c
4. What are some Bitcoin exchanges available in India: Please select the most
appropriate choice among the options.
a. BuyUCoin
b. ZebPay
c. WazirX
i. a and b
ii. b and c
iii. a and c
iv. a, b and c
Hint: Refer to this post.All of a,b.c are correct.
5. “We can achieve consensus with a single crash failure in a perfect asynchronous
network.” This scenario is ___________?
a. Always true
b. Sometimes true
c. Can’t say
d. Impossible
Hint: As The Impossibility Theorem states Consensus is not possible in a perfect
asynchronous network even with a single crash failure
a. Hash Algorithms
b. Confidentiality
c. Availability
d. Access control for the participants in the blockchain network
Hint: Permissionless blockchain is an open network, e.g. bitcoin, anyone can join,
transact, leave, and rejoin the network whereas permissioned blockchain is a
closed network e.g. Hyperledger. Both networks use the same hash algorithms and
Offer confidentiality and availability.
9. What is an advantage of a permissionless blockchain?
a. It does not use disinterested third parties to secure blocks, as all participants
have a vested interest.
b. It is open to everyone in the world without permission and approval
requirements.
c. It is more resilient against fraud because it uses federated nodes to combat
fraud.
d. Its networks are built by for-profit companies and the working of the network
is guaranteed.
Hint: Refer to the Week 4 Slide
i. TCP
ii. HTTP
iii. HTTPS
a. i, ii, iii
b. Only ii
c. Only i
d. All of the above
Hint: Bitcoin protocol runs over TCP as reliability is required for transactions.
NOC22-CS44: Blockchain and Its Applications
Assignment 5
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. The height of the block is the ____ in the chain between it and the genesis block.
a. Metafiles
b. Hash
c. Log size
d. Number of blocks
2. What is the CLI command used to send ethers after the nodes have been initialized?
a. eth.submitTransaction()
b. eth.sendTransaction()
c. eth.sendIBANTransaction()
d. eth.sendRawTransaction()
3. Which of the following syntax is correct to write data in a smart contract using solidity
a. myContract.methods.store("55").set()
b. myContract.methods.write("55").send()
c. myContract.methods.store("55").send()
d. myContract.methods.write("55").set()
Hint: Please refer to the Week 5 Lecture slides on how to execute smart contract.
4. What is the limitation of using the consensus algorithm Proof of Work (PoW)?
a. A lot of mining power is wasted as only one gets success in mining at a time
b. PoW is used for permissioned blockchain
c. It is used for blockchain mining
d. High transaction throughput
Hint: Please refer to the slide Week 5 slide. The PoW has limitation of wastage of
power and low throughput.
6. Which of the following is/are applicable for PoET(Proof of Elapsed Time) consensus
a. Each participant in the blockchain network waits a random amount of time
b. The first participant to finish becomes the follower for the new block
c. Trusted execution platform and attestation are used to verify that the proposer
has really waited
d. The first participant to finish becomes the leader for the new block.
Hint:POET uses a trusted execution platform, say as Intel SGX and H/W attestation.
Please refer to the slide for details.
7. Proof of Burn consensus algorithms also consider virtual resources or digital coins for
participating in the mining activity?
a. True
b. False
Hint: Proof of Burn consensus algorithms consider virtual resources or digital coins
for participating in the mining activity unlike PoW which uses real resources.
8. 15 ether equals
a. 15X(10 ^ 16) wei
b. 15X(10 ^ 18) wei
c. 15X(10 ^ 6) wei
d. 15X(10 ^ 8) wei
10. What library/API is used for smart contract deployment and invocation from Dapp ?
a. Contract
b. web3
c. admin
d. eth
Hint: web3 is the Collection of libraries that allow you to interact with a local or
remote ethereum nodes
Blockchain and Its Applications
Assignment 6
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. If there are 25 faulty nodes (crash fault) in asynchronous CFT, at least how many
nodes needed to reach consensus
a. 48
b. 49
c. 50
d. 51
Detailed Solution:
2f + 1 = 2*25 + 1 = 50 + 1 = 51
2. In Paxos, a node can have only one role among the three roles at a time. True or
False
a. False
b. True
Detailed Solution:
In typical Paxos implementations, a single processor may play more
than one role at the same time.
3. If there are 25 faulty nodes in, at least how many nodes needed to reach consensus
in the Byzantine Fault Tolerance (BFT) system.
a. 72
b. 76
c. 77
d. 79
Detailed Solution:
f = 25
Total nodes required = 3f + 1 = 75 + 1 = 76
Detailed Solution:
All the options are correct.
Validity: If all correct process proposes the same value v, then
any correct process decides v
Agreement: No two correct processes decide differently.
Termination: Every correct process eventually decides.
Integrity: If all the correct processes proposed the same value v, then any
correct process must decide v. (Same as validity)
5. Can we reach a consensus when there is one commander, one good lieutenant, and
one faulty lieutenant in a Byzantine Generals Problem. Yes, or No?
a. Yes
b. No
Detailed Solution:
One fault.
Total nodes required = 3f + 1 = 3 + 1 = 4. But we have 3 nodes.
Detailed Solution:
RAFT, PAXOS, Byzantine General Model and PBFT, all are synchronous
consensus techniques.
7. Suppose you execute your tasks distributedly from six different systems at six
different locations. For maintaining the consensus among the systems, you are using
the BFT model. You found that one system is permanently failed due to a hardware
fault and another system is compromised by an attacker. Does your system correctly
work at all?
a. No
b. Yes, with the remaining nodes
c. Yes, with all the nodes
Detailed Solution:
In Paxos, Learners do not need to maintain a state of the running
epochs. Therefore, b is False.
9. State machine replication-based consensus is used over permissioned blockchains.
Select the suitable reason(s)?
a. The network is closed, and the nodes know each other, hence state
replication is possible among the known nodes
b. Not need to spend power, time, or bitcoin
c. Machines can behave maliciously, hence consensus in required
d. State machine replication-based consensus is not recommended to use over
permissioned blockchains.
Detailed Solution:
A. and B. are true as nodes know each other and state machine
replication does not need to spend power, time like in Proof of Work.
C. is false because even if machines do not behave maliciously,
consensus is required for crash faults.
D. is false because it is recommended to use state machine replication-
based consensus over permissioned blockchains.
10. The following code snippet from paxos algorithm belongs to which phase?
a. PREPARE-PROMISE
b. PROPOSE-ACCEPT
Detailed Solution:
Refer to Lecture 28 - Paxos. The steps in the code snipped belongs to the
PROPOSE-ACCEPT phase of Paxos.
NOC22-CS44: Blockchain and Its Applications
Assignment 7
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
Detailed Solution:
Refer to Lecture 31: Byzantine Dissemination Quorum:
Intersection: Any two quorums have at least one correct replica in
common.
Availability: There is always a quorum available with no faulty replicas
2. If you have f number of faulty nodes, then you need at least how many replicas to
reach consensus irrespective of crash fault or byzantine fault.
a. 2f + 1
b. 3f + 1
c. f +1
d. 3f
Detailed Solution:
Considering byzantine fault, 3f + 1 replicas are required to reach
consensus. This is greater than 2f + 1 replicas which is enough to
handle crash faults too.
Detailed Solution:
Refer to Lecture 31:
You have f number of faulty nodes – you need at least 2f + 1 quorum in
pbft.
Detailed Solution:
Detailed Solution:
Refer to Lecture 33. The benefits of enterprise blockchains include
reduced transaction time, removal of intermediaries, and new business
models such as IoT integration in supply chain.
9. Suppose there are 5 channels present in a Hyperledger Fabric network, each of them
has access to 3 chaincodes A, B and C. How many containers will run in each peer for
running this system?
a. 5
b. 1
c. 3
d. 15
Detailed Solution:
Per peer 3 containers will be running, that is one for each chaincode.
10. Hyperledger Fabric only allows Proof of Work consensus to be plugged in to ensure a
high degree of trustworthiness. True or False
a. False
b. True
Detailed Solution:
Hyperledger fabric is modular, and the consensus protocol is a pluggable
component. Therefore any other consensus protocol such as PBFT can be
plugged in and used.
NOC22-CS44: Blockchain and Its Applications
Assignment 8
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
2. Running a chaincode in hyperledger fabric internally involves the following steps even if
all the steps are not explicitly done by the user in the latest versions.
i. Instantiation of Chaincode of Channel
ii. Creation of Channel
iii. Configuring Orderer and Peer nodes
iv. Adding members to Channel
v. Installing chaincode on peers
4. Traditional methods for centralized digital identity management do NOT have which of
the following characteristics?
a. Identity holder can easily decide with whom to share the identity and which part
of it
b. Identity theft can occur and remain undetected
c. Restricting components of identity to be revealed to different verifiers is difficult
d. An attacker can capture the presented identity
5. Which of the following statements is/are FALSE regarding PBFT and PoW?
a. PoW can be executed over both public and private blockchain networks.
b. PBFT can be executed over a private blockchain network, but not chosen to be
executed over a public blockchain network in general.
c. PBFT can be generally preferred to be executed for both public and private
blockchain networks
d. PoW can be executed over a private blockchain network but can not be executed
over a public blockchain network
Hint: c,d
6. Which of the following is/are true for Proof Of Work) PoW protocol
a. Generally used in Open environment
b. Scalable
c. Transaction Per second (TPS) is low in general
d. All of the above
Hint: Please refer to slides. PoW works in an open environment with lots of nodes,
scalable and slow in comparison to closed environment protocols in general.
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
Hint:
■ A random user prepares a block
■ Propagate the block through gossiping
■ To validate the block created by the random user(can be valid or adversarial
user), a byzantine agreement is required
■ Once it is found that the block is valid, then it is digitally signed and propagate
the digital signature in the network.
7. Consider the following statement - “Say Alice has generated two Distributed
Identifiers (DID) DID1 and DID2 for her pairwise relationships maintained in
Hyperledger Indy”. Which part of the above statement is false with respect to the
concepts of Hyperledger Indy?
a. Generation of DID by Alice
b. Assignment of SEED to Steward
c. Acceptance of incoming invitation by Alice
d. None of the above
a. I
b. I, II
c. II
d. None of the above
Hyperledger Indy is a public permissioned ledger based registry which is
readable to all but only a group of selected entities can write.
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. If an attacker initially populates the victim node's peer tables with attacker's IP
addresses in blockchain network, this attack is known as:
a. Sybil Attack
b. Eclipse Attack
c. Selfish Mining Attack
d. 51% Attack
2. Which of the following can be used to identify a good blockchain use-case? (Mark
multiple options if applied)
a. Participants
b. Assets
c. Transactions
d. Independent of everything
3. Alice is performing an Eclipse Attack, and If her IP replaces another attacker IP, the
evicted IP is resent and eventually replaced by honest IP. Is this a valid statement?
a. Yes
b. No
5. Alice possesses 5 Bitcoins and initiates two separate transactions with the same
Bitcoin. In which case does the double spending vulnerability occur?
a. Alice pays for a coffee and a book with the same 5 Bitcoins.
b. Alice accidentally sends 6 Bitcoins to a friend.
c. Alice sends 2 Bitcoins to one friend and 3 Bitcoins to another.
d. Alice checks her wallet balance but forgets to confirm the transaction.
6. In a selfish mining attack, discovering more blocks by pool develops a longer lead on
the public chain, and continues to keep these new blocks __________
a. Private
b. Public
7. Which of the following scenarios is NOT a good use case for blockchain technology?
a. A supply chain network where participants require real-time visibility into the
movement and origin of goods.
b. An online voting system aiming to enhance transparency, reduce fraud, and
ensure the integrity of election results.
c. A centralized banking system seeking to improve transaction speed and reduce
costs.
d. A healthcare system aiming to securely share patient records among different
healthcare providers for better coordinated care.
10. Alice places a bulk order for a cryptocurrency, and before it is processed, Bob, who is
a miner, inserts his own buy order with a slightly higher price. In which case does the
front-running attack occur?
a. Alice's order is confirmed first due to network congestion.
b. Bob's order is prioritized and confirmed ahead of Alice's order.
c. Both Alice and Bob's orders are cancelled due to conflicting transactions.
d. The network rejects both Alice and Bob's orders, causing delays in
confirmation.
Blockchain and Its Applications
Assignment 12
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. What of the following Indy transaction inserts a DID record in the Indy ledger
a. INSERT
b. INSERTDID
c. NYM
d. CREATE
2. Ubin project is based on Blockchain and Distributed Ledger Technology (DLT) for
clearing and settlement of payments and securities
a. True
b. False