Skip to content

Commit 47a7d07

Browse files
committed
chore: unify local-dev config naming — drop -dev, add operator template
The three role configs were named inconsistently: gateway-dev.yaml and worker-<chain>-dev.yaml carried a -dev suffix while operator-<chain>.yaml did not. Drop -dev so all three local-dev configs share one scheme: gateway.yaml worker-<chain>.yaml operator-<chain>.yaml (Production counterparts stay <role>[-<chain>]-railway.yaml in avs-infra.) - Renamed config/gateway-dev.example.yaml -> gateway.example.yaml and config/worker-{sepolia,base-sepolia}-dev.example.yaml -> ...-.example.yaml. - Added config/operator-sepolia.example.yaml so all three roles have an in-repo template (operator previously had none). - Renamed the `gateway-dev` make target -> `gateway`; updated all --config paths in the Makefile, scripts, docs, and the integration test. - Rewrote config/README.md around the uniform <role>[-<chain>].yaml scheme. No code behavior change; config file/target names only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QWr2N3kZQZ1miN66TNPwqU
1 parent 62b05ce commit 47a7d07

15 files changed

Lines changed: 136 additions & 133 deletions

.github/scripts/generate-test-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77
#
88
# test.example.yaml is the dedicated test-fixture template (multi-chain
99
# shape); it shares the top-level fields the tests read. Despite the
10-
# neighbouring gateway-dev/operator configs, test.yaml is a fixture only —
10+
# neighbouring gateway/operator configs, test.yaml is a fixture only —
1111
# no server is started from it.
1212

1313
echo "Generating test config files from test.example.yaml..."

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ metadata.json
2525

2626
# Ignores yaml configuration files in the config directory. ONLY the
2727
# `*.example.yaml` templates that document the file shapes are tracked;
28-
# every real config (e.g. `gateway-dev.yaml`, `worker-*-dev.yaml`,
29-
# `gateway-dev-rehearsal.yaml`) stays ignored — they carry testnet
28+
# every real config (e.g. `gateway.yaml`, `worker-*-dev.yaml`,
29+
# `gateway-rehearsal.yaml`) stays ignored — they carry testnet
3030
# credentials / local paths that should not land in git. Copy the matching
3131
# `*.example.yaml` and fill in the placeholders to bootstrap one.
3232
# Production Railway deploy configs live in avs-infra (railway/configs/),

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ The `getWorkflow` output is the ground truth — it shows the trigger's `topics`
141141

142142
- Go 1.22+, Node.js, Docker/Docker Compose, Foundry
143143
- `config/operator_sample.yaml` - Operator config template
144-
- `config/gateway-dev.yaml` - Local-dev gateway config (copy from `gateway-dev.example.yaml`)
144+
- `config/gateway.yaml` - Local-dev gateway config (copy from `gateway.example.yaml`)
145145
- `config/test.yaml` - Go test-suite fixture (copy from `test.example.yaml`); loaded as `testutil.DefaultConfigPath`, not a server config
146146
- Contract addresses in README.md (Ethereum Mainnet, Sepolia Testnet)

Makefile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -202,35 +202,35 @@ build:
202202
-o ./out/ap \
203203
-ldflags "$(VERSION_LDFLAGS)"
204204

