Owner: @David Rusu

Reviewers: 🟡@Daniel Sanchez Quiros 🟡@Giacomo Pasini 🟡@Álvaro Castro-Castilla

<aside> 💡

POSTPONED

Some recent findings have raising some doubts about safety of GHOST

We don’t have the capacity right now to resolve the issues so we’ll continue with the longest chain fork choice rule for now.

</aside>

The cryptarchia fork choice rule is an combination of the Ouroborous Genesis fork choice and GHOST.

Definitions

Pseudocode

$\textbf{ghost\_maxvalid\bg}(c{loc}, F, k, s)$ {

$c_{max}\coloneqq c_{loc}$

for $f \in F$ {

$(d_{c_{max}}, d_{f}) \coloneqq \textbf{common\_prefix\depth}(c{max}, f)$

if $d_{c_{max}} \le k$ {

We use the GHOST rule when the forking depth is shorter or equal to $k$

if $\textbf{weight}(d_{c_{max}}^{th}\text{-grandparent}(c_{max})) < \textbf{weight}(d_{f}^{th}\text{-grandparent}(f))$ {

Strict inequality is necessary here to ensure the first seen chain is kept in case of a tie

$c_{max} \coloneqq f$

}

} else {

We use the Ouroboros Genesis chain density rule when forking depth exceeds $k$

if $\textbf{density}(c_{max}, d_{c_{max}} s) < \textbf{density}(f, d_{f}, s)$ {

$c_{max} \coloneqq f$

}

}

}

return $c_{max}$

}