About PocketXRP

A node shouldn't need the ledger's whole state tree in RAM to process transactions that touch a small part of it, and it shouldn't need it to sync the whole thing either.

Why

The ledger keeps growing. Stock rippled builds the state tree up in memory as it works, and that in-memory tree is gone when the process stops (the ledger on disk isn't): rebuilding it means finding nodes one by one through a hash table on disk, where a miss can take a 4 KB index read before the node itself. In our test on a Mac, stock rippled 3.4.1's footprint was 15 GB when it finished its first sync.

So keep the tree on disk, read only what a ledger touches, and leave the cold rest alone: a state tree ten times larger, mostly dormant accounts, shouldn't need ten times the memory. PocketXRP is where we're working that out. The node itself uses 75–500 MB; about 2 GB including macOS's file cache is enough to run comfortably, though macOS will cache more when RAM is free and take it back when needed.

Chasing memory limits that look absurd is the point: they expose inefficiencies that plenty of RAM would hide.

How

How it's tested

Besides solo cold syncs on a quiet M3 Mac, we test on Linux inside 1 and 2 GB memory-capped cgroups that count both the node's memory and the file cache. The store runs on latfs, a small filesystem we wrote that delays the reads that reach the disk, so fast storage flatters the numbers less.

Where it's going