Skip to content

Running an RPC Node

RPC nodes provide API access to the Tempo network without participating in consensus. These nodes currently observe and sync with the network's latest state.

By default, RPC nodes will be in archive mode, meaning they do not prune historical state.

Quick Start

# Download snapshot (this will help you sync much faster)
tempo download
 
# Run node
tempo node \
  --follow \
  --http --http.port 8545 \
  --http.api eth,net,web3,txpool,trace

Manually downloading snapshots

Daily snapshots for the persistent testnet can be found at https://snapshots.tempoxyz.dev. You can extract them either using tempo download --url <snapshot_url> or downloading them manually and extracting them using curl <snapshot_url> | lz4 -d | tar -xzf -.

Example Systemd Service

sudo tee /etc/systemd/system/tempo.service > /dev/null <<EOF
[Unit]
Description=Tempo RPC Node
After=network.target
Wants=network.target
 
[Service]
Type=simple
User=$USER
Group=$USER
Environment=RUST_LOG=info
WorkingDirectory=$HOME/tempo
ExecStart=/usr/local/bin/tempo node \\
  --datadir <datadir> \\
  --follow \\
  --port 30303 \\
  --discovery.addr 0.0.0.0 \\
  --discovery.port 30303 \\
  --http \\
  --http.addr 0.0.0.0 \\
  --http.port 8545 \\
  --http.api eth,net,web3,txpool,trace \\
  --metrics 9000 \\
 
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=tempo
LimitNOFILE=infinity
 
[Install]
WantedBy=multi-user.target
EOF
 
# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable tempo
sudo systemctl start tempo
 
# Check status
sudo systemctl status tempo
 
# View logs
sudo journalctl -u tempo -f

Monitoring

Once you've set up your node (whether it's with Systemd or Docker), you can verify that it's running correctly using these commands (cast requires installation of Foundry):

# Check service status
sudo systemctl status tempo
 
# Check peer connections (should be non-zero)
cast rpc net_peerCount --rpc-url http://localhost:8545
 
# Check block height (should be steadily increasing)
cast block-number --rpc-url http://localhost:8545
cast block --rpc-url http://localhost:8545
 
# Search logs
sudo journalctl -u tempo -n 1000 | grep -i "error"

In a production setting, you should monitor the Reth metrics port using a tool like Prometheus or Grafana.