@@ -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,33 @@ 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:${SNRC_PORT:-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. The registry address
122+ defaults to mainnet ` .testing ` — to override (Holesky, a private
123+ deployment, or future ` .simplex ` ), uncomment and set the values in ` .env ` :
124+
125+ ``` sh
126+ # .env
127+ SNRC_REGISTRY_TESTING=0xYOUR_REGISTRY...
128+ SNRC_REGISTRY_SIMPLEX=0xYOUR_REGISTRY...
129+ ```
130+
131+ The image declares a ` HEALTHCHECK ` against ` /health ` ; ` docker compose ps `
132+ will mark the service ` (healthy) ` once reth is queryable.
133+
96134### Resolving a name
97135
98136` foobar.testing ` is registered on mainnet with every text and
0 commit comments