# Distributed ledger

A ledger is an [Accounting](/accounting.md) record that contains tokens of a specific kind and is associated with a holder. A distributed ledger is a network of ledgers belonging to different agents, where in one ledger’s entry there is a record of a quantified “obligation”, and in another ledger, there is always a matching entry that records its corresponding quantified “right”. For example, if the entry represented a debt instrument, on one ledger we would have a debit, and on another ledger we would have a credit. The entries on the ledgers connect them forming a network, where the sum of all rights and all obligations equal zero, that is, for every entry in one ledger there is a counter-entry of the same kind and the same amount in another. The ledger presumes that tokens of the same kind are both divisible and additive: they can be infinitely divided into smaller amounts, or added up to a larger amount. The distributed ledger records network’s state changes in a distributed way (without a need for a central state/globally replicated state). Instead of a centralized state / centralized ledger / centralized offer queue, each [Agent](/agent.md) is holding only its own records and replication happens only at connection points i.e. only among the involved parties, not within the entire network. This provides a network topology in which any arbitrary number nodes can fail, but as long as there are other nodes present, exchange can still happen. Resistance to partitioning is important because it allows multiple states to coexist and interact, enabling scalability (partitioning problem arises when there is needs to be a shared global state on a single blockchain managed by a single agent: partitioned chains can never be combined without one network having to rule and the other disappearing). Distributed state offers a different fault tolerance and scalability VS. brute force global state replication. A.k.a a space age tally stick.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://glossary.ecsa.io/distributed-ledger.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
