Run an archive node
Overview
This guide demonstrates how to run an archive node on the Saigon testnet using Docker.
Before you start
Docker
Install Docker Engine and the Docker Compose plugin:
Run the node
-
Set up directories:
mkdir -p ~/ronin/docker
cd ~/roninCreate a directory for chain data:
mkdir -p chaindata/data/ronin
-
In the
docker
directory, create adocker-compose.yml
file with the following configuration:version: "3"
services:
node:
image: ${NODE_IMAGE}
stop_grace_period: 5m
stop_signal: SIGINT
hostname: node
container_name: node
ports:
- 127.0.0.1:8545:8545
- 127.0.0.1:8546:8546
- 30303:30303
- 30303:30303/udp
- 6060:6060
volumes:
- ~/.ronin/chaindata:/ronin
environment:
- SYNC_MODE=full
- PASSWORD=${PASSWORD}
- NETWORK_ID=${NETWORK_ID}
- RONIN_PARAMS=${RONIN_PARAMS}
- VERBOSITY=${VERBOSITY}
- MINE=false
- GASPRICE=${GASPRICE}
- ETHSTATS_ENDPOINT=${INSTANCE_NAME}:${CHAIN_STATS_WS_SECRET}@${CHAIN_STATS_WS_SERVER}:443This compose file defines the
node
service that pulls a Ronin node image from the GitHub Container Registry. -
In the
docker
directory, create an.env
file and add the following content, replacing the<...>
placeholder values with your information:# The name of your node that you want displayed on https://ronin-stats.roninchain.com/
INSTANCE_NAME=<INSTANCE_NAME>
# The latest version of the node's image as listed in https://docs.roninchain.com/validators/setup/upgrade-validator
NODE_IMAGE=<NODE_IMAGE>
# The password used to encrypt the node's private key file
PASSWORD=<PASSWORD>
NETWORK_ID=2021
GASPRICE=20000000000
DEPLOYMENT=test
VERBOSITY=3
CHAIN_STATS_WS_SECRET=xQj2MZPaN72
CHAIN_STATS_WS_SERVER=ronin-stats-ws.roninchain.com
GENESIS_PATH=testnet.json
RONIN_PARAMS=--gcmode archive --http.api eth,net,web3 --txpool.pricelimit 20000000000 --txpool.nolocals --discovery.dns enrtree://AJCNIAXQIPO55NW3QE2NUBBDMPYZDOQUCAEUS65NHQFMUUFES5KOW@saigon.nodes.roninchain.com -
Start the node:
cd ~/ronin && docker-compose up -d
This command pulls a Ronin node image and starts the service you defined.
-
After a few minutes, check the status of your node on the Ronin Network Status page, the Testnet section. If it's green, the node is connected and up to date with the network.