205-
## gateway-dev: start the local-dev gateway (replaces the legacy per-chain aggregator targets)
205+
## gateway: start the local-dev gateway (replaces the legacy per-chain aggregator targets)
206206
##
207207
## The pre-Railway "one aggregator per chain" Makefile targets
208208
## (aggregator-sepolia / aggregator-ethereum / aggregator-base /
209209
## aggregator-base-sepolia) have been consolidated into this single
210-
## gateway target. The gateway-dev.yaml config carries the per-chain
210+
## gateway target. The gateway.yaml config carries the per-chain
211211
## blocks (Sepolia + Base Sepolia by default; add more under
212212
## `chains:` to fan out further). See config/README.md for the
213213
## current layout.
214-
.PHONY: gateway-dev
215-
gateway-dev: build
216-
@echo "🚀 Starting local-dev gateway (config/gateway-dev.yaml)..."
217-
@echo "📝 Logs will be written to gateway-dev.log"
218-
./out/ap aggregator --config=config/gateway-dev.yaml 2>&1 | tee gateway-dev.log
214+
.PHONY: gateway
215+
gateway: build
216+
@echo "🚀 Starting local-dev gateway (config/gateway.yaml)..."
217+
@echo "📝 Logs will be written to gateway.log"
218+
./out/ap aggregator --config=config/gateway.yaml 2>&1 | tee gateway.log
219219

220220
# Legacy per-chain aggregator targets retained as redirects so muscle
221221
# memory and old runbooks still work. They print a deprecation notice
222-
# pointing at `make gateway-dev`, then fail rather than silently doing
222+
# pointing at `make gateway`, then fail rather than silently doing
223223
# something different from what the caller meant.
224224
.PHONY: aggregator aggregator-sepolia aggregator-ethereum aggregator-base aggregator-base-sepolia
225225
aggregator aggregator-sepolia aggregator-ethereum aggregator-base aggregator-base-sepolia:
226226
@echo "⚠️ '$@' has been removed."
227227
@echo " The pre-Railway per-chain aggregator pattern has been"
228228
@echo " consolidated into the multi-chain gateway. Use:"
229229
@echo ""
230-
@echo " make gateway-dev"
230+
@echo " make gateway"
231231
@echo ""
232232
@echo " to start the local-dev gateway. The chains it serves are"
233-
@echo " listed under \`chains:\` in config/gateway-dev.yaml."
233+
@echo " listed under \`chains:\` in config/gateway.yaml."
234234
@exit 1
235235
## operator: show usage for operator commands
236236
.PHONY: operator operator-sepolia operator-ethereum operator-base operator-base-sepolia
@@ -276,21 +276,21 @@ dev-gateway: build
276276
@mkdir -p logs
277277
@echo "🚀 Starting gateway (dev) — REST :8080, gRPC :2206"
278278
@echo "📝 Logs: logs/gateway.log"
279-
./out/ap aggregator --config=config/gateway-dev.yaml 2>&1 | tee logs/gateway.log
279+
./out/ap aggregator --config=config/gateway.yaml 2>&1 | tee logs/gateway.log
280280

281281
## dev-worker-sepolia: run the sepolia chain worker (gRPC 50051)
282282
dev-worker-sepolia: build
283283
@mkdir -p logs
284284
@echo "🛠 Starting worker:sepolia (dev) — gRPC :50051"
285285
@echo "📝 Logs: logs/worker-sepolia.log"
286-
./out/ap worker --config=config/worker-sepolia-dev.yaml 2>&1 | tee logs/worker-sepolia.log
286+
./out/ap worker --config=config/worker-sepolia.yaml 2>&1 | tee logs/worker-sepolia.log
287287

288288
## dev-worker-base-sepolia: run the base-sepolia chain worker (gRPC 50052)
289289
dev-worker-base-sepolia: build
290290
@mkdir -p logs
291291
@echo "🛠 Starting worker:base-sepolia (dev) — gRPC :50052"
292292
@echo "📝 Logs: logs/worker-base-sepolia.log"
293-
./out/ap worker --config=config/worker-base-sepolia-dev.yaml 2>&1 | tee logs/worker-base-sepolia.log
293+
./out/ap worker --config=config/worker-base-sepolia.yaml 2>&1 | tee logs/worker-base-sepolia.log
294294

