# Merkle trees

#### Merkle trees

A Merkle tree is a binary tree of cryptographic hash pointers, hence it is a binary hash tree. In the Lither chain, the Merkle trees are constructed by hashing paired data, particularly the transactions at the leaf level, then again hashing the hashed outputs all the way up to the root node, called the Merkle root.

In the Lither chain, there are three Merkle roots in total as follows:

* stateRoot: It helps maintain the global state.
* transactionsRoot: It tracks and ensures the integrity of all the transactions in a block.
* receiptsRoot: It is the root hash of the receipts trie corresponding to the transactions in a block.

The Merkle tree is tamper-proof. Merkle tree is hashed in with other metadata and included in the header of the subsequent block. Tampering at any level in the tree would not match with the hash stored at one level up in the hierarchy, and also till the root node. It becomes impossible for an adversary to change all the hashes in the entire tree. Thus it guarantees the integrity of the order of transactions.


---

# 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://lither.gitbook.io/lither-whitepaper/blockchain-internals/merkle-trees.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.
