Deploying Huobi ECO Chain (HECO) Mainnet Node: A Comprehensive Guide

ยท

Section 1: Prerequisites

1.1 Essential Documentation

๐Ÿ‘‰ Explore HECO's developer tools

1.2 Hardware Requirements

SpecificationMinimumRecommended
CPU8-core16-core
RAM16GB32GB
Storage500GB SSD500GB+ SSD
Bandwidth2Mbps30Mbps

1.3 Network Configuration


Section 2: Creating HECO Mainnet Docker Image

2.1 Build Process

docker pull buildpack-deps:jessie-curl

2.2 Dockerfile Configuration

FROM buildpack-deps:jessie-curl
RUN wget -P /usr/local/bin/ https://github.com/HuobiGroup/huobi-eco-chain/releases/download/v1.0.0/geth-linux-amd64 && \
    mv /usr/local/bin/geth-linux-amd64 /usr/local/bin/geth && \
    chmod +x /usr/local/bin/geth
EXPOSE 8545 8546 30303 30303/udp
WORKDIR /data
ENTRYPOINT ["geth"]

2.3 Image Generation

docker build . -t huobi-eco:v1.0.0

Section 3: Launching HECO Mainnet Node

3.1 Configuration File

Key parameters in config.toml:

[Eth]
SyncMode = "full"  # Change to "fast" for fast sync
[Node]
HTTPHost = "0.0.0.0"
HTTPVirtualHosts = ["*"]

๐Ÿ‘‰ Learn about sync modes

3.2 Startup Command

docker run -itd --restart=unless-stopped \
  -v /etc/localtime:/etc/localtime \
  -v /etc/timezone:/etc/timezone \
  --name public_heco \
  -v $(pwd):/data \
  -p 32668:32668 -p 8545:8545 \
  huobi-eco:v1.0.0 \
  --config /data/config.toml \
  --logpath /data/logs

Section 4: Verification

4.1 Node Status Check

docker ps
tail -f ./logs/chain.log

4.2 Sync Progress

curl -X POST http://127.0.0.1:8545 \
  -H "Content-Type:application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'

4.3 Block Height Comparison

curl -X POST http://127.0.0.1:8545 \
  -H "Content-Type:application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

FAQ

Q1: What's the difference between full and fast sync?

A: Full sync verifies all historical blocks (slower but more secure), while fast sync only verifies recent blocks (faster but less secure).

Q2: How long does initial sync take?

A: Typically 6-12 hours depending on hardware and network conditions.

Q3: Why is my node not discovering peers?

A: Ensure port 32668 is open and check your network firewall settings.

Q4: How much storage does an archive node require?

A: Currently ~1TB, growing as the chain expands.

Q5: Where can I find HECO RPC documentation?

A: Visit HECO Developer Docs