By adhering to the guidelines outlined in this guide, node operators can contribute to the stability and efficiency of the River Network. Effective node operation not only benefits the individual operator by ensuring optimal node performance but also supports the health and reliability of the entire network.

System Requirements & Dependencies

To run a River Stream Node, an operator will need to run a Node Frontend (FE) and Node Storage layer, postgres database, with a specific network configuration.

Please read the below requirements carefully prior to proceeding with node setup.


Installation

Node FE’s can be installed either from docker with the River public ECR image registry or built from source code.

Installation from Docker


Node FE Environment Variables

River Stream Nodes run expecting certain environment variables to be present in the process environment and set at runtime. Config, which is described in config.go, is injected into the binary at runtime using viper.

For the list of contracts required to run nodes and their addresses, see contracts.

Environment VariablePurposeRequiredTestnet ValueSecret
ARCHITECTCONTRACT__ADDRESSSpaceFactory contract address in Base NetworkYes0x968696BC59431Ef085441641f550C8e2Eaca8BEd-
ARCHITECTCONTRACT__VERSIONContract interface versionYesv3-
BASECHAIN__CHAINIDBase ChainIdYes84532-
BASECHAIN__NETWORKURLBase Chain RPC UrlYeshttps://sepolia.base.orgYes
CHAINSSTRINGList of chainIds and network RPC Urls supportedYessee Cross-chain Requirements-
DATABASE__DATABASEPostgres DB NameYesriver-
DATABASE__EXTRAExtra Postgres OptionsYes?sslmode=disable&pool_max_conns=1000-
DATABASE__HOSTPostgres DB Host UrlYes--
DATABASE__PASSWORDPostgres DB PasswordYes-Yes
DATABASE__PORTPostgres DB portYes5432-
DATABASE__USERPostgres DB usernameYes--
DD_TAGSUsed by Datadog for metrics collectionNoenv: (gamma), node_url:(your complete node url)No
ENTITLEMENT_CONTRACT__ADDRESSEntitlement contract address in Base NetworkYes0x08cC41b782F27d62995056a4EF2fCBAe0d3c266F-
LOG__FORMATLog format optionNotext-
LOG__LEVELDefault log levelNoinfo-
LOG__NOCOLORLogging without colorNotrue-
METRICS__ENABLEDMetrics exporter enabledNotrue-
METRICS__PORTMetrics export portNo8081-
PERFORMANCETRACKING__PROFILINGENABLEDUsed by Datadog for cpu profilingnotrueNo
PERFORMANCETRACKING__TRACINGENABLEDUsed by Datadog for tracingnotrueNo
PORTPort RPC service listens onYes443-
REGISTRYCONTRACT__ADDRESSRiver Registry contract address in River Chain NetworkYes0xf18E98D36A6bd1aDb52F776aCc191E69B491c070-
RIVERCHAIN__CHAINIDRiver Chain chainIdYes6524490-
RIVERCHAIN__NETWORKURLRiver Chain RPC UrlYeshttps://towns-devnet.rpc.caldera.xyz/httpYes
RUN_MODEStream Node Run Mode (full, archive)Nofull-
SKIP_GENKEYSkip generating node ECDSA wallet keypairYestrue-
STANDBYONSTARTStart node in standby modeNofalse-
STORAGE_TYPEpostgres or in-memoryNopostgres-
TLSCONFIG__CERTTLS certificate value for node hostnameYes-Yes
TLSCONFIG__KEYTLS certificate key for node hostnameYes-Yes
WALLETPRIVATEKEYNode ECDSA private key stringYes-Yes

Testnet Values provided above are as of May 2024. New contract addresses can be found in packages/generated/** of river repo.

Environment variables marked as Secret require proper encrypted storage and management. It is up to node operators to choose a secure store for such secrets depending on their runtime operating environment be it cloud or on-premise.

Cross-chain Requirements

CHAINSSTRING environment variable is a comma-separated, colon delimited list of chain ID’s and RPC Urls that is required for nodes to support cross-chain entitlement checks. As of June 2024, the River network must support the following chainIds listed in the below table for testnet, mainnet, respectively.

As an example, using redacted RPC urls from Web3 providers, the CHAINSSTRING environment variable for Mainnet would look like:

1:https://eth-mainnet.g.alchemy.com/v2/$ETHEREUM_API_KEY,8453:https://base-mainnet.g.alchemy.com/v2/$BASE_API_KEY,42161:https://arb-mainnet.g.alchemy.com/v2/$ARBITRUM_MAINNET_API_KEY,137:https://polygon-mainnet.g.alchemy.com/v2/$POLYGON_API_KEY,10:https://opt-mainnet.g.alchemy.com/v2/$OPTIMISM_API_KEY
Do not use public RPC provider urls found on chainlist or elsewhere as these are notoriously unstable. Node Operators are encouraged to provision RPC Urls for high availability for each supported chainId by using custom provisioned provider urls from Alchemy or Infura.

Testnet Cross-Chain Chain Ids Required

On testnet, nodes should support the following chain ids with configured RPC endpoints for cross-chain entitlement checks.

Chain IdNetwork
1Ethereum Mainnet
11155111Ethereum Sepolia
8453Base Mainnet
84532Base Sepolia
42161Arbitrum One
137Polygon Mainnet
10Optimism Mainnet
10200Gnosis Chiado

Mainnet Cross-Chain Chain Ids Required

On mainnet, nodes should support the following 6 chain ids for cross-chain entitlement checks.

Chain IdNetwork
1Ethereum Mainnet
8453Base Mainnet
42161Arbitrum One
137Polygon Mainnet
10Optimism Mainnet
100Gnosis