The Ledger
XRPL Foundation outlines first phase of formal verification
The XRPL Foundation has published the scope and verification approach for a first phase of formal work on xrpld. The phase covers 41 models across serialization, signing and hashing, key derivation, and ledger-tree and header hashing.

A foundational scope
The XRPL Foundation’s formal-verification page describes a first phase of work on xrpld’s underlying data and hashing logic, setting out its scope and how models would be checked against the code. It focuses on the rules that turn transactions and ledger entries into bytes, determine what transaction signatures cover, calculate hashes, and derive the keys used to store ledger entries. The page says every node must compute these elements the same way, and that a defect could split the network.
The work is framed as proofs about models rather than direct proofs of C++: the page says every property is proved in Lean 4 about a model, with each model checked against the C++ implementation. The counts are based on XRPLF/rippled develop at commit 3857ce21, dated 9 October 2026. The page lists 29,548 lines of C++ in scope, spread over 121 files and 41 models.
Four work items
A2a, covering serialized types and encoding, accounts for 17,952 lines across 67 files and 22 models. A2b addresses signing data and hashing, with 4,571 lines across 23 files and 10 models. A2c covers keylets in 1,233 lines across 6 files and 2 models; A11a covers tree, header, and codec hashing in 5,792 lines across 25 files and 7 models.
For A2a, the stated properties include serialization and parsing returning the same object, and a specification of which byte strings are accepted. For A2b, the page says the models cover transaction IDs, signature data, and distinct hash prefixes for different purposes. For A2c, the stated key-uniqueness property assumes sha512Half is collision resistant. A11a includes properties about tree hashes depending on contents and the ledger header hash covering every field. The page says transaction and payment engine work belongs to later phases built on these models.
Checks against the implementation
The page says every model receives FFI cross-validation, comparing the compiled model and C++ code on the same inputs. When the input space is finite and under ten million cases, the described approach runs every case, including length prefixes from 0 to 918,744 and every field ID. The suites are also expected to reach every branch of the functions they cover and catch small deliberate changes; anything they cannot reach or catch is to be listed with a reason.
For A2a, the page describes differential fuzzing: generated byte strings go to C++ parsers running under address and undefined-behaviour sanitisers, as well as to the model. Any disagreement is reduced to a smaller reproducing case. For A2b, A2c, and A11a, the models compute SHA-256, SHA-512, RIPEMD-160, and sha512Half in Lean, with keys, signing data, and tree hashes checked end to end.
Existing work and procurement drafts
The page says Phase 1 builds on Phase 0, which covers the numeric core and verification build. It identifies Common Prefix’s public Lean 4 repository as earlier work on xrpld: Phase 1 uses its number models and adds the encoding layer that the fork does not yet model. The page lists 41 new models for areas including binary encoding, signing data, hashing, keylets, and the SHAMap.
The two versions of the Phase 1 request are both drafts with the same scope and properties to prove. In one, a firm writes the specifications, models, tests, theorem statements, and proofs; in the other, XRPLF supplies the models and tests while the firm reviews them and writes the specifications and proofs. The page treats code-level equivalence and an automated translator as separate options in both versions.
Sources
- Original source XRPL Foundation pages.xrpl.foundation