Data Architecture
SHAMap and NodeStore
Develop a complete understanding of how SHAMap and NodeStore interact to ensure the XRPL’s integrity, scalability, and data accessibility.

Module overview
Building on your understanding of the XRP Ledger, this section takes you deep into the data architecture that powers ledger state management, the SHAMap data structure and the NodeStore persistence layer.
You’ll gain a clear view of how data integrity, performance, and scalability are maintained across the XRPL network, from cryptographic proofs of state to persistent storage and node synchronization.
In this module
The XRPL’s ledger state relies on a specialized data structure known as the SHAMap, a hybrid Merkle–Patricia trie.
This structure merges the efficient key-value lookup capabilities of Patricia tries (Practical Algorithm To Retrieve Information Coded In Alphanumeric) with the cryptographic guarantees of Merkle trees.
The XRPL maintains two distinct SHAMaps:
- Account State Tree: Tracks account balances, NFTs, offers, and all account-related data.
- Transaction Tree: Stores transaction history and preserves the complete chain of state transitions.
The transaction tree ensures that every ledger transition is verifiable, the blockchain’s equivalent of a mathematical function applied sequentially: sₙ = f(f(…f(s₀))).
Without this structure, different transaction paths could theoretically lead to the same final state, breaking verifiability.
The SHAMap provides both in-memory access for rapid queries and persistent storage through the NodeStore.
Its Merkle root allows for efficient state comparison and cryptographic proofs of data integrity across nodes.
Learning objectives
SHAMap Fundamentals
Understand the hybrid Merkle–Patricia trie structure and its role in the XRPL.
Ledger Trees
Differentiate between the Account State Tree and the Transaction Tree.
Data Integrity
Explore how SHAMap ensures verifiable state transitions.
NodeStore Architecture
Learn how data is serialized, cached, and persisted.
System Integration
See how consensus, transaction processing, and APIs rely on the NodeStore.
Debugging & Tools
Interpret logs, inspect stored data, and trace ledger reconstruction paths.











