# 3️⃣Algorithm 3

The proof of work function, parameterized by q, D and hash functions H(·), G(·). The input is (x, C).

function pow(x, C)

if C = ε then . Determine proof of work instance

s <- 0

else

hs 0 , x0 , ctr0 i <- head(C)

s <- H(ctr0 , G(s 0 , x0 ))

end if

ctr <- 1

B <- ε

h <- G(s, x)

while (ctr ≤ q) do

if (H(ctr, h) < D) then

B <- hs, x, ctri

break

end if

ctr <- ctr + 1

end while

C <- CB . Extend chain

return C

end function

### Algorithm 3 Explained:

Two essential security characteristics of the Bitcoin backbone protocol; the common prefix and the chain quality property were taken into account in [above and algorithms 2 and 3]. If they remove a few blocks from the tail, the common prefix property assures that two trustworthy participants have the same understanding of the blockchain. On the other hand, the chain quality feature makes sure that chains from honorable players don't include long stretches of hostile blocks. These characteristics are defined as predicates over the random variable created by adding the viewpoints of all par- ties, which is represented by the notation view H(.)Π,A,Z (k, q, z).

Last updated