Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 28 additions & 23 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,41 @@
# --- Service profiles ---
# Controls which optional service groups are started.
# Available profiles:
# block-oracle epoch block oracle
# explorer block explorer UI
# rewards-eligibility REO eligibility oracle node
# indexing-payments dipper + iisa (requires GHCR auth — see README)
# Default: profiles that work out of the box.
COMPOSE_PROFILES=block-oracle,explorer
# All profiles (indexing-payments requires GHCR auth — see README):
#COMPOSE_PROFILES=rewards-eligibility,block-oracle,explorer,indexing-payments
# block-oracle epoch block oracle
# explorer block explorer UI
# eligibility-oracle REO eligibility oracle node (eligibility-oracle-node service)
# indexing-payments dipper + iisa (requires GHCR auth — see README)
# Default: all profiles. Note that `indexing-payments` requires GHCR auth
# (see README) — drop it from the list here or in `.env.local` to skip.
COMPOSE_PROFILES=block-oracle,explorer,eligibility-oracle,indexing-payments

# --- Dev overrides ---
# Uncomment and extend to build services from local source.
# See compose/dev/README.md for available overrides.
#COMPOSE_FILE=docker-compose.yaml:compose/dev/graph-node.yaml
#COMPOSE_FILE=docker-compose.yaml:compose/dev/graph-contracts-horizon.yaml:compose/dev/graph-contracts-issuance.yaml:compose/dev/indexer-agent.yaml

# indexer components versions
GRAPH_NODE_VERSION=v0.37.0
INDEXER_AGENT_VERSION=v0.25.4
INDEXER_SERVICE_RS_VERSION=v1.8.0
INDEXER_TAP_AGENT_VERSION=v1.12.2
GRAPH_NODE_VERSION=v0.42.1
INDEXER_AGENT_VERSION=local
INDEXER_SERVICE_RS_VERSION=local
INDEXER_TAP_AGENT_VERSION=v2.0.0

# indexing-payments image versions (requires GHCR auth — see README)
# Set real tags in .env.local when enabling the indexing-payments profile.
DIPPER_VERSION=sha-24d10d4
IISA_VERSION=
DIPPER_VERSION=local
IISA_VERSION=local

# gateway components versions
GATEWAY_COMMIT=b37acb4976313316a2bc0a488ca98749da51c61d
GATEWAY_VERSION=sha-50c7081
TAP_AGGREGATOR_VERSION=sha-d38d0b9
TAP_ESCROW_MANAGER_COMMIT=530a5a72da7592b8d442b94d82a5a5f57d4a2b40
TAP_ESCROW_MANAGER_VERSION=sha-df659cf

# eligibility oracle (clone-and-build — requires published repo)
ELIGIBILITY_ORACLE_COMMIT=84710857394d3419f83dcbf6687a91f415cc1625
# eligibility oracle
ELIGIBILITY_ORACLE_NODE_VERSION=main

# network components versions
BLOCK_ORACLE_COMMIT=3a3a425ff96130c3842cee7e43d06bbe3d729aed
CONTRACTS_COMMIT=511cd70563593122f556c7b35469ec185574769a
CONTRACTS_COMMIT=e8030a6db91f724a40920b6c80d65a3e88cbebec
NETWORK_SUBGRAPH_COMMIT=5b6c22089a2e55db16586a19cbf6e1d73a93c7b9
TAP_CONTRACTS_COMMIT=e3351e70b3e5d9821bc0aaa90bb2173ca2a77af7
TAP_SUBGRAPH_COMMIT=cf7279f60433bf9a9d897ec2548c13c0607234cc
Expand All @@ -66,6 +65,7 @@ GRAPH_NODE_STATUS_PORT=8030
GRAPH_NODE_METRICS_PORT=8040
INDEXER_MANAGEMENT_PORT=7600
INDEXER_SERVICE_PORT=7601
INDEXER_SERVICE_DIPS_PORT=7602
GATEWAY_PORT=7700
REDPANDA_KAFKA_PORT=9092
REDPANDA_KAFKA_EXTERNAL_PORT=29092
Expand Down Expand Up @@ -122,13 +122,18 @@ RECEIVER_SECRET="0x2ee789a68207020b45607f5adb71933de0946baebbaaab74af7cbd69c8a90
SUBGRAPH="BFr2mx7FgkJ36Y6pE5BiXs1KmNUmVDCnL82KUSdcLW1g"
SUBGRAPH_2="9p1TRzaccKzWBN4P6YEwEUxYwJn6HwPxf5dKXK2NYxgS"

