# Architecture

The core design of Colibri.stateless is composed of two functional components:

1. **Proofer** – Responsible for generating verifiable proofs and encapsulating them in an SSZ-encoded [data structure](https://github.com/corpus-core/colibri-stateless-doc/blob/main/specification/specifications/ethereum-execution-proofs/ethereum-main-proof-request/README.md#c4request). The Proofer can run as a service on a remote server and be queried by the Colibri.stateless client. This setup remains fully trustless: a proof is either valid and verifiable or it fails to match the request. A proof of incorrect data cannot be produced or verified. Alternatively, the Proofer can run locally within the client. In this mode, the client performs the necessary queries and assembles the proofs itself, requiring more network interactions but maintaining full self-containment.
2. **Verifier** – Responsible for validating proofs and extracting the requested blockchain data. The Verifier performs full cryptographic verification of both consensus and execution proofs without depending on a persistent chain state.

{% @mermaid/diagram content="flowchart LR
subgraph Client
V\[Verifier]
end

```
subgraph Prover Service
    P[Proofer Service]
end

subgraph External
    RPC[(Full Node / RPC Source)]
end

V <--> P
P <--> RPC
V <--> RPC" %}
```

A second configuration shows the setup where the Proofer runs locally within the client:

{% @mermaid/diagram content="flowchart LR
subgraph Client
V\[Verifier]
P\[Local Proofer]
end

```
subgraph External
    RPC[(Full Node / RPC Source)]
end

V <--> P
P <--> RPC
```

V <--> RPC" %}

The Verifier does not need to store the sync committee state permanently. However, for performance reasons, it is efficient to cache the most recent sync committee information to avoid reconstructing it for every verification request. Depending on available resources, this cache can be minimized or omitted entirely, allowing a fully stateless operation if required.

This approach enables independent, deterministic verification on any device, eliminating the need to process or store every block header as required by traditional light clients. Colibri.stateless, thus achieves full trustless verification with minimal resource usage and without continuous synchronization.


---

# 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://corpus-core.gitbook.io/specification-colibri-stateless/introduction/architecture.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.
