@@ -52,10 +52,21 @@ Registry (SNRC) over a small JSON HTTP API. It talks to the same local
5252Reth + Nimbus stack described above (set ` NETWORK=mainnet ` in ` .env ` ),
5353reading the SNRC contracts directly on Ethereum mainnet.
5454
55- Install the only runtime dependency (same as ` ens-lookup.py ` ):
55+ Dependencies are declared inline (PEP 723) at the top of ` snrc-resolve.py `
56+ and in a sibling ` pyproject.toml ` . The simplest local run uses
57+ [ ` uv ` ] ( https://docs.astral.sh/uv/ ) :
5658
5759``` sh
58- pip install --break-system-packages ' eth-hash[pycryptodome]'
60+ uv run scripts/resolver/snrc-resolve.py
61+ ```
62+
63+ ` uv ` resolves and caches ` eth-hash[pycryptodome] ` on first run. No
64+ virtualenv juggling, no ` --break-system-packages ` . If you'd rather
65+ manage Python deps yourself:
66+
67+ ``` sh
68+ pip install ' eth-hash[pycryptodome]>=0.7'
69+ python scripts/resolver/snrc-resolve.py
5970```
6071
6172### Deployed registries
@@ -93,6 +104,38 @@ snrc-resolve listening on 0.0.0.0:8000
93104
94105Override the listen port or bind address with ` SNRC_PORT ` / ` SNRC_BIND ` .
95106
107+ ### Running in Docker
108+
109+ The compose file ships a ` resolver ` service alongside reth and nimbus.
110+ ` docker compose up -d ` builds the image from ` Dockerfile ` (multi-stage,
111+ non-root, ` uv ` -based) and exposes the API on ` 127.0.0.1:8000 ` :
112+
113+ ``` sh
114+ docker compose up -d resolver
115+ docker compose logs -f resolver
116+ curl -s http://127.0.0.1:8000/health
117+ ```
118+
119+ The container points ` SNRC_RPC ` at ` http://reth:8545 ` (the compose-internal
120+ DNS name) so the resolver and reth share the bridge network without
121+ exposing reth's RPC to the host beyond loopback.
122+
123+ To change the host-side port, edit the LEFT side of the port mapping in
124+ ` docker-compose.yml ` :
125+
126+ ``` yaml
127+ resolver :
128+ ports :
129+ - " 127.0.0.1:8000:8000" # host:container
130+ ` ` `
131+
132+ The registry address defaults to mainnet ` .testing` — to override (Holesky,
133+ a private deployment, or future `.simplex`), uncomment and set the values
134+ in `docker-compose.yml` under the resolver service's `environment:` block.
135+
136+ The image declares a `HEALTHCHECK` against `/health`; `docker compose ps`
137+ will mark the service `(healthy)` once reth is queryable.
138+
96139# ## Resolving a name
97140
98141` foobar.testing` is registered on mainnet with every text and
0 commit comments