Algorithm 4
The tree update function, parameterized by q, D and hash functions H(Β·), G(Β·). The inputs are a block tree T and an array of blocks.
function update(T,B)
foreach hs, x, ctri in T
foreach hs 0 , x0 , ctr0 i in B
if ((s 0 = H(ctr, G(s, x))) (H(ctr0 , G(x 0 , ctr0 )) < D)) then
childrenT (hs, x, ctri) = childrenT (hs, x, ctri) U hs 0 , x0 , ctr0 i . Add to the tree.
end if
return T
end function
Algorithm 4 Explained:
To make the concepts of persistence and liveness relevant to the manner in which parties confirm transactions, we slightly modify them. A transaction is βstable' in Bitcoin, for instance, if it is at least k blocks deep in the chain and has the parameter k. On the other hand, for a transaction to be deemed "stable" in GHOST, the subtree rooted at the block containing the transaction must be at least k in size. From this point on, whenever we discuss the longevity or persistence of Bitcoin or GHOST, we'll be referring to the parameterized versions with the corresponding definitions of stability that we just discussed.
Last updated