0

In rippled's API, for example in account_info, we can see that ledger_hash and ledger_index are different from one another. ledger_hash is just a hash of the ledger. However, in this graphic we can see that ledger_index also looks like a hash of the ledger. There doesn't appear to be an entry for ledger_index in the Wiki, so what is the difference between those two?

1 Answer 1

2

The ledger_index is the 256-bit index of a particular entry in the ledger. The ledger's state tree is a hash tree of index/value pairs. Each index is a 256-bit hash of some kind of locator. If the entry is, say, an account root node, the index is a hash of the 160-bit account ID. If the entry is, say, a ripple balance node, the index is a hash of the two accounts the balance is between and the currency identifier.

The ledger_hash is the 256-bit hash of the ledger header, which effectively acts as a hash of the entire ledger.

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.