295295
## dev-operator-sepolia: run the sepolia operator pointed at the dev gateway
296296
dev-operator-sepolia: build
@@ -320,10 +320,10 @@ dev-stack: build
320320
@echo ""
321321
@set -m; \
322322
trap 'echo; echo "🛑 Stopping dev stack..."; kill 0 2>/dev/null; exit 0' INT TERM; \
323-
./out/ap worker --config=config/worker-sepolia-dev.yaml > logs/worker-sepolia.log 2>&1 & \
324-
./out/ap worker --config=config/worker-base-sepolia-dev.yaml > logs/worker-base-sepolia.log 2>&1 & \
323+
./out/ap worker --config=config/worker-sepolia.yaml > logs/worker-sepolia.log 2>&1 & \
324+
./out/ap worker --config=config/worker-base-sepolia.yaml > logs/worker-base-sepolia.log 2>&1 & \
325325
sleep 1; \
326-
./out/ap aggregator --config=config/gateway-dev.yaml > logs/gateway.log 2>&1 & \
326+
./out/ap aggregator --config=config/gateway.yaml > logs/gateway.log 2>&1 & \
327327
sleep 3; \
328328
./out/ap operator --config=config/operator-sepolia.yaml > logs/operator-sepolia.log 2>&1 & \
329329
wait

config/README.md

Lines changed: 33 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,58 @@
1-
# `config/` — service configuration
1+
# `config/` — service & test configuration
22

3-
The aggregator binary (`ap`) runs as one of three roles depending on its
4-
subcommand: **gateway**, **worker**, or **operator**. Each role needs a
5-
YAML config passed via `--config=<path>`.
3+
The `ap` binary runs as one of three roles depending on its subcommand:
4+
**gateway**, **worker**, or **operator**. Each role needs a YAML config passed
5+
via `--config=<path>`. This directory holds the **local-dev** templates for
6+
those roles plus the **Go test-suite** fixture.
67

7-
> **Production Railway configs moved.** The prod `*-railway.yaml` configs now
8-
> live in the `avs-infra` repo (`railway/configs/`) and are delivered to each
9-
> Railway service via the `AP_CONFIG_YAML` env var (the image entrypoint writes
10-
> it to `config/runtime.yaml` at boot). They are no longer in this repo or baked
11-
> into the public image. This directory now holds only **local-dev and sample**
12-
> configs.
8+
> **Production configs live in `avs-infra`.** The prod `*-railway.yaml` configs
9+
> are maintained in the `avs-infra` repo and delivered to each service via the
10+
> `AP_CONFIG_YAML` env var (the image entrypoint writes it to
11+
> `config/runtime.yaml` at boot). They are not kept in this repo.
1312
1413
## Layout
1514

1615
```
1716
config/
18-
├── README.md — this file
19-
├── test.example.yaml — Go test-suite fixture template
20-
├── test.yaml — Go test-suite fixture, real (gitignored)
17+
├── README.md — this file
2118
22-
├── gateway-dev.example.yaml — local-dev gateway template
23-
├── gateway-dev.yaml — local-dev gateway, real (gitignored)
19+
├── test.example.yaml — Go test-suite fixture template
20+
├── test.yaml real fixture, gitignored
2421
25-
├── worker-<chain>-dev.example.yaml — per-chain local-dev worker template
26-
├── worker-<chain>-dev.yaml — per-chain local-dev worker, real (gitignored)
22+
├── gateway.example.yaml local-dev gateway template
23+
├── gateway.yaml real, gitignored
2724
28-
└── operator-<chain>.yaml — local operator configs (gitignored symlinks)
25+
├── worker-<chain>.example.yaml — per-chain local-dev worker template
26+
├── worker-<chain>.yaml — real, gitignored
27+
28+
├── operator-<chain>.example.yaml — per-chain local-dev operator template
29+
└── operator-<chain>.yaml — real, gitignored
2930
```
3031

31-
Production `*-railway.yaml` configs live in `avs-infra` (`railway/configs/`),
32-
not here — see the note above.
32+
Naming is uniform across the three roles: `<role>[-<chain>].yaml` for the local
33+
config, `<role>[-<chain>].example.yaml` for the checked-in template. Production
34+
counterparts are `<role>[-<chain>]-railway.yaml` over in `avs-infra`.
3335