# REO (Rewards Eligibility Oracle)
# Set to 1 to deploy and configure the REO contract (Phase 4). Unset or 0 to skip.
REO_ENABLED=0
# GIP-0088: Indexing Payments (REO + IA + RAM + activation)
# Set to 1 to deploy all GIP-0088 contracts via deployment package (Phase 4).
# Requires reo-deployment-3 branch contracts (via CONTRACTS_COMMIT or dev overlay).
GIP0088_ENABLED=1
# REO local-network operator config (applied after GIP-0088 deployment)
# eligibilityPeriod: how long an indexer stays eligible after renewal (seconds)
REO_ELIGIBILITY_PERIOD=300
# oracleUpdateTimeout: fail-safe — if no oracle update for this long, all indexers eligible (seconds)
REO_ORACLE_UPDATE_TIMEOUT=86400

# Gateway
GATEWAY_API_KEY="deadbeefdeadbeefdeadbeefdeadbeef"
# Optional: appended to Kafka topic names (e.g. "local" → gateway_queries_local).
# Leave empty for default topic names. All consumers must agree on this value.
#KAFKA_TOPIC_ENVIRONMENT=local
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Create `.env.local` (gitignored) to override defaults without touching `.env`:

```bash
# .env.local — your local settings
COMPOSE_PROFILES=rewards-eligibility,block-oracle,explorer,indexing-payments
COMPOSE_PROFILES=eligibility-oracle,block-oracle,explorer,indexing-payments
GRAPH_NODE_VERSION=v0.38.0-rc1
```

Expand All @@ -45,22 +45,22 @@ Optional services are controlled via `COMPOSE_PROFILES` in `.env`.
By default, profiles that work out of the box are enabled:

```bash
COMPOSE_PROFILES=rewards-eligibility,block-oracle,explorer
COMPOSE_PROFILES=block-oracle,explorer,eligibility-oracle,indexing-payments
```

Available profiles:

| Profile | Services | Prerequisites |
| --------------------- | --------------------------------- | -------------------------- |
| `block-oracle` | block-oracle | none |
| `explorer` | block-explorer UI | none |
| `rewards-eligibility` | eligibility-oracle-node | none (clones from GitHub) |
| `indexing-payments` | dipper, iisa, iisa-scoring | GHCR auth (below) |
| Profile | Services | Prerequisites |
| -------------------- | --------------------------------- | -------------------------- |
| `block-oracle` | block-oracle | none |
| `explorer` | block-explorer UI | none |
| `eligibility-oracle` | eligibility-oracle-node | none |
| `indexing-payments` | dipper, iisa, iisa-scoring | GHCR auth (below) |

To enable all profiles, uncomment the full line in `.env`:
All enabled by default; remove entries from `.env` to opt out:

```bash
COMPOSE_PROFILES=rewards-eligibility,block-oracle,explorer,indexing-payments
COMPOSE_PROFILES=block-oracle,explorer,eligibility-oracle,indexing-payments
```

### GHCR authentication (indexing-payments)
Expand Down
34 changes: 23 additions & 11 deletions compose/dev/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Dev Overrides

Compose override files for local development. Most mount a locally-built binary
into the running container, avoiding full image rebuilds.
or source tree into the running container, avoiding full image rebuilds.

> **Prefer the image-tag approach when possible.** For services whose upstream
> repo has a `docker-compose.yml` + `just build-image` target (e.g. dipper, iisa),
> producing a `:local`-tagged image and setting the corresponding `*_VERSION=local`
> in `.env` is the primary iteration path — portable across machines, reuses the
> same consumption model as published images, and leaves no host-absolute paths
> in `.env`. These overrides are an older binary/source-mount mechanism kept for
> cases where that doesn't fit; **several have not been exercised recently and
> may not work as documented** — treat them as starting points rather than
> guaranteed-working recipes.

## Usage

Expand All @@ -21,15 +31,17 @@ Then `docker compose up -d` applies the overrides automatically.

## Available Overrides

| File | Service | Required Env Var |
| ------------------------- | -------------------------------- | ------------------------------------------------------ |
| `graph-node.yaml` | graph-node | `GRAPH_NODE_SOURCE_ROOT` |
| `graph-contracts.yaml` | graph-contracts, subgraph-deploy | `CONTRACTS_SOURCE_ROOT`, `GRAPH_CONTRACTS_SOURCE_ROOT` |
| `indexer-agent.yaml` | indexer-agent | `INDEXER_AGENT_SOURCE_ROOT` |
| `indexer-service.yaml` | indexer-service | `INDEXER_SERVICE_BINARY` |
| `tap-agent.yaml` | tap-agent | `TAP_AGENT_BINARY` |
| `eligibility-oracle.yaml` | eligibility-oracle-node | `REO_BINARY` |
| `dipper.yaml` | dipper | `DIPPER_BINARY` |
| `iisa.yaml` | iisa | `IISA_VERSION=local` |
| File | Service | Required Env Var |
| ------------------------------- | ------------------------ | ------------------------------ |
| `graph-node.yaml` | graph-node | `GRAPH_NODE_SOURCE_ROOT` |
| `graph-contracts-horizon.yaml` | graph-contracts-horizon | `CONTRACTS_SOURCE_ROOT` |
| `graph-contracts-issuance.yaml` | graph-contracts-issuance | `CONTRACTS_SOURCE_ROOT` |
| `network-subgraph.yaml` | subgraph-deploy | `NETWORK_SUBGRAPH_SOURCE_ROOT` |
| `indexer-agent.yaml` | indexer-agent | `INDEXER_AGENT_SOURCE_ROOT` |
| `indexer-service.yaml` | indexer-service | `INDEXER_SERVICE_BINARY` |
| `tap-agent.yaml` | tap-agent | `TAP_AGENT_BINARY` |
| `eligibility-oracle.yaml` | eligibility-oracle-node | `REO_BINARY` |
| `dipper.yaml` | dipper | `DIPPER_BINARY` |
| `iisa.yaml` | iisa | `IISA_VERSION=local` |

