The Bitcoin blockchain stores history of transactions. Blockchain blocks are interconnected via pointer to previous hash.

Meanwhile, the Ripple ledger instead of transactions stores account info such as balances. The Ripple ledger has a ledger number.

Does the Ripple ledger store the history of ledgers 0 to N or does it only store N? Does each Ripple ledger store every account info or just accounts on which transaction occur recently?

2 Answers 2


Ripple ledger stores history of ledgers 0 to N or it stores only N?

That's just a matter of definition. You can define the ledger to be just a single state of the network with a single sequence number. Or you can define the ledger to be every past state of the network as well.

Most commonly, we use the term "ledger" to refer to a single state of the network at a single time.

Each Ripple ledger stores every account info or just accounts on which transaction occur recently?

Again, that's just a matter of definition. Most commonly, we use the term "ledger" to refer to all of the state entries (accounts, offers, trust lines, and so on) that were connected at a particular point in time.

The ledger design is passive. That is, a particular entry can be in ledgers 10,000,000 through 20,000,000 without anything special happening to it and without it requiring any processing as it just sits in the ledger and doesn't do anything.

If a new rippled server starts up with no data at all, it will not begin processing until it reaches some point where it knows every single currently valid/reachable ledger entry. That typically takes about two minutes (because the ledger's structure is specifically designed to make this efficient). At that point, it can process transactions and perform normal functions even though it doesn't have any network history. Of course, it can't tell you what happened in the past.

  • I guess the question here is about information replication from the previous ledger into the new ledger. Every time a new round of consensus is finished the ledger height changes from N to N+1. My question (and I believe the original question) is: the information that is appended and stored contains only the new transactions or it also contains reference to previous balances and accounts, other than the reference to the previous height hash? That is not clear in the answer.
    – Joao Leme
    Dec 31, 2017 at 15:20
  • It also contains references to previous balances and accounts because those didn't change and so they're still there. It passively continue to include them. Jan 1, 2018 at 2:16
  • Thanks David for the response, but it's still not clear. I guess the proper question is: Is the "state tree" broadcasted over the network on every new Ledger, or just the state tree root node hash? Maybe its subject to another question.
    – Joao Leme
    Jan 4, 2018 at 13:09
  • 1
    Every node that is in sync builds the new ledger itself. They confirm the hash of the ledger header which includes the hash of the state tree root node. Any server that for some reason could not build that ledger but wants it will have to fetch the ledger header by hash, then the state tree root by hash, and so on. If they have a recent ledger, the tree branches will quickly lead to a node they already have as they fetch the changed nodes. Jan 7, 2018 at 5:31

From my understanding, the main difference is that with every new ledger Ripple servers provide a Merkle Tree Hash root of the entire "account state" (every account, balances, etc), including the new transactions. This way, nodes can compare the merkle tree hash and make sure they have the current ledger.

Since the current Ledger is validated by the validators signing the root hash, a server node is not required to store every ledger from 0 to N (unless you want to audit the ledger).

Because the merkle tree hash includes all accounts, the server nodes only receive the new transactions and locally update the accounts. Then they generate the root hash and compare with the ones received to make sure they have the current state.

  • I wonder how intensive it is to generate a hash of the entire ledger at every round. Good subject for a new question.
    – Joao Leme
    Jan 6, 2018 at 12:47
  • Here goes the question mentioned on the previous comment (bitcoin.stackexchange.com/q/69258/59247). No answers yet.
    – Joao Leme
    Feb 8, 2018 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.