3436
## When to use which
3537

3638
| Scenario | Config file |
3739
|---|---|
38-
| Production (any role) on Railway | `avs-infra``railway/configs/<svc>-railway.yaml`, delivered via `AP_CONFIG_YAML` |
40+
| Production (any role) | `avs-infra``railway/configs/<svc>-railway.yaml`, delivered via `AP_CONFIG_YAML` |
3941
| Running the Go test suite | `test.yaml` (copy from `test.example.yaml`, fill in RPC + Tenderly). Loaded as `testutil.DefaultConfigPath`; **not** a server config. |
40-
| Local dev gateway | `gateway-dev.yaml` (copy from `gateway-dev.example.yaml`, fill in secrets) |
41-
| Local dev worker for chain N | `worker-<chain>-dev.yaml` (same copy pattern) |
42-
43-
`scripts/start.sh` in the studio repo wires up the local-dev gateway +
44-
all workers + operator pane via these config files. See that script
45-
for the exact `--config=` invocations.
42+
| Local dev gateway | `gateway.yaml` (copy from `gateway.example.yaml`) — `make gateway` |
43+
| Local dev worker for chain N | `worker-<chain>.yaml` (copy from the template) |
44+
| Local dev operator for chain N | `operator-<chain>.yaml` (copy from the template) |
4645

4746
## `.example` template convention
4847

49-
Templates checked into git carry the `.example.yaml` suffix. The real
50-
file (same name, no `.example.`) is gitignored and carries actual
51-
secrets — controller keys, JWT signing keys, paymaster ownership keys.
52-
Copy template → real:
48+
Templates checked into git carry the `.example.yaml` suffix. The real file
49+
(same name, no `.example.`) is gitignored because it carries secrets —
50+
controller keys, JWT signing keys, key-store paths. Copy template → real:
5351

5452
```bash
55-
cp config/gateway-dev.example.yaml config/gateway-dev.yaml
56-
$EDITOR config/gateway-dev.yaml # fill in <placeholder> values
53+
cp config/gateway.example.yaml config/gateway.yaml
54+
$EDITOR config/gateway.yaml # fill in <placeholder> values
5755
```
5856

