Author(s): BK | E&N/Braindexer and man4ela | catapulta.eth
System Requirements
CPU
OS
RAM
DISK
8 Cores (Fastest per core speed)
Debian 12/Ubuntu 22.04
16 GB
2TB+ (SSD or NVME preffered)
Moonbeam tracing node has a size of 2TB on December 23, 2024
Run a tracing node
Geth's debug and txpool APIs and OpenEthereum's trace module provide non-standard RPC methods for getting a deeper insight into transaction processing. Supporting these RPC methods is important because many projects, such as The Graph, rely on them to index blockchain data.
To use the supported RPC methods, you need to run a tracing node. This guide covers the steps on how to setup and sync a tracing node on Moonbeam using Docker.
sudoapt-getinstalldocker-cedocker-ce-clicontainerd.iodocker-buildx-plugindocker-compose-plugin# Test docker is workingsudodockerrunhello-world#Install docker composesudoapt-getupdatesudoapt-getinstalldocker-compose-plugin# Test the docker versiondockercomposeversion
Setting up a domain name to access RPC
Get the IP address of the host machine, you can use the following command in a terminal or command prompt
curlifconfig.me
Set an A record for a domain, you need to access the domain's DNS settings and create an A record that points to the IP address of the host machine. This configuration allows users to reach your domain by resolving the domain name to the specific IP address associated with your host machine.
Create Moonbeam directory
The first command, mkdir moonbeam, will create a new directory named moonbeam in the current location. The second command, cd moonbeam, will change your current working directory to the newly created base directory. Now you are inside the base directory and can start storing docker-compose and related files in it.
mkdirmoonbeam&&cdmoonbeam
Create .env file
sudonano.env
Paste the following into the file.
EMAIL={YOUR_EMAIL}#Your email to receive SSL renewal emailsDOMAIN={YOUR_DOMAIN}#Domain should be something like rpc.mywebsite.com, e.g. moonbeam.infradao.orgWHITELIST={YOUR_REMOTE_MACHINE_IP}#the server's IP itself and comma separated list of IP's allowed to connect to RPC (e.g. Indexer)
Ctrl + x and y to save file
Make Database directory and set necessary permissions
Create and paste the following into the docker-compose.yml
sudonanodocker-compose.yml
Note that you have to:
Replace INSERT_YOUR_NODE_NAME in two different places. This name can be whatever you want it to be named. For InfraDAO, you can use the name of the server
Replace INSERT_RAM_IN_MB for 50% of the actual RAM your server has. For example, for 32 GB RAM, the value must be set to 16000. The minimum value is 2000, but it is below the recommended specs
For an overview of the flags used in the following start-up commands, plus additional commonly used flags, please refer to the Flags page of our documentation
You can call the JSON-RPC API methods to confirm the node is running. For example, call eth_syncing to return the synchronization status. It will return the starting, current, and highest block, or false if not synchronizing (or if the head of the chain has been reached)
Replace https://{YOUR_DOMAIN} with actual domain name you set an A record for: