<p>It's my understanding that if a transaction set is voted as valid during an SCP round, that transaction is applied to the "last closedledger".  The new state of the ledger now becomes the "last closedledger" and the process repeats.  So you can think of voting as modifying a big, shared global state.</p>

<p>E.g. if the last current ledger shows <code>Foo: 1</code> and the transaction is <code>+1 to Foo</code>, when the nodes ratify this transaction one is added to <code>Foo</code> and the ledger state moves to <code>Foo: 2</code>.</p>

<p>The ledgers are "linked" via a cryptographic hash so that they form a chain and you could verify the hashes match...but my understanding is that there's no real need to keep historical ledgers around other than for historical book-keeping/archival purposes.  </p>

<p>Consensus is reached through the SCP voting algorithm rather than verifying cumulative hashes (proof of work).  So the current state is valid because it's been voted on being valid, and there's no need to do the whole "validate the universe" sync that happens with proof-of-work blockchains.  I'm assuming that when new nodes join, they just bootstrap themselves from nodes in their trusted quorum slice and there's not really any "verification" going on</p>

<p>It scales because, while you need an entry for all existing accounts, you really only need the <em>current</em> ledger rather than all previous permutations too.</p>

<p>Obligatory disclaimer: new to SCP myself, not a developer on the project but have been reading the whitepaper, may be wrong :)</p>

CC BY-SA 3.0
2018-01-10T07:34:15.700Z
yes, I believe you're right. I'm annoyed at how the term ledger is used to describe both the block and the block-chain itself. if the ledger is the aggregate of all the 'closed-ledgers', then scalability is not an issue: each block contains only the recent-most txs.
FuzzyAmi
CC BY-SA 3.0
2018-01-09T23:29:27.477Z
2018-01-09T23:29:27.477Z
Zach
<p>So, I'm new to Stellar and trying to make sense of the (somewhat) confusing terminology here. It sounds like a Ledger is like a block in Bitcoin, in the sense that it opens and closes every so often. </p>

<p>A block in Bitcoin only holds the list of bitcoin transactions that were made in the last iteration, which is why you need to track all the blocks to know the complete state of the world (in Bitcoin). However -   </p>

<p>According to the docs, </p>

<blockquote>
  <p>A ledger represents the state of the Stellar universe at a given point in time. It contains the list of all the accounts and balances, all the orders in the distributed exchange, and any other data that persists.</p>
</blockquote>

<p>so, if that's true, is this scalable? how?</p>

CC BY-SA 3.0
2018-01-08T17:43:41.363Z
Bitcoin blockchain also stores the state of all transactions and all addresses used at least once. I suspect that cited text describes similar solution.
Michał Zabielski
<stellar>
Does a Stellar ledger contain all the state of the world? How does it scale?
FuzzyAmi
# Does a Stellar ledger contain all the state of the world? How does it scale?

(Asked by: username_0 on 2018-01-08)

So, I'm new to Stellar and trying to make sense of the (somewhat) confusing terminology here. It sounds like a Ledger is like a block in Bitcoin, in the sense that it opens and closes every so often.

A block in Bitcoin only holds the list of bitcoin transactions that were made in the last iteration, which is why you need to track all the blocks to know the complete state of the world (in Bitcoin). However -

According to the docs,

> A ledger represents the state of the Stellar universe at a given point in time. It contains the list of all the accounts and balances, all the orders in the distributed exchange, and any other data that persists.

so, if that's true, is this scalable? how?

**Tags:** stellar

> **Comments:**
> **username_1**: Bitcoin blockchain also stores the state of all transactions and all addresses used at least once. I suspect that cited text describes similar solution.  

---

## 1 answers

### Answer by username_2 on 2018-01-09. Score: 1 | Accepted answer

It's my understanding that if a transaction set is voted as valid during an SCP round, that transaction is applied to the "last closedledger". The new state of the ledger now becomes the "last closedledger" and the process repeats. So you can think of voting as modifying a big, shared global state.

E.g. if the last current ledger shows `Foo: 1` and the transaction is `+1 to Foo`, when the nodes ratify this transaction one is added to `Foo` and the ledger state moves to `Foo: 2`.

The ledgers are "linked" via a cryptographic hash so that they form a chain and you could verify the hashes match...but my understanding is that there's no real need to keep historical ledgers around other than for historical book-keeping/archival purposes.

Consensus is reached through the SCP voting algorithm rather than verifying cumulative hashes (proof of work). So the current state is valid because it's been voted on being valid, and there's no need to do the whole "validate the universe" sync that happens with proof-of-work blockchains. I'm assuming that when new nodes join, they just bootstrap themselves from nodes in their trusted quorum slice and there's not really any "verification" going on

It scales because, while you need an entry for all existing accounts, you really only need the *current* ledger rather than all previous permutations too.

Obligatory disclaimer: new to SCP myself, not a developer on the project but have been reading the whitepaper, may be wrong :)

> **Comments:**
> **username_0**: yes, I believe you're right. I'm annoyed at how the term ledger is used to describe both the block and the block-chain itself. if the ledger is the aggregate of all the 'closed-ledgers', then scalability is not an issue: each block contains only the recent-most txs.  

---

