> For the complete documentation index, see [llms.txt](https://firehose.streamingfast.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firehose.streamingfast.io/firehose/overview/chains/ethereum/optimism.md).

# Optimism

This page provides Optimism (OP Mainnet) specific configuration. First read the [Ethereum general notes](/firehose/overview/chains/ethereum.md) for common information.

## Docker Image

```
ghcr.io/streamingfast/go-ethereum:optimism-<version>-fh3.0
```

[View available versions on GitHub Packages](https://github.com/streamingfast/go-ethereum/pkgs/container/go-ethereum)

The image contains both the Firehose-patched OP Geth binary and `fireeth`.

## Client Binary

| Client                     | Repository                                                                | Source Branch                                                                                              | Releases                                                                                       |
| -------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| OP Geth (Firehose-patched) | [streamingfast/go-ethereum](https://github.com/streamingfast/go-ethereum) | [release/optimism-1.x-fh3.0](https://github.com/streamingfast/go-ethereum/tree/release/optimism-1.x-fh3.0) | [optimism-\*](https://github.com/streamingfast/go-ethereum/releases?q=optimism\&expanded=true) |

## Networks

| Network    | Chain Name         |
| ---------- | ------------------ |
| OP Mainnet | `optimism-mainnet` |
| OP Sepolia | `optimism-sepolia` |

## OP Node Dependency

{% hint style="warning" %}
Optimism requires an OP Node (consensus client) running alongside OP Geth. The OP Node connects to Ethereum L1 for state derivation. Refer to the [Optimism documentation](https://docs.optimism.io/builders/node-operators/rollup-node) for OP Node setup.
{% endhint %}

## Reader Node Configuration

### OP Mainnet

```bash
fireeth start reader-node <apps> \
  --advertise-chain-name="optimism-mainnet" \
  --reader-node-path="geth" \
  --reader-node-arguments="--datadir={node-data-dir} --networkid=10 --op-network=op-mainnet --rollup.sequencerhttp=https://mainnet-sequencer.optimism.io/ --authrpc.addr=0.0.0.0 --authrpc.port=8551 --authrpc.vhosts=* --authrpc.jwtsecret=/path/to/jwt.hex --vmtrace=firehose --state.scheme=path" \
  <other_flags...>
```

### OP Sepolia

```bash
fireeth start reader-node <apps> \
  --advertise-chain-name="optimism-sepolia" \
  --reader-node-path="geth" \
  --reader-node-arguments="--datadir={node-data-dir} --networkid=11155420 --op-network=op-sepolia --rollup.sequencerhttp=https://sepolia-sequencer.optimism.io/ --authrpc.addr=0.0.0.0 --authrpc.port=8551 --authrpc.vhosts=* --authrpc.jwtsecret=/path/to/jwt.hex --vmtrace=firehose --state.scheme=path" \
  <other_flags...>
```

## Key OP Geth Flags

| Flag                     | Description                                     |
| ------------------------ | ----------------------------------------------- |
| `--vmtrace=firehose`     | **Required.** Enables Firehose Protocol output  |
| `--op-network`           | OP Stack network name                           |
| `--networkid`            | Network ID (10 for OP Mainnet)                  |
| `--rollup.sequencerhttp` | Sequencer endpoint for transaction submission   |
| `--authrpc.jwtsecret`    | Path to JWT secret for OP Node connection       |
| `--state.scheme=path`    | Recommended state storage scheme                |
| `--datadir`              | Data directory (use `{node-data-dir}` template) |

## Resources

* [Optimism Documentation](https://docs.optimism.io/)
* [OP Node Setup](https://docs.optimism.io/builders/node-operators/rollup-node)
* [streamingfast/go-ethereum](https://github.com/streamingfast/go-ethereum)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://firehose.streamingfast.io/firehose/overview/chains/ethereum/optimism.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.
