留学生代考 COMP90088 (2022) Tutorial Week 5 Solutions

a. b. c. d. e.
COMP90088 (2022) Tutorial Week 5 Solutions
Bitcoin block arrival time
Given the average rate r = 0.1min−1, the probability Pr(k,t) that k blocks are mined in time t is given by the Poisson pmf:

Copyright By PowCoder代写 加微信 powcoder

(rt)k e−rt Pr(k, t) = k! .
Thus,􏰃∞k=1Pr(k,10min)=1−Pr(0,10min)=1−e−1 ≈0.63. Pr(6, 60 min) = 66 e−6 ≈ 0.16
􏰃∞k=6 Pr(k, 60 min) = 1 − 􏰃5k=0 Pr(k, 60 min) ≈ 0.55
Solving 􏰃∞k=1 Pr(k, t) = 0.5 gives t ≈ 6.9 min. Solving 􏰃∞k=6 Pr(k, t) = 0.5 gives t ≈ 56.7 min. It’s probably best if you use some statistical tool like Python or Mathematica to perform these calculations.
Soft forks and hard forks
Soft fork, since old clients should still validate blocks even if they ignore the certificate. Hard fork once block rewards on the old clients halve.
Soft fork, since such transactions should still be valid to old clients.
Soft fork, similarly.
Hard fork. If SHA-3 pushes some value onto the stack that causes different execution be- haviour of scripts then there could be disagreement between old and new clients.
Hard fork, since old clients are not capable of accepting blocks with more than 20000 signa- tures.
Hard fork, since difficulty is calculated from the time period of 2016 blocks, so new clients will generate different difficulties to old clients.
Mining pool sabotage
P1 receives α1−β of block rewards from directly mining. Of the remaining rewards α2 , P1 1−β 1−β
receives β of them. Thus P1 receives α1−β + β α2 of mining rewards.
For sabotage to be effective, we require the rewards from sabotage to be greater than those
without, i.e. α1−β + β α2 > α1. Note that this makes use of the 10min average block
1−β α2+β 1−β
discovery time in both scenarios, even though the total useful network hashrate is different
between them. Solving the inequality (through WolframAlpha) requires
α2 > β−α1β. α1
For example, P1 with α1 = 0.3 of the network’s hashrate dedicating β = 0.1 (e.g. a third of its hashing power) to sabotage P2 with hashrate α2 > 0.233 is comparatively beneficial to P1.

c. Even though mining pools exist to reduce the variance in mining rewards, the number of valid blocks submitted by an individual pool member is still subject to a Poisson distribution (which has variance equal to the number of valid blocks that that member is expected to have submitted based on their hashrate, which can be estimated from their number of submitted shares). Due to this relatively high variance, honest members may regularly be unfairly punished if the pool’s threshold for statistical significance is not sufficiently low (look up p-values, null hypotheses and the Poisson cdf and think about how this threshold should be set).
d. We note that the total useful mining power is 1 − 2β. P1 is assigned α−β of total block 1−2β
rewards from directly mining. A fraction of this is kept by members of P1, while the rest is sent to saboteurs from P2. Due to symmetry however, that amount sent to P2 is exactly cancelled by the amount taken by P1 from P2 from its own sabotage. Hence when
α−β <α, 1−2β sabotage is not worthwhile. If you solve the inequality for valid values α ≤ 0.5 and β < α, it turns out that sabotage is never worthwhile, and that a loss of α− α−β 1−2β is incurred. For some concrete numbers, two miners each with α = 0.3 dedicating β = 0.1 to sabotage the other will each only make 0.25 of total block rewards. This is an example of an iterated prisoner’s dilemma: in game theory terms, the Nash equilibrium involves these pools sabotaging each other, but this equilibrium is not Pareto efficient. 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com