59-
The `.gitignore` excludes any `config/*-dev.yaml` and a few specific
60-
names (`gateway-dev.yaml`, `aggregator.yaml`, `operator.yaml`) — see
61-
the top-level `.gitignore` for the full list.
62-
63-
## Pre-Railway bare-metal templates (moved)
64-
65-
The pre-Railway deployment model (one aggregator per chain + a single
66-
operator binary) and its config templates moved to **avs-infra**
67-
(`terraform/docs/archived-baremetal-templates/`), next to the terraform
68-
that deployed that bare-metal stack — which is now being decommissioned.
69-
Per-chain aggregator configs that may still exist locally as gitignored
70-
symlinks to a secrets-sync directory are no longer referenced by any
71-
in-repo code path, except the one documented exception below.
72-
73-
## Migration history (Option C — multi-phase config cleanup, all phases now done)
74-
75-
**Phase 1** (this PR's first commit): documentation + `archived/`
76-
templates + deleted the stale `_legacy/` snapshot.
77-
78-
**Phase 2** (this PR): migrated `core/testutil/utils.go` and the
79-
integration tests under `core/taskengine/*_test.go` +
80-
`integration_test/` off the per-chain `aggregator-<chain>.yaml`
81-
pattern onto a single shared fixture.
82-
83-
**Phase 3**: split the **test fixture** out from the gateway server
84-
config so the name stops being overloaded. `testutil.DefaultConfigPath`
85-
now points at `test.yaml` (copied from `test.example.yaml`); the CI
86-
bootstrap script (`.github/scripts/generate-test-config.sh`) generates
87-
`config/test.yaml`. The gateway server still uses `gateway-dev.yaml`.
88-
89-
**Phase 3** (this PR): replaced the Makefile
90-
`aggregator-{sepolia,ethereum,base,base-sepolia}` targets with a
91-
single `make gateway-dev`. The old targets remain as redirect stubs
92-
that print a deprecation notice and exit non-zero, so old runbooks
93-
fail loudly rather than silently doing the wrong thing. Updated
94-
`scripts/aa-wallet-toolkit.sh`, the backfill-tool docstrings, and
95-
`docs/Development.md` at the same time.
96-
97-
**Phase 4** (this PR): with no live callers left, the per-chain
98-
`aggregator-<chain>.yaml` symlinks (pointing at gitignored configs
99-
in a separate env repo) are no longer referenced by any in-repo code
100-
path. They can be deleted from local dev environments at any time;
101-
nothing in the repo tracks them.
102-
103-
### Known exception
104-
105-
`core/taskengine/userops_withdraw_test.go:30` still loads
106-
`config/aggregator-base.yaml` — but the test is gated by
107-
`TEST_CHAIN=base` and gracefully skips when the config is missing.
108-
Base mainnet (chain ID 8453) isn't in `gateway-dev.yaml`'s default
109-
`chains:` block (which covers Sepolia + Base Sepolia for local dev),
110-
so this developer-only opt-in test keeps its own per-chain fixture
111-
until either:
112-
113-
- Base mainnet is added to `gateway-dev.yaml`'s `chains:` and the
114-
test is refactored to select that block, or
115-
- The test is removed as obsolete.
116-
117-
Neither is in scope for this cleanup.
57+
`.gitignore` ignores every `config/*.yaml` and keeps `config/*.example.yaml`,
58+
so the real configs stay untracked while the templates are versioned.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This is a checked-in template. The real file is gitignored — copy it
44
# and fill in the placeholder values:
55
#
6-
# cp config/gateway-dev.example.yaml config/gateway-dev.yaml
7-
# $EDITOR config/gateway-dev.yaml
6+
# cp config/gateway.example.yaml config/gateway.yaml
7+
# $EDITOR config/gateway.yaml
88
#
99
# Replaces per-chain aggregator configs. Routes tasks to chain workers
1010
# based on chain_id. Single DB for all chains; keys are chain-scoped
@@ -38,7 +38,7 @@ jwt_secret: <random-hex-string>
3838
rest_rate_limit_per_second: 200
3939
rest_rate_limit_burst: 1000
4040

41-
server_name: "gateway-dev"
41+
server_name: "gateway"
4242
# Optional: Sentry DSN for error reporting (leave empty for no reporting).
4343
sentry_dsn: ""
4444

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Operator configuration TEMPLATE for Sepolia (chain 11155111).
2+
#
3+
# This is a checked-in template. The real file is gitignored — copy it
4+
# and fill in the placeholder values:
5+
#
6+
# cp config/operator-sepolia.example.yaml config/operator-sepolia.yaml
7+
# $EDITOR config/operator-sepolia.yaml
8+
#
9+
# The operator registers with EigenLayer, signs task results with its BLS
10+
# key, and connects to a gateway/aggregator. Running operators in any
11+
# hosted environment is configured from the avs-infra repo; this template
12+
# is for local development only.
13+
environment: development
14+
15+
# Your operator EOA (must be registered with EigenLayer).
16+
operator_address: <operator-eoa-address>
17+
18+
# AVS contracts (Sepolia testnet — the AVS registration chain).
19+
avs_registry_coordinator_address: 0xcA95381802FD1398d5BF2D01243210cFb3a2b3BD
20+
operator_state_retriever_address: 0x070E0ABE8407eb4727fC7C5284bdc1e5E5CBf605
21+
22+
# RPC endpoints for AVS operations (Sepolia). Public RPC works for dev.
23+
eth_rpc_url: https://ethereum-sepolia-rpc.publicnode.com
24+
eth_ws_url: wss://ethereum-sepolia-rpc.publicnode.com
25+
26+
# Local key store paths (absolute paths to your testnet key files).
27+
ecdsa_private_key_store_path: <path-to-ecdsa-key.json>
28+
bls_private_key_store_path: <path-to-bls-key.json>
29+
30+
# Optional BLS remote signer (skip bls_private_key_store_path when used).
31+
# bls_remote_signer:
32+
# grpc_url: "127.0.0.1:50051"
33+
# public_key: "<bls-public-key>"
34+
# password: ""
35+
36+
# Gateway/aggregator the operator connects to (local dev gateway).
37+
aggregator_server_ip_port_address: "127.0.0.1:2206"
38+
39+
# AVS node spec metrics / node API (https://eigen.nethermind.io/docs/spec/intro).
40+
eigen_metrics_ip_port_address: localhost:9090
41+
enable_metrics: true
42+
node_api_ip_port_address: localhost:9010
43+
enable_node_api: true
44+
45+
# Operator-local storage path.
46+
db_path: /tmp/ap-avs-operator
47+
48+
# Optional error reporting.
49+
# sentry_dsn: ""
50+
# server_name: operator-sepolia-1
51+
# sentry_environment: staging
52+
53+
# Destination chain where tasks run (Sepolia).
54+
target_chain:
55+
eth_rpc_url: https://ethereum-sepolia-rpc.publicnode.com
56+
eth_ws_url: wss://ethereum-sepolia-rpc.publicnode.com
57+
58+
# Feature toggles.
59+
enabled_features:
60+
# Event triggers need a websocket RPC that streams all on-chain events;
61+
# this can be billing-heavy depending on your provider.
62+
event_trigger: true

config/worker-base-sepolia-dev.example.yaml renamed to config/worker-base-sepolia.example.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This is a checked-in template. The real file is gitignored — copy it
44
# and fill in the placeholder values:
55
#
6-
# cp config/worker-base-sepolia-dev.example.yaml config/worker-base-sepolia-dev.yaml
7-
# $EDITOR config/worker-base-sepolia-dev.yaml
6+
# cp config/worker-base-sepolia.example.yaml config/worker-base-sepolia.yaml
7+
# $EDITOR config/worker-base-sepolia.yaml
88
#
99
# Handles chain-specific execution: UserOps, contract writes, token
1010
# enrichment. Stateless — no local DB (gateway owns storage).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# This is a checked-in template. The real file is gitignored — copy it
44
# and fill in the placeholder values:
55
#
6-
# cp config/worker-sepolia-dev.example.yaml config/worker-sepolia-dev.yaml
7-
# $EDITOR config/worker-sepolia-dev.yaml
6+
# cp config/worker-sepolia.example.yaml config/worker-sepolia.yaml
7+
# $EDITOR config/worker-sepolia.yaml
88
#
99
# Handles chain-specific execution: UserOps, contract writes, token
1010
# enrichment. Stateless — no local DB (gateway owns storage).

docs/ARCHITECTURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ Data format: Protocol Buffer JSON serialization. Migrations run on startup (idem
273273

274274
Environment-specific YAML files in `config/`:
275275
- `archived/aggregator.example.yaml` — Reference config with all fields documented
276-
- `gateway-dev.yaml` — Local-dev gateway config (multi-chain; replaces the pre-Railway per-chain configs)
276+
- `gateway.yaml` — Local-dev gateway config (multi-chain; replaces the pre-Railway per-chain configs)
277277
- `operator-*.yaml` — Operator configs per chain
278278

279279
Key config sections: smart wallet (RPC, bundler, factory, entrypoint), fee rates (tier-based pricing), macros/secrets (global workflow variables), approved operators list.

0 commit comments

Comments
 (0)