0

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?

  • 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 Jan 8 '18 at 17:43
1

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 :)

  • 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 Jan 10 '18 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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