Ethereum
Set up your Ethereum Mainnet or Goerli Testnet RPC node
Prerequisites
- Setup your Axelar validator
- Minimum hardware requirements: CPU with 2+ cores, 4GB RAM, 600GB+ free storage space.
- MacOS or Ubuntu 18.04+
- Official Documentation
Steps
- Install execution client
- Install consensus layer client
- Configure systemd
- Configure vald
Install Execution client
Install an execution client for Ethereum.
In this sample guide we will be installing Geth
with the built-in launchpad PPAs (Personal Package Archives) on Ubuntu. If you are on different OS, please refer to the official Documentation.
Install a consensus layer client
To sync after the latest merge in Goerli network geth nodes should run a consensus client to be able to keep in sync with the chain. The list of consensus clients can be found in https://ethereum.org/en/developers/docs/nodes-and-clients/#consensus-clients
Users can opt for any Consensus client. The sample instructions below use Prysm as the Consensus client. Please refer to the Prysm docs for the up-to-date instructions. For fast syncing, consider checkpoint sync instead of genesis sync.
Configure systemd
1. Create systemd service file
After installation of go-ethereum
, we are now ready to start the geth
process but in order to ensure it is running in the background and auto-restarts in case of a server failure, we will setup a service file with systemd.
Replace $USER
and path to geth
in the config below.
For Goerli Testnet, add the --goerli
flag to the geth
command.
Add the following to /etc/systemd/system/geth.service
2. Start geth
If everything was set-up correctly, your Ethereum node should now be starting the process of synchronization. This will take several hours, depending on your hardware. To check the status of the running service or to follow the logs, you can use:
3. Verify sync status
To verify if your node is in sync you can check the latest block from the explorer.
Compare it with what you have in sudo journalctl -u geth -f
4. Test RPC connection
Alternatively, you can now also use the Geth JavaScript console and check status of your node by attaching to your newly created geth.ipc
. Don’t forget to replace $USER
and path
, depending on your server configuration.
geth attach ipc:/root/.ethereum/geth.ipc
eth.syncing
geth attach ipc:/root/.ethereum/goerli/geth.ipc
eth.syncing
Once your node is fully synced, the output from above will say false
. To test your Ethereum RPC node, you can send an RPC request using cURL
If you are testing it remotely, please replace localhost
with the IP or URL of your server.
Configure vald
In order for vald
to connect to your Ethereum node, your rpc_addr
should be exposed in
vald’s config.toml
Goerli testnet chain name is ethereum-2
Upgrade geth
If new release of geth is out, you can update it via the following. Check that you are on latest version.