Skip to content

Create New Project - Reth Mode

Prerequisites

Before creating a Reth mode project, ensure you have:

  1. Reth Archive Node: A fully synced Reth archive node running locally or on your infrastructure
  2. Hardware Requirements: Sufficient disk space and memory for running both Reth and rindexer

1. Create a New Reth Project

The --reth flag enables Reth mode when creating a new project. You can also pass additional Reth configuration arguments after --.

no-code
rindexer new no-code --reth

Example New with Reth

rindexer new no-code --reth
 
Initializing new rindexer project with Reth support...
 
Project Name: RocketPoolETHIndexer
Project Description (skip by pressing Enter): High-performance rETH indexer using Reth
Repository (skip by pressing Enter): https://github.com/joshstevens19/rindexer
What Storages To Enable? (graphql can only be supported if postgres is enabled) [postgres, csv, both, none]: postgres
Postgres Docker Support Out The Box? [yes, no]: yes
 
Reth Configuration:
Data Directory (default: ~/.reth): /data/reth
Chain (default: mainnet) [mainnet, sepolia, holesky]: mainnet
Enable HTTP RPC? [yes, no]: yes
Auth RPC Port (default: 8551): 8551
 
rindexer no-code project created with Reth support with a rETH transfer events YAML template.

2. Reth Configuration in YAML

When you create a project with --reth, the generated rindexer.yaml includes Reth configuration:

name: RocketPoolETHIndexer
description: High-performance rETH indexer using Reth
repository: https://github.com/joshstevens19/rindexer
project_type: no-code
networks:
  - name: ethereum
    chain_id: 1
    rpc: https://mainnet.gateway.tenderly.co  # Fallback RPC
    reth:
      enabled: true
      logging: true  # Show Reth logs in stdout
      cli_args:
        - "--datadir /data/reth"
        - "--http"
        - "--full false"  # Archive mode
storage:
  postgres:
    enabled: true
contracts:
  - name: RocketPoolETH
    details:
    - network: ethereum
      address: "0xae78736cd615f374d3085123a210448e74fc6393"
      start_block: 18600000
      end_block: 18718056
    abi: ./abis/RocketTokenRETH.abi.json
    include_events:
    - Transfer
    - Approval

Key Reth Configuration Options

  • enabled: Enable/disable Reth integration
  • logging: Show Reth logs in stdout (useful for debugging)
  • cli_args: Array of Reth CLI arguments in "flag value" format

Common Reth CLI Arguments

ArgumentDescriptionExample
--datadirReth data directory--datadir /data/reth
--authrpc.jwtsecretPath to JWT secret--authrpc.jwtsecret /secrets/jwt.hex
--authrpc.addrAuth RPC address--authrpc.addr 127.0.0.1
--authrpc.portAuth RPC port--authrpc.port 8551
--fullRun as full node (false for archive)--full false
--chainNetwork to sync--chain mainnet
--httpEnable HTTP RPC--http
--metricsEnable metrics--metrics 127.0.0.1:9001

3. Environment Variables

All Reth configuration can be overridden using environment variables:

# .env file
RETH_DATA_DIR=/data/reth
RETH_JWT_SECRET=/secrets/jwt.hex
RETH_AUTH_PORT=8551
# rindexer.yaml using environment variables
networks:
  - name: ethereum
    chain_id: 1
    rpc: ${FALLBACK_RPC_URL}
    reth:
      enabled: true
      cli_args:
        - "--datadir ${RETH_DATA_DIR}"
        - "--authrpc.jwtsecret ${RETH_JWT_SECRET}"
        - "--authrpc.port ${RETH_AUTH_PORT}"

4. Start the Project

Starting a Reth mode project will:

  1. Start your Reth node, and connect to it
  2. Set up ExEx (Execution Extensions) for reorg-aware streaming
  3. Begin indexing with minimal latency
all services
rindexer start all

5. Performance Benefits

Reth mode provides several advantages over standard RPC-based indexing:

Native Reorg Handling

  • ExEx notifications include reorg information
  • Automatic rollback and reprocessing (coming soon)
  • No missed events during reorgs

Minimal Latency

  • Direct connection to Reth node
  • No network overhead
  • Access to pending transactions

Better Performance

  • Efficient state access
  • Reduced RPC calls

6. Monitoring and Debugging

Enable Reth Logging

Set logging: true in your Reth configuration to see detailed logs:

reth:
  enabled: true
  logging: true  # Enable Reth logs

7. Troubleshooting

Common Issues

Cannot connect to Reth node
  • Ensure Reth is running and fully synced
  • Verify JWT secret is correct
  • Try running reth node separately to see if it works. There might be a problem with the arguments.
Performance issues
  • Monitor Reth resource usage
  • Ensure sufficient disk I/O

Getting Help

For Reth-specific issues:

Next Steps