Skip to content

Local Development

  1. Clone the monorepo and install dependencies (see the main ENSNode Contribution Guide).
  2. Make sure pnpm, Node.js >= 18, and Docker (optional) are installed.

ENSRainbow stores label-hash-to-label pairs in compressed snapshots with the file extension .ensrainbow. Use the helper script located in apps/ensrainbow/scripts/:

Download .ensrainbow files
cd apps/ensrainbow
# Syntax: download-ensrainbow-files.sh <LABEL_SET_ID> <LABEL_SET_VERSION>
./scripts/download-ensrainbow-files.sh subgraph 0 # classic ENS Subgraph labelset, version 0

The script will:

  • fetch the .ensrainbow file
  • verify its SHA-256 checksum
  • place it in apps/ensrainbow/labelsets/
Ingest data into LevelDB
pnpm run ingest-ensrainbow \
--input-file subgraph-0.ensrainbow \
--data-dir ./my-subgraph-data

Important rules:

  1. The first ingest for a new directory must be version 0 of a label-set.
  2. All subsequent ingests must belong to the same LABEL_SET_ID.
  3. Label-set versions must increment by exactly +1 each time.
Start the API server
pnpm run serve --data-dir ./my-subgraph-data --port 3223

Visit http://localhost:3223/health{ "status": "ok" }.