sdk_relay/docs/ANALYSE.md
4NK Dev 72bbffb31c
All checks were successful
build-and-push-ext / build_push (push) Successful in 1m28s
feat: add /health endpoint on port 8091
- Add HTTP health server on port 8091
- Add CI workflow for dev4 branch with ext tag
- Health endpoint returns {"status":"ok"} for monitoring

ci: docker_tag=ext
2025-09-19 13:12:35 +00:00

38 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Analyse détaillée
### Périmètre
Service Rust `sdk_relay` interfaçant Bitcoin (RPC), Blindbit et WebSocket, avec configuration injectée.
### Stack
- **Langage**: Rust 2021
- **Dépendances**: `tokio`, `tokio-tungstenite`, `zeromq`, `bitcoincore-rpc`, `serde[_json]`, `env_logger`, `futures-util`, `sdk_common` (git, branche `dev`, features `parallel`, `blindbit-backend`).
### Build et image
- Docker multiétapes: build dans `rust:latest` avec SSH pour deps privées, exécution `debian:bookworm-slim`.
- Binaire: `/usr/local/bin/sdk_relay`.
- Conf: buildarg `CONF` écrit dans `/home/bitcoin/.conf`.
- Volumes: `/home/bitcoin/.4nk`, `/home/bitcoin/.bitcoin`.
### Réseau et healthcheck
- Ports: 8090, 8091 (exposés). Health: `GET /health` (via compose parent).
### Logs
- `RUST_LOG` géré par env; dans `lecoffre_node`, sortie tee vers `/home/bitcoin/.4nk/logs/sdk_relay.log`.
### Risques et points dattention
- Dépendance `sdk_common` via git/branche `dev`: geler par tag/commit pour reproductibilité.
- Image dexécution embarque `strace`; vérifier nécessité en prod.
- Permissions volume Windows: note de chown partiel dans compose parent.
### Actions proposées
- Pinner `sdk_common` sur un commit ou tag; documenter politique de mise à jour.
- Séparer images `-dev` et `-prod` si `strace` non requis.
- Documenter format du fichier de conf (`sdk_relay.conf`) et valeurs par défaut.