# Glossary

This page defines the **core terminology** used throughout the ENSRainbow codebase and documentation. If you notice an unfamiliar word elsewhere in the docs, come back to this page – it is probably defined here.

## Label

A single component of an ENS name (characters between two dots). Can contain **any** valid UTF-8 string – it may or may not be ENS-normalised.

**Example:** `vitalik`, `😺`, `example.eth` has labels `example` & `eth`

## Labelhash

`keccak256` hash of the UTF-8 bytes of a label (no pre-normalisation), represented as a **0x-prefixed 64-digit lowercase hex** string (32 bytes).

**Example:** `0xaf2caa…03cc`

## Heal

The act of converting a _labelhash_ back to its original _label_ via a rainbow table lookup.

**Example:** `heal('0xaf2c…') → 'vitalik'`

## Rainbow Record

An entry mapping a `labelhash` ➜ `label`. Persisted as a LevelDB key (labelhash bytes) and UTF-8 value (_see Data Model_).

## Label Set

A logical collection of [rainbow records](#rainbow-record) that share a common **source** and **versioning** scheme. Each label set represents a dataset snapshot that enables deterministic healing across time. Label sets are identified by a `labelSetId` and `labelSetVersion`.

**Example:** id: `subgraph`, version: `0`

## Label Set ID

String (1-50 chars) consisting of lowercase ASCII letters and hyphens that names a label set.

**Example:** `subgraph`, `discovery-a`, `searchlight`

## Label Set Version

Non-negative integer that monotonically increases when new labelhash-to-label mappings are added to a label set. Each version contains incremental additions since the previous version. Version `0` is always the initial dataset. Enables deterministic healing across time by allowing clients to pin to specific versions for reproducible results.

**Example:** `0`, `1`, `2`

## Healable Count

Total number of labels that can currently be healed by the running server. Exposed via `/v1/labels/count`.

**Example:** `7 892 001`

## Status Code

High-level outcome of an API call – either `success` or `error`.

## Error Code

HTTP-style numeric code describing the error (`400`, `404`, `500`, `503`).

## Rainbow Table

A pre-computed set of `labelhash → label` pairs used for healing.

## Ingestion

One-off process that streams a `.ensrainbow` snapshot into LevelDB.

**Example:** `pnpm run ingest subgraph_0.ensrainbow`

## System Key

Special LevelDB key (length ≠ 32 bytes) storing metadata such as schema version, label set id, etc.

**Example:** `0xff 0xff 0xff 0xfd`

## ENS Normalization

The ENSIP-15 canonicalisation process; ENSRainbow stores labels **as-is**, even if not normalised.

## Environment Variables

These environment variables are typically set in Docker containers, shell scripts, or system configuration files. See the [Configuration](/docs/services/ensrainbow/usage/configuration) guide for complete setup instructions.

### LABEL_SET_ID

Environment variable that specifies the identifier for a [label set](#label-set). See [Label Set ID](#label-set-id) for the definition of this identifier.

**Used by:** Download scripts and Docker entrypoint to fetch the correct label set

### LABEL_SET_VERSION

Environment variable that specifies the version of a [label set](#label-set). See [Label Set Version](#label-set-version) for the definition of this version number.

**Used by:** Download scripts and Docker entrypoint to fetch the correct label set version

### LOG_LEVEL

Environment variable that controls the verbosity of logging output.

**Format:** String  
**Valid Values:** `fatal`, `error`, `warn`, `info`, `debug`, `trace`, `silent`  
**Default:** `info`

## Related Documentation

- **[Label Sets & Versioning](/docs/services/ensrainbow/concepts/label-sets-and-versioning)** - Understanding the versioning system
- **[Data Model](/docs/services/ensrainbow/concepts/data-model)** - How data is stored and organized
- **[TypeScript Interfaces](/docs/services/ensrainbow/concepts/typescript-interfaces)** - Type definitions for APIs