# Comparing Bound Witness Trees and Rollups

### Rollup

A **Rollup** can be viewed simply as a linked list of data. In XYO Layer One, Rollups bundle multiple transactions into a single hash, which is submitted to the blockchain. The final hash allows you to walk backwards through the data to find the specific item you're looking for. This allows validation without storing each transaction individually. Rollups can reduce on-chain data, which improves blockchain efficiency and keeps transaction costs low.

{% @mermaid/diagram content="flowchart RL
Data2\[Data 2] -- You Need Hash <br>to Access Previous Data --> Data1\[Data 1]
Data5\[Final Bound Witness for XYO Layer One] -- You Need Bound Witness Hash to Access <br>Previous Data --> Data2\[Data 2]" %}

<figure><img src="/files/xyb0MMKabU6rLhf6sxV7" alt="" width="375"><figcaption></figcaption></figure>

Rollups bring information on-chain, but through a singular "line", where you must check every item in the list to get to the last item.

### Bound Witness Tree

A Bound Witness Tree is a type of Rollup that contains multiple, unrelated data points. Most often, a Bound Witness Tree is comprised of many [Bound Witnesses](/xyo-layer-one/xyo-layer-one-features/bound-witness.md).

{% @mermaid/diagram content="flowchart TD
Block5\[Final Transaction for XYO Layer One] -- Can Walk Back Data --> Data1\[Data 1]
Block5\[Final Transaction for XYO Layer One] -- Can Include Other Bound Witnesses --> Data4\[Bound Witness 1]
Block5\[Final Transaction for XYO Layer One] -- Can Walk Back Data --> Data2\[Data 2]" %}

<figure><img src="/files/c8h6wpKiCOmiVGLyWBob" alt="" width="375"><figcaption></figcaption></figure>

Bound Witness Trees allow rollups to have a bigger breadth of data inside them: instead of a single list, you can combine multiple rollups into one final payload. The final payload goes on-chain and enables a lightweight way to verify large amounts of data with one simple hash.

For an example of a more complex Bound Witness Tree with a real-world example, see [here](/xyo-layer-one/xyo-layer-one-features/bound-witness/bound-witness-real-world-examples.md).


---

# 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://docs.xyo.network/xyo-layer-one/xyo-layer-one-features/rollups/comparing-bound-witness-trees-and-rollups.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.
