> For the complete documentation index, see [llms.txt](https://docs.ainetwork.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ainetwork.ai/ain-blockchain/ai-network-design/blockchain-database/states.md).

# States

AIN blockchain has tree-structured state models shared to all peers in the network. State consists of a collection of key-value pairs.

The state of the blockchain-database is determined by both the total set of transactions which have been added to blocks in the blockchain and all valid transactions in the transactions-pool which have not yet been added to blocks. This state determines what subsequent transactions are allowed, as well as containing information on all previous transactions and blocks that have occurred up to the current state.

![](/files/-LsP9WT0GAoQ_5nyrNKZ)

Figure 1: Each new transaction builds upon the blockchain-database state that was left by the previous transaction. Each new transaction request is automatically assigned an ID and a nonce which is a +1 increment from the previous transaction. Additional transaction fields (gas, parentTxID. etc,) were omitted for space. <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ainetwork.ai/ain-blockchain/ai-network-design/blockchain-database/states.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
