Distributed Ledger Technology, Cryptocurrency and E-Payment
Take-home assignment (Winter 2021)
This is an open-book individual assignment. You may use the course material to answer the questions; however, you must NOT collaborate with anyone or seek direct answers to the questions online
Question 1 [5 pts]. In Bitcoin, suppose a block contains an nBits field of 0x170DA862.
1. What is the resulting target value for the mining puzzle? Show intermediate calculations.
2. How many hashes a miner is expected to compute before solving the puzzle for this block?
Question 2 [10 pts]. In the Bitcoin blockchain, the block header contains a hash of the Merkle root that includes all transactions from the current block. Instead, we want to replace the Merkle root by a
simple digest of all transactions concatenated together. In other words, replacing the Merkle root by h defined as h = SHA256(TX1|TX2|…|TXn) where ¡®|¡¯ denotes concatenation. Explain why this change would negatively impact performance. In particular, consider updating the coinbase transaction during the mining process, and verifying whether a transaction is included in a block.
Question 3 [10 pts]. To estimate the probability of finding a hash value with certain characteristics, we assumed that the hash function (e.g., SHA256) acts as a random function: given an input value, each
bit of the output has a 50% chance to be either 0 or 1. Let¡¯s now consider a hash function H that has 48% chance to output a 0 (and 52% to output a 1) for each output bit, independently of each other. If Bitcoin¡¯s puzzle used H instead of SHA256:
1. Would the puzzle be easier or harder to solve? Justify.
2. What would be the expected number of hashes to find a solution given a target threshold of 2180? Show intermediate calculations.
Question 4 [5 pts]. Suppose the Bitcoin Core development team decides to replace ECDSA with SPHINCS, a post-quantum digital signature algorithm that cannot be easily defeated by (hypothetical) quantum computers. The team releases an update of the software that only considers blocks mined after June 2021 to be valid if transactions are signed with SPHINCS instead of ECDSA.
1. What type of fork will this change create?
2. Describe the resulting consequences on the Bitcoin ecosystem.
Question 5 [5 pts]. If you clone the source code of Bitcoin Core, rename Bitcoin (currency: BTC) to
PolyUCoin (currency: PUC), and start from a new genesis block, does 1 PUC = 1 BTC, i.e., is the value of a PolyUCoin the same as the value of a bitcoin? Explain why.