Block - Chain Solution
Block - Chain Solution
Assignment 1
Correct choices are highlighted in Yellow . Give partial marks for partially correct answers.
1. Which one is true for an ideal decentralized solution for business management?
a. A centralized authority should decide the overall trust
b. Everyone should trust and cooperate with each other
c. No one should trust and cooperate with each other
d. No one should trust each other, however they should
cooperate
Hint: In a real-time scenario a decentralized system has multiple stakeholders and the
information submitted by them is not guaranteed to be correct. A collective agreement has to be
established.
2. Which of the statements below is/are true for successful run of decentralized
distributed systems?
a. Network of different players
b. Players must trust each other
c. If they cooperate, the society gets benefitted
d. None of the above
Hint: In a decentralized distributed system, a group of parties who may or may not know or
trust each other. But they should cooperate to reach a collective decision to benefit the system
as whole. So in a decentralized system trusting everyone is not always necessary to reach a
decision..
5. For a 512 bit hash function, the attacker needs to compute how many hash
operations in order to find two matching outputs in the initial round?
a. 2512
b. 2128
c. 2256
d. 260
Hint: If a hash function produces N bits of output, an attacker needs to compute only 2N/2 hash
operations on a random input to find two matching outputs initially. The attacker can use the
output combination again to use in subsequent rounds.
6. Which of the following is a correct statement about a cryptographic hash function?
a. given the same message the hash function would not return the same hash
b. it is not very difficult to generate the original message from the hash
c. a small change in the message, impacts the hash value
d. one can easily find two different messages with same hash
Hint: Refer to the Week 1 slide for the properties of cryptographic hash functions.
Hint: Refer to the Week 1 slide for the properties of cryptographic hash functions.
8. SHA-512 hashing algorithm used by Bitcoin blockchain to determine the hash of a block.
This above statement is True or False.
a. True
b. False
9. For hash computation in SHA-512, what is the size of the block that the
message is divided into?
a. 1024
b. 512
c. 256
d. 1248
Hint: The message is divided into blocks of size 1024 bits, and the output produced is a 512-bit
message digest.
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Let Bob wants to send a long message to Alice. Alice should be able to confirm that it
was indeed sent by Bob, and Bob later cannot deny that he had sent the message.
They also want that nobody else should be able to see its content. Alice and Bob
plan to use public key cryptography and cryptographic hashing techniques. Let the
key pairs of Alice and Bob be (Pub A, Pri A) and (Pub B, Pri B), respectively. Let E, D
and H be the encryption, decryption and hash functions, respectively. Let M denote
the Message and H(M) its digest. Which of the following describes the correct order
of steps to be used by Alice to send the digitally signed message.
i. At Bob: M’ = E(M, K pubA)
ii. At Alice: M = E(M’, K priA)
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, K priB)
vi. Signing the message with his private key: S = E(H(M), KpriB)
vii. M = E(M’, KpubB)
4. Suppose you have 6 data points -- 1 to 6. The post-order traversal of the Merkle Tree
is given by (here 8 means hash of 8, 43 means the combined hash of 4 and 3, and
so on):
a. {12345656, 1234, 5656, 12, 34, 56, 56, 1, 2, 3, 4, 5, 6}
b. {1, 12, 2, 3, 4, 34, 1234, 5, 6, 56, 123456}
c. {1, 2, 12, 3, 4, 34, 1234, 5, 6, 56, 78, 5678, 12345678}
d. {1, 2, 12, 3, 4, 34, 1234, 5, 6, 56, 56, 5656, 12345656}
Hint:
Post order Traversal : {1, 2, 12, 3, 4, 34, 1234, 5, 6, 56, 56, 5656, 12345656}
a. II, III
b. I, II
c. I, III
d. I, II, II
Hint: Due to lack of global timing reference,various kinds of faults it is very difficult to come to
agreement between nodes unanimously.
8. 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.
Hint: Refer to Week 2 Slide, Paxos supports safety but not liveliness.
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
Hint: DLT can even be used to store various types of information, codes, etc., apart
from financial data. Please refer to the slide.
Hint: All of the above are true for general PoW consensus. Please refer to the slide.
Hint: Bitcoin Scripts are simple, compact, stack-based, support cryptography, and not
Turing complete.
Hint: Please refer to the slide. Permissioned blockchain is closed network among
known pre authorized participants and more secure from unknown nodes.
6. What is nonce?
a. The transaction id number
b. A miners ASIC chip array
c. The generator point used in elliptic curve cryptography
Hint: Miners propose new blocks by solving the puzzle i.e., finding the nonce
corresponding to a target block hash, and add that solution as proof.
of solving the challenge to be the leader
7. Which one of the following opcodes is needed to remove the top stack item.
a. OP_POP
b. OP_DEQUE
c. OP_DROP
d. OP_DELETE
Hint: Refer https://en.bitcoin.it/wiki/Script to get to know more opcodes.
9. If the four-byte difficulty bits in hex form are 0x1b0404cb, and the target value is
calculated using X * 2^(Y), what is the values for X and Y respectively,
a. X = 0x0404cb, Y = 0x1b
b. X = 0x0404cb, Y = 0x18
c. X = 0x0404cb, Y = 0xc0
d. X = 0x1b0404, Y = 0xcb
Hint: In difficulty = 0x1b0404cb, the exponent is 1b and coefficient is 0404cb
Target = 0x0404cb * 2^(0x08 * (0x1b - 0x03))
On solving the above equation
⇒ target = 0x0404cb * 2^(0x08 * 0x18)
⇒ target = 0x0404cb * 2^(0xc0)
Hint: Block identifier is calculated by using Double SHA256 algorithm on the current
block header
NOC22-CS44: Blockchain and Its Applications
Assignment 4
Correct choices are highlighted in Yellow . Give partial marks for partially
correct answers.
1. “We can achieve consensus with a single crash failure in a perfect asynchronous
network.” This scenario is ?
a. Always true
b. Impossible
c. Can’t say
d. Sometimes true
Hint: As The Impossibility Theorem states Consensus is not possible in a perfect
asynchronous network even with a single crash failure
Hint: Double spending is when a person tries to use the same bitcoin for more than
one Transaction knowingly or accidentally.
9. 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.
i. TCP
ii. UDP
iii. HTTP
iv. HTTPS
a. i, ii, iii
b. i, iv
c. Only i
d. Only ii
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. 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. Low transaction throughput
d. It is used for blockchain mining
Hint: Please refer to the slide Week 5 slide. The PoW has limitation of wastage of
power and low throughput.
Hint: Refer to the Week 5 Lecture slide for description of PoS. Amount of bitcoin that
the miner holds decides its stake.
3. 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 leader for the new block
c. Trusted execution platform and attestation are used to verify that the proposer
has really waited
d. None of the above.
Hint:POET uses a trusted execution platform, say as Intel SGX and H/W attestation.
Please refer to the slide for details.
4. Proof of Burn consensus algorithms do not 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.
5. 5 ether equals
a. 5X(10 ^ 16) wei
b. 5X(10 ^ 8) wei
c. 5X(10 ^ 6) wei
d. 5X(10 ^ 18) wei
Hint: Ether to Wei converter: https://eth-converter.com/.
6. Which of the following syntax is correct to write data in a smart contract using solidity
a. myContract.methods.store("99").set()
b. myContract.methods.store("99").send()
c. myContract.methods.write("99").send()
d. myContract.methods.write("99").set()
Hint: Please refer to the Week 5 Lecture slides on how to execute smart contract.
8. 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
9. What is the CLI command used to send ethers after the nodes have been initialized?
a. eth.submitTransaction()
b. eth.sendIBANTransaction()
c. eth.sendRawTransaction()
d. eth.sendTransaction()
Hint: Once the transaction is prepared using syntax
var transaction = {from: "0x7dad3a076678a05b2b4e2b93206dbecef0d7b0",
to:"0x35F18427567108F800BDC2784277B9246eED3A" ,
value: Web3.utils.numberToHex(10000000000000000) },
it can be sent using:
web3.eth.sendTransaction(transaction).then(console.log)
10. In which scenario is a smart contract the best solution to the problem?
a. A restaurant manager wants to force customers to pay for their food by
transferring cryptocurrency to his wallet.
b. A chief engineer wants her smart watch to notify her when her partner enters
their front door.
c. A grid company wants to automatically buy power when the price reaches a
predetermined rate.
d. An insurance company wants to pay out a small vendor whenever the case
manager feels it is best to do so.
Hint:
Option a is incorrect. Because Smart contracts do not force another party to transfer
funds.
Option b is incorrect. Because a smart contract is a contract between two or more
parties. Here, there is no second party, hence a smart contract is not suitable.
Option d incorrect. Because, Smart contracts get triggered by events that are
predetermined. The willingness of a company does not automatically trigger the
code.
NOC23-CS44: Blockchain and Its Applications
Assignment 6
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. If there are 24 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*24 + 1 = 48 + 1 = 49
2. In Paxos, a node can have only one role among the three rolesat 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. 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.
4. If there are 24 faulty nodes in, at least how many nodes needed to reach consensus
in the Byzantine Fault Tolerance (BFT) system.
a. 72
b. 73
c. 48
d. 49
Detailed Solution:
f = 24
Total nodes required = 3f + 1 = 72 + 1 = 73
5. Which are the examples of the synchronous consensus techniques?
a. RAFT
b. PAXOS
c. Byzantine General Model
d. Practical Byzantine General Model
Detailed Solution:
RAFT, PAXOS, Byzantine General Model and PBFT , all are synchronous
consensus techniques.
Detailed Solution:
Detailed Solution:
All the options are correct.
Integrity: If all the correct processes proposed the same value v, then any
correct process must decide v. ( Same as validity )
Detailed Solution:
Please refer to the week6 slides. In permissioned blockchain all the
above are true.
9. Which of the following is/are true for smart contracts on a closed network?
a. Contract is stored on a blockchain ledger
b. Once an event is triggered, execute the codes locally on peers
c. Generate transactions as the output of execution of contract
d. The peers of the blockchain network validates the transactions and
transactions are committed after successful validation.
Detailed Solution:
Please refer to the week6 slides. For smart contracts on a closed
network all the above are true.
Detailed Solution:
Refer to Week6 slides - Paxos. In general for basic Multi Paxos if for a round, a
value is accepted, further change requests on that value in that round are
rejected.
NOC23 Blockchain and Its Applications
Assignment 7
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
Detailed Solution:
Please refer to Lecture notes; decentralized system can have unreliable,
partially connected networks with all of the participating parties, may
not be known to all
2. Which of the following is/are true for PBFT (Practical Byzantine Fault Tolerance).
Detailed Solution:
Please refer to Lecture notes, all of the above are true for PBFT.
Detailed Solution:
Please refer to Lecture notes, PBFT uses cryptographic techniques for
signing and authentication.
5. Is Hyperledger Fabric used for invoking smart contracts in public blockchain in its basic
form?
a. True
b. False
Detailed Solution:
Please refer to Lecture notes, Fabric is primarily used for building
permissioned blockchains for organizations. It is an open source project so
anyone can use it to build a permissioned blockchain and deploy smart
contracts on it.
Detailed Solution:
Only Fabric is an enterprise-grade permissioned DLT Platform.
Explorer is a tooling to inspect blockchains.
Burrow is not an enterprise grade DLT since it uses EVM which has
certain limitations in developing smart contracts.
Indy is a specialized DLT for identity management.
Detailed Solution:
Per peer 3 containers will be running, that is one for each chaincode.
Detailed Solution:
Hyperledger fabric is modular, and the consensus protocol is a pluggable
component. Therefore any consensus protocol such as PBFT or Proof of Work
can be plugged in and used.
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.
NOC23-CS44: Blockchain and Its Applications
Assignment 8
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Which of the following is/are true for Proof Of Work) PoW protocol
a. Open environment
b. Scalable
c. Transaction Per second (TPS) is low in general in comparison to
permissioned protocol
d. None of the above
Detailed Solution: Please refer to slides. PoW works in an open environment with
lots of nodes, scalable and slow in comparison to permissioned protocols in general.So
the options a,b,c are true.
2. Which of the following is/are true for scalable witness cosigning protocol?
a. protect authorities and their clients from undetected misuse
b. ensuring that every authoritative statement is validated
c. It can used to sign a message by multiple authorities collectively
d. none of the above
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Which of the following statements is true for Byzantine Fault Tolerant (BFT) protocol.
a. The system should work correctly even in presence of malicious users within
the defined limit of faulty nodes.
b. BFT Protocol is used generally in a permissioned system in its basic form.
c. RAFT is a type of BFT protocol
d. None of the above
Detailed Solution:BFT can perform in the system with malicious nodes within
specified limit, RAFT is Crash Fault Tolerant. So a,b are true. For details please refer
to slides.
4. Which of the following is/are true for Single Sign-On(SSO) based systems.
a. Single identity for various purposes
b. One password to access multiple services
c. Single identity provider can maintain the identity
d. None of the above
7. DIDs only allow a DID controller to prove its control over its DID Document.
a. True
b. False
10. Which of the following steps is/are valid for DID Registration?
a. Register DID
b. Create DID Document
c. Authenticate DID Controller
d. Update DID Document
Detailed Solution: all of the options are required for DID registration. Please
refer to slides for further details.
NOC23-CS44: Blockchain and Its Applications
Assignment 10
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Alice has an account in the Ethereum network and wants to transfer ETH to Bob who
has an account in the bitcoin network. Is it possible to do so?
a. Yes, it is always possible
b. No it is not possible
c. Yes, possible via a trusted third party
d. None of the above
2. One major issue with TTP based Asset Transferis, it is very slow. True or False
a. True
b. False
3. One of the advantages of TTP based Asset Transfer is, it is very secure and no
money has been stolen from here till date. True or False?
a. True
b. False
4. What are some of the issues that exist in Asset Exchange?
a. Synchronisation among sender and receiver networks
b. Agreement of exchange rates
c. Denial of Service
d. All of the above
5. Which of the following are guaranteed in the atomic swap protocol ?
a. All swaps will take place only when all parties conform to the protocol
b. If some parties deviate from the protocol, then all conforming party ends up
worse off
c. No coalition has an incentive to deviate from the protocol
d. All of the above
6. Can Alice send 1 BTC to its own account using timelocked contract.
a. No the target account should be different from the sender
b. Yes she can send to her own account
c. Only possible if she wants to send more than 1 BTC
d. It depends on the time value mentioned in the contract.
9. What is an escrow?
a. Escrow is an agreement in which assets are held and distributed when
conditions are met
b. Escrow is payment for smart contracts
c. Escrow is a permissioned blockchain
d. Escrow is cost of execution of smart contracts
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
Detailed Solution: All of the options a,b, c, and d are true for Aries architecture.
Please refer to the slides for more details.
Detailed Solution: All of the options a,b, and c are risks in blockchain use.
Please refer to the slides for details.
Detailed Solution: In Eclipse Attack, the attacker partitions the network and
populates peer tables with attacker IPs so that the victim node only connects to the
attacker IPs. So all the options are true. Please refer to the slides for more details.
6. Attacker can perform a front-running attack if he/she knows about upcoming
transactions?
a. False
b. True
Detailed Solution: in front running attack attacker utilises the prior knowledge
for manipulation. So option b is correct. Please refer to the slides for more details.
Detailed Solution: All of the above options are true for defining an enterprise-level
blockchain strategy. Please refer to the slides for more details.
Detailed Solution: in all the above case network can suffer and stops
responding.
Correct choices are highlighted in Yellow. Give partial marks for partially correct
answers.
1. Blockchain has been used in many Electronic Health Record based use cases.
a. False
b. True
2. In public blockchain the identity of the participants are not always known.
a. True
b. False
Detailed Solution:All of the above is correct. Please refer to slides for further
details.
Detailed Solution: For federated voting all of the options are correct. Please
refer to slides for further details.
5. Ubin project is based on Blockchain and Distributed Ledger Technology (DLT) for
clearing and settlement of payments and securities
a. True
b. False
Detailed Solution: Ubin project uses Blockchain DLT for payment clearing and
settlement. So option A is true.
9. Which of the following is true about the selection of the random committee in the
Algorand network?
a. There is a dedicated node which chooses the nodes to form the committee
b. A distributed algorithm decides the list of nodes participating in the committee
c. The nodes elect themselves as a committee member by winning a local
computation
d. A specific pool of node choose are given the responsibility of forming the
committee
The nodes elect themselves as a committee member by winning a local
computation which makes the protocol to have good performance while
allowing anyone in the network to participate.