Celo
Set up your CELO Mainnet or Alfajores Testnet RPC node
Prerequisites
- Setup your Axelar validator
- Minimum hardware requirements:
- Memory: 8 GB RAM
- CPU: Quad core 3GHz (64-bit)
- Disk: 256 GB of SSD storage, plus a secondary HDD desirable
- Network: At least 1 GB input/output Ethernet with a fiber Internet connection, ideally redundant connections and HA switches
- MacOS or Ubuntu 18.04+
- Official Documentation
Steps
- Setup Preferences
- Celo Networks
- Pull the Celo Docker image
- Set up a data directory
- Create an account and get its address
- Start the node
- Check Synced
- Configure vald
- Upgrade Celo
Setup Preferences
Update and upgrade the packages by running the following command in the terminal:
Install Required Packages:
Celo Networks
export CELO_IMAGE=us.gcr.io/celo-org/geth:mainnet
export CELO_IMAGE=us.gcr.io/celo-org/geth:alfajores
Pull the Celo Docker image
We’re going to use a Docker image containing the Celo node software in this tutorial.
If you are re-running these instructions, the Celo Docker image may have been updated, and it’s important to get the latest version.
Set up a data directory
First, create the directory that will store your node’s configuration and its copy of the blockchain. This directory can be named anything you’d like, but here’s a default you can use. The commands below create a directory and then navigate into it. The rest of the steps assume you are running the commands from inside this directory.
Create an account and get its address
In this step, you’ll create an account on the network. If you’ve already done this and have an account address, you can skip this and move on to configuring your node.
Run the command to create a new account:
Example Result:
Save this address to an environment variables, so that you can reference it below (don’t include the braces):
This environment variable will only persist while you have this terminal window open.
Add it to ~/.bash_profile
for future use.
Start the node
This command specifies the settings needed to run the node, and gets it started.
docker run —name celo-fullnode -d —restart unless-stopped —stop-timeout 300 -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp -v $CELO_DIR:/root/.celo $CELO_IMAGE —verbosity 3 —syncmode full —http —http.addr 0.0.0.0 —http.api eth,net,web3,debug,admin,personal —light.serve 90 —light.maxpeers 1000 —maxpeers 1100 —etherbase $CELO_ACCOUNT_ADDRESS —datadir /root/.celo
docker run —name celo-fullnode -d —restart unless-stopped —stop-timeout 300 -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp -v $CELO_DIR:/root/.celo $CELO_IMAGE —verbosity 3 —syncmode full —http —http.addr 0.0.0.0 —http.api eth,net,web3,debug,admin,personal —light.serve 90 —light.maxpeers 1000 —maxpeers 1100 —etherbase $CELO_ACCOUNT_ADDRESS —alfajores —datadir /root/.celo
To see logs after starting the container, do the following.
You’ll start seeing some output. After a few minutes, you should see lines that look like this. This means your node has started syncing with the network and is receiving blocks.
Security: The command line above includes the parameter —http.addr 0.0.0.0 which makes the Celo Blockchain software listen for incoming RPC requests on all network adaptors. Exercise extreme caution in doing this when running outside Docker, as it means that any unlocked accounts and their funds may be accessed from other machines on the Internet. In the context of running a Docker container on your local machine, this together with the docker -p flags allows you to make RPC calls from outside the container, i.e from your local host, but not from outside your machine. Read more about Docker Networking here.
Check Synced
Once your node is fully synced, the output from above will say false
. To test your Celo RPC node, you can send an RPC request using cURL
Configure vald
In order for vald
to connect to your Ethereum node, your rpc_addr
should be exposed in
vald’s config.toml
Upgrade Celo
Recent Releases
Pull the latest Docker image
Stop and remove the existing node
Start the new node
docker run —name celo-fullnode -d —restart unless-stopped —stop-timeout 300 -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp -v $CELO_DIR:/root/.celo $CELO_IMAGE —verbosity 3 —syncmode full —http —http.addr 0.0.0.0 —http.api eth,net,web3,debug,admin,personal —light.serve 90 —light.maxpeers 1000 —maxpeers 1100 —etherbase $CELO_ACCOUNT_ADDRESS —datadir /root/.celo
docker run —name celo-fullnode -d —restart unless-stopped —stop-timeout 300 -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp -v $CELO_DIR:/root/.celo $CELO_IMAGE —verbosity 3 —syncmode full —http —http.addr 0.0.0.0 —http.api eth,net,web3,debug,admin,personal —light.serve 90 —light.maxpeers 1000 —maxpeers 1100 —etherbase $CELO_ACCOUNT_ADDRESS —alfajores —datadir /root/.celo