Skip to main content
⚠️ This section may change without prior notice
Critical information in this section may be subject to change as the network is in early stages.
🔓 The Moca Chain source code is publicly available on GitHub: mocachain/moca.

Network Information

NetworkChain IDEVM Chain IDRPC (Tendermint)
Mainnetmoca_2288-12288https://tm-rpc.mocachain.dev
Testnetmoca_222888-1222888https://testnet-lcd.mocachain.org
Mainnet AccessMainnet RPC access requires an API key. Contact the Moca Chain team to obtain your key.

Node Information

Minimum System Requirements

ComponentRequirement
OSDesktop or laptop running recent versions of Mac OS X or Linux
Storage1 TB free disk space, minimum read/write speed of 100 MB/s
CPU4 cores
Memory (RAM)12 GB
NetworkBroadband connection, upload/download at least 1 MB/s
ComponentRecommended Specification
Processor (CPU)16-core CPU
Memory (RAM)64 GB
Storage3 TB SSD
NetworkStable high-speed internet, minimum 5 MB/s

Setting Up a New Node

Prerequisites

For Docker (Option A):
  • Docker
  • jq
For Manual Cosmovisor (Option B):
  • Git
  • Go 1.23+
  • jq
  • macOS or Linux

1. Clone the Repo (Option B only)

Skip this step if using the Docker image (Option A).
Clone the repository and checkout the latest stable version:
git clone https://github.com/mocachain/moca.git
cd moca

# checkout latest stable version
git checkout tags/v1.2.1

2. Install Cosmovisor

Cosmovisor is a process manager for Cosmos SDK nodes that automatically handles chain upgrades. It is the recommended way to run a Moca Chain node. The official Docker image is available on GitHub Container Registry. This image comes with the genesis binary preinstalled and runs mocad with Cosmovisor.
# Pull the latest image
docker pull ghcr.io/mocachain/mocad:v1.2.1

# For specific architecture
# linux/amd64
docker pull ghcr.io/mocachain/mocad:v1.2.1-amd64

# linux/arm64
docker pull ghcr.io/mocachain/mocad:v1.2.1-arm64

Option B: Manual Cosmovisor Setup

If you prefer to run Cosmovisor manually without Docker, follow these steps.

Install Cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest

Build or Download the Binary

You can either build from source or download pre-compiled binaries from GitHub Releases.
# Option 1: Build from source
make build

# Option 2: Download pre-compiled binary (Linux arm64)
wget https://github.com/mocachain/moca/releases/download/v1.2.1/mocad_linux_arm64.tar.gz
tar -xzf mocad_linux_arm64.tar.gz
chmod +x mocad
mv mocad ./build/mocad

Setup Cosmovisor Directory Structure

mkdir -p ~/.mocad/cosmovisor/genesis/bin
cp ./build/mocad ~/.mocad/cosmovisor/genesis/bin/mocad

3. Initialize Node

This will initialize your local moca node home directory ~/.mocad containing chain data configuration.

Using Docker (Option A)

docker run --rm -v ~/.mocad:/root/.mocad ghcr.io/mocachain/mocad:v1.2.1 \
  mocad init mynode --chain-id moca_2288-1 --default-denom amoca

Using Manual Cosmovisor (Option B)

~/.mocad/cosmovisor/genesis/bin/mocad init mynode --chain-id moca_2288-1 --default-denom amoca

4. Pull Live genesis file

Fetch the genesis file for your target network.
RPC=https://tm-rpc.mocachain.dev
curl -s "$RPC/genesis?key=<YOUR_ACCESS_KEY>" | jq -r '.result.genesis' > ~/.mocad/config/genesis.json

5. Add peers

Fetch and configure peers from the network:
PEERS=$(curl -s "$RPC/net_info" | jq -r '.result.peers[] | select(.node_info.id and .remote_ip) | "\(.node_info.id)@\(.remote_ip):26656"' | paste -sd, -)

# Update config with peers
# Use sed -i '' on macOS, sed -i on Linux
if [[ "$OSTYPE" == "darwin"* ]]; then SED_FLAG=(-i ''); else SED_FLAG=(-i); fi
[ -n "$PEERS" ] && \
  sed "${SED_FLAG[@]}" 's/seeds = ".*"/seeds = ""/' ~/.mocad/config/config.toml && \
  sed "${SED_FLAG[@]}" "s/persistent_peers = \".*\"/persistent_peers = \"$PEERS\"/" ~/.mocad/config/config.toml && \
  sed "${SED_FLAG[@]}" 's/addr_book_strict = true/addr_book_strict = false/' ~/.mocad/config/config.toml
Alternatively you can provide your own list of peers.

6. Fast sync state

State sync quickly bootstraps your node by trusting a recent block header (light client verification) and downloading a snapshot of the application state at that height, instead of replaying all historical blocks.
# Get current height
HEIGHT=$(($(curl -s "$RPC/block" | jq -r '.result.block.header.height') - 1000))
HASH=$(curl -s "$RPC/block?height=$HEIGHT" | jq -r '.result.block_id.hash')

# Set trusted height and hash to sync from in your node configuration files
# Use sed -i '' on macOS, sed -i on Linux
if [[ "$OSTYPE" == "darwin"* ]]; then SED_FLAG=(-i ''); else SED_FLAG=(-i); fi
sed "${SED_FLAG[@]}" 's/^enable *= *.*/enable = true/' ~/.mocad/config/config.toml
sed "${SED_FLAG[@]}" "s|^rpc_servers *= *.*|rpc_servers = \"$RPC,$RPC\"|" ~/.mocad/config/config.toml
sed "${SED_FLAG[@]}" "s/^trust_height *= *.*/trust_height = $HEIGHT/" ~/.mocad/config/config.toml
sed "${SED_FLAG[@]}" "s/^trust_hash *= *.*/trust_hash = \"$HASH\"/" ~/.mocad/config/config.toml
sed "${SED_FLAG[@]}" 's/^trust_period *= *.*/trust_period = "168h0m0s"/' ~/.mocad/config/config.toml

7. Run the node

Using Docker (Option A)

Run the Docker container with a mounted volume for persistent data:
docker run -d \
  --name mocad \
  -v ~/.mocad:/root/.mocad \
  -p 26656:26656 \
  -p 26657:26657 \
  -p 1317:1317 \
  -p 8545:8545 \
  ghcr.io/mocachain/mocad:v1.2.1

Using Manual Cosmovisor (Option B)

DAEMON_ALLOW_DOWNLOAD_BINARIES=true enables Cosmovisor to automatically download new binaries during chain upgrades. Without this, the node will halt at the upgrade height and require manual binary replacement. Alternatively, you can pre-stage binaries at $DAEMON_HOME/cosmovisor/upgrades/<upgrade-name>/bin/mocad.
export DAEMON_NAME=mocad
export DAEMON_HOME=$HOME/.mocad
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
cosmovisor run start --chain-id=moca_2288-1
The node will take some time to fully sync up to the current chain height.

Verify Syncing

You can verify if state sync is done by curl localhost:26657/status several times and see whether latest_block_height is increasing in response.
curl -s http://127.0.0.1:26657/status | jq -r ".result.sync_info.latest_block_height"
# Expect block height greater than 0