# Setup OP Geth Node

This OP Geth node serves as a non-voting RPC node that enables executing Eth L2 transactions.

* Setting up an OP Geth Node needs OP Geth, Rhea, Hercules, Light Client (AKA Proxy), and Postgres.
* OP Geth has been modified to calculate gas based on the required Solana compute. It retrieves the required gas value by querying Light Client.
* Rhea picks up L2 transactions from OP Geth mempool, composes them into Solana transactions, and submits them to Solana for sequencing.
* Solana's consensus voting nodes execute and vote on the ordering of these transactions. Hercules reads state from Solana nodes and confirms L2 transactions and ordering on OP Geth.

## Machine specs

We recommend using an Ubuntu machine with the specs below. However, macOS is also supported.

{% tabs %}
{% tab title="Minimum" %}
4 cores, 8GB RAM, 1TB storage, 8MBit/sec network bandwidth

Ubuntu, x86\_64, 1 TB SSD
{% endtab %}

{% tab title="Recommended" %}
8 cores, 16GB RAM, 16 cores, 1 TB SSD, 25 MBit/sec network bandwidth

Ubuntu, x86\_64, 1 TB SSD
{% endtab %}
{% endtabs %}

## Run Docker containers with one command

```bash
docker compose up -d
```

## Alternatively, Run Docker containers below sequentially

{% stepper %}
{% step %}

#### Postgres

```bash
docker compose up -d postgres_rome
docker logs postgres_rome -f
```

Wait for the logs print out "database system is ready to accept connections".
{% endstep %}

{% step %}

#### Apply Migrations

```bash
docker compose up apply_migrations
```

{% endstep %}

{% step %}

#### Light Client

Light Client provides an Ethereum interface to access Solana state.

This includes providing gas estimates to Geth.

```bash
docker compose up -d proxy_rome
docker logs proxy_rome -f
```

Wait for the logs print out "Starting the RPC server at 0.0.0.0:9090".
{% endstep %}

{% step %}

#### Geth

Geth is the rollup client that accepts and executes Eth L2 transactions, and provides transaction results to the user. It is a non-voting RPC node.

```bash
docker compose up -d geth
docker logs geth -f
```

Wait for the logs print out "HTTP server started".
{% endstep %}

{% step %}

#### Rhea

Rhea takes rollup transactions from Geth, packages them as Rome Solana transactions, and submits them to Solana for sequencing.

```bash
docker compose up -d rhea
docker logs rhea -f
```

Wait for the logs to print out "Polling: <http://geth:8545>".
{% endstep %}

{% step %}

#### Hercules

Hercules reads state from Solana nodes and confirms L2 transactions and ordering on OP Geth.

```bash
docker compose up -d hercules
docker logs hercules -f
```

Wait for the logs to print out "SolanaBlockLoader is in sync with Solana validator".
{% endstep %}

{% step %}

#### Deposit UI

Deposit UI enables users to deposit and withdraw SOL in exchange for rSOL that is used for gas payment on Rome.

```bash
docker compose up -d depositui
docker logs depositui -f
```

{% endstep %}

{% step %}

#### Nginx

```bash
docker compose up -d romenginx
docker logs romenginx -f
```

Wait for the logs to print out "Configuration complete; ready for start up".
{% endstep %}
{% endstepper %}

## Restart services if needed

```bash
docker compose down -d
```

```bash
docker compose up -d
```

## Docker containers overview

The docker containers you ran are listed below.

| Docker Container  | Purpose             |
| ----------------- | ------------------- |
| proxy\_rome       | Light Client        |
| geth              | OP Geth             |
| rhea              | Rhea                |
| hercules          | Hercules            |
| postgres\_rome    | Postgres database   |
| apply\_migrations | Postgres migrations |
| deposuitui        | Deposit UI          |
| romenginx         | Nginx Proxy         |


---

# 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.rome.builders/legacy/rome-l2-setup/setup-your-l2/setup-op-geth-node.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.
