pendingTxs - Local Node Validation
Last updated
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.
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.
Step 1: Start your Ethereum node with WebSocket enabled
--ws \
--ws.addr <ETH_NODE_IP> \
--ws.port 8546 \
--ws.api ethReplace
<ETH_NODE_IP>with the actual IP of your Ethereum node.
If your Gateway and node are on the same machine, use:
--ws.addr 127.0.0.1Step 2: Start the Gateway with WebSocket URI Add the following to your Gateway startup command:
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.
Last updated
--eth-ws-uri ws://<ETH_NODE_IP>:8546