ChapterĀ 2
Confirmation Layer State


Contents



2.1 Overview
2.2 State Merkle Tree
2.2.1 In Memory
Projections
2.2.2 In A Relational Database
Queries
Appending
Pruning
2.3 State Database
2.3.1 In-Memory Representation
2.3.2 On-Disk Representation
2.3.3 Peer-to-Peer Catchup



2.1 # Overview

The Espresso GCL state is a partitioned heterogeneous Merkle tree. This means it is a Merkle tree containing several different partitions, each of which represents a different type of state. The root node of the Merkle tree is special, in that each of its children is the root of a different partition of the state. Lower layers of the tree are homogeneous, representing only a single kind of state.

The partitions of the state are:

Accounts

A universal Merkle tree functioning as a key-value map from account addresses to balances

Blocks

An append-only Merkle tree accumulating hashes of headers confirmed by the GCL

Chain configs

A universal Merkle tree functioning as a preimage map, mapping hashes of known chain configs to their preimages

2.2 # State Merkle Tree

2.2.1 # In Memory

Projections

2.2.2 # In A Relational Database

Queries

Appending

Pruning

2.3 # State Database

2.3.1 # In-Memory Representation

2.3.2 # On-Disk Representation

2.3.3 # Peer-to-Peer Catchup