\begin{aligned} \textsf{val} = \\ \textsf{nextIdx} = \\ \textsf{nextVal} = \end{aligned}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}

Initial State:

Add new value \(v=30\):

\begin{aligned} \textsf{val} = \\ \textsf{nextIdx} = \\ \textsf{nextVal} = \end{aligned}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 1 \\ 30 \end{bmatrix}
\begin{bmatrix} 30 \\ 0 \\ 0 \end{bmatrix}

Add new value \(v=10\):

\begin{aligned} \textsf{val} = \\ \textsf{nextIdx} = \\ \textsf{nextVal} = \end{aligned}
\begin{bmatrix} 10 \\ 1 \\ 30 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 2 \\ 20 \end{bmatrix}
\begin{bmatrix} 30 \\ 0 \\ 0 \end{bmatrix}

Add new value \(v=20\):

\begin{aligned} \textsf{val} = \\ \textsf{nextIdx} = \\ \textsf{nextVal} = \end{aligned}
\begin{bmatrix} 10 \\ 3 \\ 20 \end{bmatrix}
\begin{bmatrix} 20 \\ 1 \\ 30 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 2 \\ 20 \end{bmatrix}
\begin{bmatrix} 30 \\ 0 \\ 0 \end{bmatrix}

Add new value \(v=50\):

\begin{aligned} \textsf{val} = \\ \textsf{nextIdx} = \\ \textsf{nextVal} = \end{aligned}
\begin{bmatrix} 10 \\ 3 \\ 20 \end{bmatrix}
\begin{bmatrix} 20 \\ 1 \\ 30 \end{bmatrix}
\begin{bmatrix} 50 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}
\begin{bmatrix} 0 \\ 2 \\ 20 \end{bmatrix}
\begin{bmatrix} 30 \\ 4 \\ 50 \end{bmatrix}

Merge rollup

\pi_D

Indexed Merkle Tree Example

By Suyash Bagad

Indexed Merkle Tree Example

  • 121