> For the complete documentation index, see [llms.txt](https://docs.ethgas.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ethgas.com/overview/realtime/run-a-node-for-node-operators.md).

# Run a Node (for Node Operators)

How to run an ethgas-node with flashblocks enabled, so it serves pre-confirmed state at the pending tag. Flashblocks are off by default. Without a flashblocks feed the node behaves as an ordinary Ethe

### Run it

```
git clone https://github.com/ethgas-developer/ethgas-reth.git
cd ethgas-reth
cargo build --release --bin ethgas-node

./target/release/ethgas-node node \
  --chain hoodi \
  --flashblocks-url wss://hoodi.flashblocks.ethgas.com/ws \
  --engine.persistence-threshold 0 \
  --engine.memory-block-buffer-target 0 \
  --http --http.api eth,net,web3 \
  --ws --ws.api eth,net,web3
```

***

### Flashblocks flags

| Flag                                | Description                                                                                                                  | Default    |
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `--flashblocks-url <URL>`           | WebSocket endpoint streaming flashblocks. Alias `--websocket-url`. Setting it enables the feature                            | *disabled* |
| `--max-pending-blocks-depth <N>`    | Pending blocks held in memory                                                                                                | `3`        |
| `--flashblocks.ping-interval <DUR>` | Ping interval, and also the pong deadline. A dead feed is detected after at most two intervals. Requires `--flashblocks-url` | `2s`       |

***

### Flashblocks endpoints

Point `--flashblocks-url` at the endpoint for the network you are running.

| Network | Endpoint                                  |
| ------- | ----------------------------------------- |
| Mainnet | `wss://mainnet.flashblocks.ethgas.com/ws` |
| Hoodi   | `wss://hoodi.flashblocks.ethgas.com/ws`   |

> **These are node infrastructure, not application endpoints.** Your users should query your RPC. Do not point an application at the stream directly, and do not expose it to them.

**Serve WebSocket as well as HTTP.** The flashblock subscriptions need `--ws`. They cannot be served over HTTP.

***

### The two engine flags

`--engine.persistence-threshold 0` and `--engine.memory-block-buffer-target 0` are not cosmetic. They make the node persist blocks immediately rather than hold them in memory, which is what keeps pre-confirmed state anchored to the block it was built on. Running with the defaults risks `pending` silently falling back to the latest confirmed block.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ethgas.com/overview/realtime/run-a-node-for-node-operators.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
