Local River Stream Node
River Stream Nodes can run remotely or locally depending on the operator’s preferences. The following guide illustrates how to build and run a River Stream Node locally for development purposes. Diagnostic tools to gauge the health of local and remote nodes are also discussed here. It is assumed that the node is free standing and therefore not connected to the River protocol remote node registry on Base.
Running a River Stream Node in Development
Running a River Stream Node from source is easy to do with Go, Docker, and Foundry Ethereum toolkit installed. The following tutorial will show you how to run a River Stream Node with a Postgres backend.
Requirements
- Docker
- Yarn 1.22
- Go 1.22.2 (see
go.work
file for up-to-date version) - protobuf
- Buf tools (see README.md for installation)
- Anvil -
curl -L https://foundry.paradigm.xyz | bash
Setup
Once you’ve installed Docker, Go, protobuf, Anvil, and buf, you can proceed to setup your environment as follows.
Run a River Stream Node Locally from Source using VSCode
There’s a VSCode task in tasks.json that is recommended to be used to multiple local stream nodes with attached postgres and local base, river chains, respectively running in different anvil ports.
Running ~Start Local Dev~
command from the river repo in VSCode will do the following in order:
Check dependency versions
Upgrade Foundry toolkit
Run yarn install
Build protobufs
Start Base Chain in anvil
Start River Chain in anvil
Configure stream nodes
Start stream nodes with and without entitlements (on separate ports)
Start xchain binary
Start protobuf and typescript package watcher
After the command completes, pick a river_node
process running from localhost and run /status
check to see if the node is running in a healthy manner. The following should be returned if the node is healthy:
You can also ping health of nodes using /debug/multi
and /debug/multi/json
endpoints which return html and json respectively. These endpoints return latency connecting to node on loopback address as well as grpc, http and rpc provider health.
Run a River Stream Node in Info Mode against testnet or mainnet
Running a stream node in info mode to obtain diagnostics
If you’d like to run an unattached stream node in info mode to inspect the remote status of nodes in either testnet or mainnet, you can do so by running the following:
Was this page helpful?