diff --git a/.env.sepolia b/.env.sepolia index 384c188..14fbd6a 100644 --- a/.env.sepolia +++ b/.env.sepolia @@ -17,6 +17,8 @@ RETH_BOOTNODES=enode://60809a220201db7adad46b25166c9c5889f811cfd922faf1f9b534b1f # API RETH_HTTP_PORT=8545 RETH_WS_PORT=8546 +RETH_HTTP_API=eth,net,web3 +RETH_WS_API=eth,net,web3 RETH_AUTHRPC_PORT=8551 RETH_AUTHRPC_JWTSECRET=/shared/jwtsecret.key diff --git a/README.md b/README.md index 34a7a1c..57d679d 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,29 @@ GIWA nodes run [op-reth](https://github.com/ethereum-optimism/optimism/tree/main > [!NOTE] > op-geth is no longer supported. It cannot follow GIWA once the Karst hardfork is active. See the [op-geth sunset notice](https://docs.giwa.io/notices/giwa-chain/op-geth-sunset). +#### RPC API namespaces + +The execution client exposes the standard `eth`, `net`, and `web3` namespaces by default for both HTTP and WebSocket RPC. + +You can enable additional namespaces through your `.env.{network}` file: + +```bash +RETH_HTTP_API=eth,net,web3,debug +RETH_WS_API=eth,net,web3,txpool +``` + +If these variables are omitted, the defaults are: + +```bash +RETH_HTTP_API=eth,net,web3 +RETH_WS_API=eth,net,web3 +``` + +Reth also supports `all` and `none`. Additional namespaces such as `debug`, `txpool`, or `miner` should only be enabled when required because they expose extra node functionality. + +> [!IMPORTANT] +> If you previously relied on `debug`, `txpool`, or `miner` being enabled by default, add the required namespaces explicitly to your `.env.{network}` file after upgrading. + ### Sync Configuration Choose one of the following sync strategies depending on your preference. diff --git a/reth/entrypoint.sh b/reth/entrypoint.sh index 3a767d0..df5b8c6 100644 --- a/reth/entrypoint.sh +++ b/reth/entrypoint.sh @@ -14,6 +14,8 @@ PRUNING_MODE="${RETH_GCMODE}" JWT_SECRET="${RETH_AUTHRPC_JWTSECRET}" BOOTNODES="${RETH_BOOTNODES}" MAX_PEERS="${RETH_MAXPEERS:-100}" +HTTP_API="${RETH_HTTP_API:-eth,net,web3}" +WS_API="${RETH_WS_API:-eth,net,web3}" ADDITIONAL_ARGS="" if [[ "$PRUNING_MODE" == "full" ]]; then @@ -33,12 +35,12 @@ exec op-reth node \ --ws.origins="*" \ --ws.addr=0.0.0.0 \ --ws.port="$WS_PORT" \ - --ws.api=web3,debug,eth,net,txpool \ + --ws.api="$WS_API" \ --http \ --http.corsdomain="*" \ --http.addr=0.0.0.0 \ --http.port="$RPC_PORT" \ - --http.api=web3,debug,eth,net,txpool,miner \ + --http.api="$HTTP_API" \ --authrpc.addr=0.0.0.0 \ --authrpc.port="$AUTHRPC_PORT" \ --authrpc.jwtsecret="$JWT_SECRET" \