> For the complete documentation index, see [llms.txt](https://docs.bloxroute.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloxroute.com/eth/streams/newtxs-and-pendingtxs/local-node-validation.md).

# pendingTxs - Local Node Validation

To achieve **maximum performance** when using the `pendingTxs` stream, bloXroute Gateways can leverage **local Ethereum node validation**. This enhancement applies **only** to the `pendingTxs` stream, not to `newTxs`.

#### How It Works

If your Gateway is connected to an Ethereum (or EVM-compatible) node that publishes WebSocket feeds, it can subscribe to:

* `newPendingTransactions`
* `newHeads`

This allows the Gateway to verify transactions locally and optimize performance.

If the node does **not** expose these feeds, the Gateway will still function and stream `newBlocks` and `pendingTxs`, but **latency may increase**.

#### How to Enable WebSocket Feeds

**Step 1: Start your Ethereum node with WebSocket enabled**

```bash
--ws \
--ws.addr <ETH_NODE_IP> \
--ws.port 8546 \
--ws.api eth
```

> Replace `<ETH_NODE_IP>` with the actual IP of your Ethereum node.

If your Gateway and node are on the same machine, use:

```bash
--ws.addr 127.0.0.1
```

**Step 2: Start the Gateway with WebSocket URI**\
Add the following to your Gateway startup command:

```bash
--eth-ws-uri ws://<ETH_NODE_IP>:8546
```

> Use the same IP and port as defined above.\
> For local setups, use:\
> `--eth-ws-uri ws://127.0.0.1:8546`

By enabling this setup, you ensure `pendingTxs` are verified directly via your node, improving stream quality and reducing false positives.


---

# 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.bloxroute.com/eth/streams/newtxs-and-pendingtxs/local-node-validation.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.
