Challenger Lakehouse vs. xrpla: Random-Access XRPL History on R2
Storing all 13 years of XRPL Mainnet history in a full-history rippled node takes 25–30 TB of NVMe disk. xrpla solved cold archival by compressing history into ~1.4 TB of bulk download chunks. Challenger Lakehouse (challenger-archive) takes the next step: it repacks verified xrpla history into ~1.95 TB of random-access CHALPACK v3 files on Cloudflare R2 (~$29/mo, $0 egress) so any edge worker, wallet, or stateless relay can read any ledger or transaction from 2013 to today in a single 20 KB HTTP Range request.
xrpla is an essential public good for XRPL and was our initial verified bootstrap source. The two projects solve different problems: xrpla is optimized for cold bulk download; Challenger Lakehouse is optimized for live millisecond RPC queries from Cloudflare Edge. Now that challenger-archive is open-source, new operators can zero-trust backfill their own bucket from either xrpla bundles (--from-xrpla) or any existing public Challenger Archive (--from-archive).
1. Why Challenger Lakehouse Is Slightly Larger Than xrpla (and Why That's the Point)
When we finished packing 108.7 million Mainnet ledgers into R2, the first question was obvious: why is Challenger Lakehouse ~1.95 TB when xrpla's raw archive is smaller? The answer comes down to three deliberate trade-offs that cost ~$5–$7/month in R2 storage and buy sub-millisecond random access:
- Per-ledger random access vs. giant solid blocks:
xrplacompresses tens of thousands of ledgers together in solid multi-gigabyte streams. Solid compression squeezes out extra cross-ledger repetition, but you cannot read ledger#72,314,500without downloading and decompressing gigabytes first. Challenger Lakehouse compresses each ledger independently inside a 1,000-ledger.cpackfile with a binary offset table in the footer, so an edge reader fetches just ~15–25 KB via an HTTP Range request. - Edge-speed decompression (
zstd -6+ trained dictionary): Instead of slow archival compression, we trained a 112 KB XRPL-specific dictionary (xrpl-v1.zdict) and compressed every ledger atzstdlevel 6 (~2.8×–3.0× compression). Decompression runs at ~1,500 MB/s in Rust and WASM (sub-millisecond per ledger) without blowing Worker CPU budgets. - Embedded lookup indexes: Alongside
ledgers_v3/, the bucket storestx_idx_v3/(~52 GB of 12-byte tx-hash fingerprints) andacct_idx_v3/(~12 GB of RoaringBitmaps) sotxandaccount_txqueries jump straight to the right pack instead of scanning history.
2. Side-by-Side: rippled Full-History vs. xrpla vs. Challenger Lakehouse
| Dimension | rippled Full-History |
xrpla Archive |
Challenger Lakehouse (R2) |
|---|---|---|---|
| Primary job | Live node + local history DB | Cold bulk archival & bootstrap | Live random-access edge queries |
| Total storage (108.7M ledgers) | 25 – 30 TB NVMe | ~1.4 TB solid chunks | ~1.95 TB on Cloudflare R2 |
| Read 1 historical ledger | Fast locally (requires 30 TB host) | Must stream/decompress GB chunk | 2 HTTP Range reads (~32 KB total) |
| Tx & account indexes | Local SQLite / NuDB | External / build after download | Included (tx_idx_v3 + acct_idx_v3) |
| Verification | Full replay / trusted peer | Published hashes | Header-chain verified (LWR\0 parent_hash) |
| Monthly infra cost | $400 – $1,500+ / mo per region | Self-hosted / mirror bandwidth | ~$29 / mo ($0 global egress) |
3. Zero-Trust Repacking & Parallel Fleet Backfill
challenger-archive does not blindly trust upstream archive files. As each xrpla chunk streams in, the packer verifies every ledger's canonical LWR\0 header hash and parent_hash continuity, extracts transaction fingerprints and account bitmaps, compresses each ledger with xrpl-v1.zdict, and writes three immutable objects to R2: ledgers_v3/<base>.cpack, tx_idx_v3/<base>.tidx, and acct_idx_v3/<base>.aidx.
Because every 1,000-ledger pack is self-contained and idempotent (workers skip packs already present in R2), we sharded the entire 13-year backfill across four machines simultaneously: hermes, two auto-reaped Hetzner burst VMs, and a 32-thread Mac Pro running 18 workers in parallel. Combined throughput hit ~2,730 ledgers/sec (~44 MB/s compressed, ~130 MB/s raw) even through the heaviest 2020–2023 NFT/DEX ledgers, completing 108.7 million ledgers in a single day.
# Option A: Zero-trust mirror from an existing public Challenger Archive
challenger-archive \
--from-archive https://archive.lukejudges.com \
--from 50000001 --to 70000000 \
--pack-size 1000 --workers 10
# Option B: Stream & verify directly from xrpla bundles
challenger-archive \
--from-xrpla --from 50000001 --to 70000000 \
--dict xrpl-v1.zdict \
--zstd-level 6 --pack-size 1000 --workers 6 \
--progress-file progress.json
4. What This Unlocks for the Global Mesh
Stateless relays across EU, US-East, US-West, APAC, and GCC stay at ~40 MB of RAM with zero disk state. Live tip traffic (account_info, book_offers, fee, submit) goes straight to XRPL P2P peers in ~5 ms; historical lookups from 2013 to today fall back to a single immutable R2 lakehouse served from Cloudflare Edge with $0 egress. No relay ever needs a 30 TB NVMe array.
Inspect the Live Manifest
Served straight from Cloudflare R2 via the ARCHIVE Worker binding:
curl -s https://mesh.lukejudges.com/archive/manifest
Explore the Rust Crate
Full packer, dictionary trainer, header-chain verifier, and R2 uploader live in open source:
crates/challenger-archive on GitHub →
Read Post #03: Building a Global Zero-Trust XRPL Mesh →