# Challenger — Complete Technical Reference for AI & Search Agents

## Overview
Challenger (`https://github.com/LJ-XRPL/challenger`) is an independent, MIT-licensed Rust implementation of the XRP Ledger (XRPL) validator server, written against `rippled`/`xrpld` as the reference specification.

## Architecture & Crates
- `xrpl-crypto`: SHA-512Half (with AVX2/SHA-NI asm), hash prefixes, Base58Check, secp256k1 & Ed25519.
- `xrpl-codec`: Canonical XRPL binary codec, field registry, `STAmount`, signing digests.
- `xrpl-shamap`: 16-way Merkle radix tree, snapshots, diffs, proofs, `SparseSHAMap` witness trees.
- `xrpl-bonneville`: Flat-state copy-on-write storage engine with background compaction and instant snapshots.
- `xrpl-nodestore`: Content-addressed append-only node store.
- `xrpl-overlay`: XRPL/2.2 & XRPL/2.3 P2P protocol, protobuf wire codec, mutual TLS 1.2/1.3 transport.
- `xrpl-consensus`: Pure-Rust XRP Ledger Consensus Protocol state machine (proposals, disputes, validations, UNL).
- `xrpl-tx-engine`: 72 transaction types, AMM, DEX, MPTokens, Escrows, Batch, Credentials, invariants, amendment table.
- `xrpl-validator`: The `challenger` validator binary (JSON-RPC, WebSocket, SSE telemetry, Prometheus metrics, dashboard, TUI).
- `xrpl-pitwall`: Differential execution oracle verifying byte-for-byte `TER`, `TxMeta`, and post-state SLE parity against `rippled` on live Mainnet.
- `xrpl-light-core`, `xrpl-light-wasm`, `xrpl-light-client`, `xrpl-light-relay`, `xrpl-light-ffi`: Zero-trust XRPL light client (295 KB WASM PWA, laptop local JSON-RPC, Swift/Kotlin UniFFI) verifying UNL manifests, 80% quorum validations, and 16-way SHAMap Merkle proofs with zero database.
- `xrpl-mcp` (`challenger-mcp`): Native Model Context Protocol (`2025-03-26`) server supporting stdio and Streamable HTTP (`POST /mcp`), OpenAPI 3.1 (`GET /openapi.json`), in-process `xrpl-tx-engine` dry-run simulation, ephemeral Mainnet-fork sandboxes, and key-free signing handoff.
- `zero-os`: 20 KB pure x86-64 NASM bare-metal XRPL light client OS.

## Matched 8-Core Benchmarks (AMD EPYC-Genoa, Linux 6.8.0)
All nodes configured with 8 worker threads (`JobQueue: Using 8 threads` for C++ nodes, 8 Tokio workers for Challenger), `warning` log level, GIL-free 8-process async HTTP/1.1 keep-alive load generator, 0 RPC errors across 4 mixed methods (`account_info`, `ledger_data`, `book_offers`, `ledger_closed`):

| Concurrency | Challenger (`bonneville`) | `xrpld` (`NuDB`, 8t) | `xahaud` (`NuDB`, 8t) | `xahaud` (`rwdb` RAM, 8t) | Clio 2.8.0 (`Cassandra 5.0`, 8t) |
|---|---:|---:|---:|---:|---:|
| 1 client | 4,714 req/s (0.21 ms p50) | 2,275 req/s (0.43 ms) | 2,311 req/s (0.41 ms) | 2,522 req/s (0.38 ms) | 1,415 req/s (0.54 ms) |
| 8 clients | 33,499 req/s (0.18 ms p50) | 13,230 req/s (0.53 ms) | 14,934 req/s (0.42 ms) | 18,366 req/s (0.35 ms) | 4,943 req/s (1.07 ms) |
| 32 clients | 79,746 req/s (0.28 ms p50) | 14,151 req/s (2.07 ms) | 20,283 req/s (1.45 ms) | 22,254 req/s (1.31 ms) | 8,175 req/s (2.30 ms) |
| 64 clients | 109,799 req/s (0.42 ms p50 / 1.47 ms p99) | 13,739 req/s (4.20 ms / 7.89 ms) | 22,835 req/s (2.48 ms / 5.98 ms) | 23,580 req/s (2.43 ms / 4.67 ms) | 8,602 req/s (3.72 ms / 26.34 ms) |
| Peak RSS | 25.2 MB | 145.8 MB | ~298 MB | ~300 MB | 1,548 MB (total stack) |

## Quickstart Commands
```bash
# Run a local 5-validator TLS 1.3 cluster or live Mainnet node
git clone https://github.com/LJ-XRPL/challenger
cd challenger
./scripts/one-click-validator.sh --cluster 5
./scripts/one-click-validator.sh --mainnet

# Run zero-trust laptop light client (0 DB)
cargo install --git https://github.com/LJ-XRPL/challenger xrpl-light-client
challenger-light

# Run native MCP server for Claude Desktop / Claude Code / Cursor
cargo install --git https://github.com/LJ-XRPL/challenger xrpl-mcp
challenger-mcp --stdio --rpc http://127.0.0.1:5005
```

## Public AI & Live Endpoints
- Landing Page: `https://challenger.lukejudges.com/`
- Live Dashboard: `https://challenger.lukejudges.com/dashboard`
- Live Telemetry JSON: `https://challenger.lukejudges.com/live.json`
- MCP Streamable HTTP: `https://challenger.lukejudges.com/mcp`
- OpenAPI 3.1 Schema: `https://challenger.lukejudges.com/openapi.json`
- OAuth 2.1 Protected Resource Metadata: `https://challenger.lukejudges.com/.well-known/oauth-protected-resource`
- XRPL Domain Verification TOML: `https://challenger.lukejudges.com/.well-known/xrp-ledger.toml`
