Skip to content
Paxeer X

Storage layer

Follow every block down to its hash

PaxDB is where each Paxeer X node keeps state, history and receipts, and commits one hash per block.

Surface

Layer 1

Active state, committed block by block

Memiavl keeps the Merkleized AVL tree in memory and writes only each block's changeset, so a node commits quickly without leaving the tree Cosmos chains use.

Linework of ledger rows in rhythm with one blue mark, suggesting state committed in order.
Memiavl
A fork of MemIAVL from Cronos. The tree sits in memory and on disk as memory-mapped flat files. Speed drops when state grows much larger than memory.
FlatKV
A second commitment backend with incremental LtHash integrity checks. A composite store routes each module’s state between it and memiavl.
Write mode
Moves state in stages, so an operator can migrate at a measured pace between the two end points.
  1. 01

    EVM state first

    The first stage moves EVM state.

  2. 02

    Other modules except bank

    The second stage moves the remaining modules, bank excepted.

  3. 03

    Bank last

    The final stage moves bank.

Layer 2

A hash on one side, history on the other

The design follows Cosmos store v2 (ADR-065): a state commitment backend for hashes and proofs, and a separate state store for raw versioned pairs.

Sample

  1. BlockState commitmentApp hash
  2. Height NHistorical state storeValue at that height
  3. Transaction hashReceipt storeOne receipt

State commitment

Produces the root app hash that validators compare when they commit, and serves proofs for retained heights where the chosen backend supports them.

Historical state store

Versioned key and value pairs let you read state as of an earlier block without replaying the chain. PebbleDB is the default engine; RocksDB is available with its build tag.

Receipt store

Execution results are indexed by transaction hash and cached. Receipts default to PebbleDB, and retention follows the node's minimum-retain-blocks setting.

Layer 3

Write first, so a restart loses nothing

Every change is recorded in the write-ahead log before it is relied on. On restart the node loads a snapshot and replays the log after it.

Sample

  1. Block
  2. Log
  3. Snapshot
  4. Crash
  5. Load snapshot
  6. Replay log
  7. State restored

Log as changelog

The commitment layer uses the log as its changelog, and snapshot retention decides how far back the log must reach. The operator tool can also scan the changelog to recover PebbleDB data.

Bounded write queue

With a write buffer configured, commits queue their writes and wait only when the bounded queue is full.

A figure seen from behind walks down a dim server aisle between racks.

Layer 4

The engines and tools at the bottom

PebbleDB is the default engine, with RocksDB and LittDB beside it. The paxdb tool lets operators look at what is on disk.

Dump and size
Dump stores and report state size.
Prune
Prune at a given height.
Replay
Replay the changelog and report FlatKV migration status.
Benchmark
Run read, write and iteration benchmarks.

Layer 5

A hash, written once, refused if changed

The hash vault writes each height's block hash to disk, waits until it is durable and refuses a different hash for the same retained height.

Mismatch halts the node
A human must resolve it.
Production forces fsync
Hashes must be 32 bytes.
Proofs for retained heights
A proof lets someone check a value belongs to committed state. Historical proofs are guarded by an in-flight limit, a rate limit and a burst setting.

Sample

  • Height
  • Hash32 bytes
  • Durable
Second hashMismatch, halt
  • 32 bytesHash length
  • 1 and 1 per secondDefault proof limits

Bottom layer

One hash summarizes all state

For every block, PaxDB produces the state commitment that validators compare when they commit.

Light linework of binary characters in orbit around one blue point, standing for a single hash.
Run a node