Ledger entry · Building on the ledger

LedgerHashes

In plain words

LedgerHashes entries hold lists of the hashes, or fingerprints, of earlier ledgers. They let you look up the hash of a past ledger starting from the current one.

Written by zerps in plain words, from the source linked below.
Section
References

What it is

A LedgerHashes entry contains a history of the prior ledgers that came before this ledger version, in the form of their hashes. These entries exist so that you can look up a previous ledger's hash with only the current ledger version and at most one lookup of a previous ledger version. This entry type is not the same thing as the ledger hash, the value that uniquely identifies one ledger version.

Recent history

Every ledger after the genesis ledger has exactly one recent history entry. It contains the hashes of the most recent 256 ledger versions, or fewer if the history is shorter. Whenever a new ledger is closed, the hash of its parent ledger is added. When there are more than 256 hashes, the oldest one is removed.

Previous history

The previous history entries together contain the hash of every 256th ledger version, also called a flag ledger, in the full history. A new entry is created every 65536 ledgers, so each one has the hashes of 256 flag ledgers. The oldest one contains only 255 hashes, because the genesis ledger has ledger index 1. With these entries you can get the hash of any historical flag ledger from its index. From there, that flag ledger's recent history entry gives you the hash of any other ledger.

What it holds

Hashes is a list of up to 256 ledger hashes. LastLedgerSequence is the ledger index of the last entry in that list. Both kinds of entry have the same fields.

How it is made

LedgerHashes entries are modified automatically when a ledger closes, without a transaction or pseudo-transaction. A new genesis ledger has none at all, because it has no ledger history. No flags are defined for these entries.

In the source's words
Lists of prior ledger versions' hashes for history lookup.xrpl.org

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.