See each file's header comments for details.
4 changes: 2 additions & 2 deletions compose/dev/eligibility-oracle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Build the binary locally first:
# cargo build --release -p eligibility-oracle
#
# Activate via COMPOSE_FILE in .env (requires rewards-eligibility profile):
# COMPOSE_PROFILES=rewards-eligibility
# Activate via COMPOSE_FILE in .env (requires eligibility-oracle profile):
# COMPOSE_PROFILES=eligibility-oracle
# COMPOSE_FILE=docker-compose.yaml:compose/dev/eligibility-oracle.yaml

services:
Expand Down
10 changes: 10 additions & 0 deletions compose/dev/graph-contracts-horizon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Horizon Contracts Dev Override
# Mounts local graphprotocol/contracts repo for graph-contracts-horizon.
#
# Activate via COMPOSE_FILE in .env:
# COMPOSE_FILE=docker-compose.yaml:compose/dev/graph-contracts-horizon.yaml

services:
graph-contracts-horizon:
volumes:
- ${CONTRACTS_SOURCE_ROOT:?Set CONTRACTS_SOURCE_ROOT to local contracts repo}:/opt/contracts
13 changes: 13 additions & 0 deletions compose/dev/graph-contracts-issuance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Issuance Contracts Dev Override
# Mounts local contracts repo for the issuance deployment container.
#
# Uses the same CONTRACTS_SOURCE_ROOT as graph-contracts-horizon dev overlay.
# The repo must have pnpm install and pnpm build already run.
#
# Activate via COMPOSE_FILE in .env:
# COMPOSE_FILE=docker-compose.yaml:compose/dev/graph-contracts-horizon.yaml:compose/dev/graph-contracts-issuance.yaml

services:
graph-contracts-issuance:
volumes:
- ${CONTRACTS_SOURCE_ROOT:?Set CONTRACTS_SOURCE_ROOT to local contracts repo}:/opt/contracts
20 changes: 0 additions & 20 deletions compose/dev/graph-contracts.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions compose/dev/network-subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Network Subgraph Dev Override
# Mounts local graphprotocol/graph-network-subgraph repo for subgraph-deploy.
#
# Activate via COMPOSE_FILE in .env:
# COMPOSE_FILE=docker-compose.yaml:compose/dev/network-subgraph.yaml

services:
subgraph-deploy:
volumes:
- ${NETWORK_SUBGRAPH_SOURCE_ROOT:?Set NETWORK_SUBGRAPH_SOURCE_ROOT to local graph-network-subgraph repo}:/opt/graph-network-subgraph
16 changes: 8 additions & 8 deletions containers/core/gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM debian:bookworm-slim
ARG GATEWAY_COMMIT
ARG GATEWAY_VERSION
FROM ghcr.io/edgeandnode/graph-gateway:${GATEWAY_VERSION}

# Tools needed by run.sh (config generation, wait_for_gql)
RUN apt-get update \
&& apt-get install -y clang cmake curl git jq libsasl2-dev libssl-dev pkg-config protobuf-compiler \
&& apt-get install -y --no-install-recommends curl jq ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal

# Upstream ENTRYPOINT is target/release/graph-gateway relative to /opt/gateway;
# expose on PATH so run.sh can invoke `graph-gateway` directly.
RUN ln -sf /opt/gateway/target/release/graph-gateway /usr/local/bin/graph-gateway

WORKDIR /opt
RUN git clone https://github.com/edgeandnode/gateway && \
cd gateway && git checkout ${GATEWAY_COMMIT} && \
. /root/.cargo/env && cargo build -p graph-gateway && \
cp target/debug/graph-gateway /usr/local/bin/graph-gateway && cd .. && rm -rf gateway
COPY ./run.sh /opt/run.sh
ENTRYPOINT ["bash", "/opt/run.sh"]
1 change: 1 addition & 0 deletions containers/core/gateway/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ cat >config.json <<-EOF
],
"exchange_rate_provider": 1.0,
"graph_env_id": "local",
"kafka_topic_environment": "${KAFKA_TOPIC_ENVIRONMENT:-}",
"indexer_selection_retry_limit": 2,
"kafka": {
"bootstrap.servers": "redpanda:${REDPANDA_KAFKA_PORT}"
Expand Down
Loading