Blockchain Stack
Celo

Celo Blockchain

All CIC Stack components have been specifically developed to run on Celo, however it is easy to adapt it to other EVM blockchains.

Full node

CIC Stack specifically requires a full node with the flowing API's enabled:

  • eth.
  • net.
  • txpool.
  • debug.

And the following transports also enabled:

  • GraphQL.
  • Websocket.
  • RPC.

Docker deployment

We provide an easy to use Docker setup (opens in a new tab) to quickly setup a full node.

System Requirements

For Alfajores testnet:

  • 3 vCPU
  • 4 GB RAM
  • 80 GB SSD storage
  • 100Mbps network connection

For Mainnet:

  • 4 vCPU
  • 6 GB RAM
  • 200 GB SSD storage
  • 100Mbps network connection

Prerequisites

  • Docker.
  • Docker Compose v2.
  • chrony or any other NTP daemon.
  • A download manager e.g. aria2.
  • zstd

Firewall Requirements

The following ports should be open to the internet:

  • 30303/udp
  • 30303/tcp
  • 443/tcp
  • 80/tcp

Quick Docker installation

ℹ️

This step can be skipped if you have Docker and Docker Compose already installed.

$ apt update && apt upgrade --yes
$ apt install curl
$ curl -fsSL https://get.docker.com | bash
# Docker now ships with docker-compose v2, you can make it available in path by adding the following line to your .profile
# export PATH="/usr/libexec/docker/cli-plugins:$PATH"

Quick Other Required Packages installation

ℹ️

This step assumes you are on an Ubuntu/Debian based OS.

$ apt install git chrony aria2 unzip

Setup

1. Download Celo snapshot

Celo offers periodic snapshots that allow you to get you blockchain node up and running as fast as possible. The links are:

  • Mainnet: https://storage.googleapis.com/celo-chain-backup/mainnet/chaindata-latest.tar.zst
  • Alfajores Testnet: https://storage.googleapis.com/celo-chain-backup/alfajores/chaindata-latest.tar.zst

To download either of these:

$ aria2c -x 16 -s 16 $DOWNLOAD_LINK

The downloaded archive will be used in step 4.

2. Clone grassrootseconomics/celo-node Repo

Grassroots Economics provides an opinionated and alternative devops setup flavor to the official full node setup provided by Celo (opens in a new tab).

$ git clone https://github.com/grassrootseconomics/celo-node.git

3. Prepare directories

$ cd celo
$ docker network create celo
$ docker-compose up
# After a few seconds, cancel the operation with CTRL+C

This step will create a data folder inside the current celo folder.

4. Extract and restore the downloaded snapshot

⚠️

This step requires sudo permissions because of the container init user. It also requires running sensitive delete commands i.e. rm and mv.

$ tar --use-compress-program=unzstd -xvf chaindata-latest.tar.zst
# This assumes you are in the root folder of the cloned celo-node
$ sudo rm -rf data/celo/chaindata
$ sudo mv chaindata data/celo

4. Bring up Celo node container

# If you want to run the testnet node, modify the docker-compose.yaml file first! i.e. --alfajores flag
$ docker-compose up -d

4. Bring up Caddy container

ℹ️

This step should only be run if you plan on exposing your node's APIs to the internet.

# In the celo-node folder
$ cd caddy
# Update the Caddyfile with correct values
$ docker-compose up -d