<blockquote>
  <p>Ripple ledger stores history of ledgers 0 to N or it stores only N?</p>
</blockquote>

<p>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.</p>

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

<blockquote>
  <p>Each Ripple ledger stores every account info or just accounts on which transaction occur recently?</p>
</blockquote>

<p>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.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-12-31T15:20:27.280Z
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
CC BY-SA 3.0
2018-01-01T02:16:14.350Z
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.
David Schwartz
CC BY-SA 3.0
2018-01-04T13:09:17.063Z
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
CC BY-SA 3.0
2018-01-07T05:31:52.693Z
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.
David Schwartz
CC BY-SA 3.0
2017-08-28T11:23:07.023Z
2017-08-28T11:23:07.023Z
David Schwartz
<p>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.</p>

<p>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).</p>

<p>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.</p>

CC BY-SA 3.0
2018-01-06T12:47:53.047Z
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
CC BY-SA 3.0
2018-02-08T14:35:51.370Z
Here goes the question mentioned on the previous comment (https://bitcoin.stackexchange.com/q/69258/59247). No answers yet.
Joao Leme
CC BY-SA 3.0
2018-01-06T12:46:14.277Z
2018-01-06T12:46:14.277Z
Joao Leme
<p>The Bitcoin blockchain stores history of transactions. Blockchain blocks are interconnected via pointer to previous hash.</p>

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

<p>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?</p>

<blockchain><utxo-set><ripple-ledger>
Difference between Bitcoin blockchain and Ripple ledger?
Infinity
# Difference between Bitcoin blockchain and Ripple ledger?

(Asked by: username_0 on 2017-08-16)

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?

**Tags:** blockchain, utxo-set, ripple-ledger


---

## 2 answers

### Answer by username_1 on 2017-08-28. Score: 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.

> **Comments:**
> **username_2**: 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.  
> **username_1**: 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.  
> **username_2**: Thanks username_1 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.  
> **username_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.  

---

### Answer by username_2 on 2018-01-06. Score: 2

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.

> **Comments:**
> **username_2**: I wonder how intensive it is to generate a hash of the entire ledger at every round. Good subject for a new question.  
> **username_2**: Here goes the question mentioned on the previous comment (https://bitcoin.stackexchange.com/q/69258/59247). No answers yet.  

---

