---
description: Introduction to Execution Extensions (ExEx) in Reth.
---

# Execution Extensions (ExEx)

## What are Execution Extensions?

Execution Extensions (or ExExes, for short) allow developers to build their own infrastructure that relies on Reth
as a base for driving the chain (be it [Ethereum](/run/ethereum) or [OP Stack](/run/opstack)) forward.

An Execution Extension is a task that derives its state from changes in Reth's state.
Some examples of such state derivations are rollups, bridges, and indexers.

They are called Execution Extensions because the main trigger for them is the execution of new blocks (or reorgs of old blocks)
initiated by Reth.

Read more about things you can build with Execution Extensions in the [Paradigm blog](https://www.paradigm.xyz/2024/05/reth-exex).

## Architecture

```mermaid
graph LR
    subgraph "Reth Process"
        Reth[Reth Core]

        Reth -->|Notifications| ExEx1[ExEx 1]
        Reth -->|Notifications| ExEx2[ExEx 2]
        Reth -->|Notifications| ExEx3[ExEx N]

        ExEx1 -->|Events| Reth
        ExEx2 -->|Events| Reth
        ExEx3 -->|Events| Reth
    end

    ExEx1 --> External1[External System 1]
    ExEx2 --> External2[External System 2]
    ExEx3 --> External3[External System N]
```

## What Execution Extensions are not

Execution Extensions are not separate processes that connect to the main Reth node process.
Instead, ExExes are compiled into the same binary as Reth, and run alongside it, using shared memory for communication.

If you want to build an Execution Extension that sends data into a separate process, check out the [Remote](/exex/remote) chapter.

## How do I build an Execution Extension?

Let's dive into how to build our own ExEx from scratch, add tests for it,
and run it on the Holesky testnet.

1. [How do ExExes work?](/exex/how-it-works)
1. [Hello World](/exex/hello-world)
1. [Tracking State](/exex/tracking-state)
1. [Remote](/exex/remote)

:::tip
For more practical examples and ready-to-use ExEx implementations, check out the [reth-exex-examples](https://github.com/paradigmxyz/reth-exex-examples) repository which contains various ExEx examples including indexers, bridges, and other state derivation patterns.
:::
