Give the metrics server its own bind address

Ouverte
#817 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 6 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
53/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
api, backend

Piste de recherche

Start with the --http-address definition in bin/ethlambda/src/cli.rs:37-38 and start_http_servers in crates/net/rpc/src/lib.rs:118-138; then inspect Options::validate_ports and the RPC documentation. Add the separate metrics bind address with the stated default and address-aware port rule, then update the flag table and trust section in docs/rpc.md. The optional pprof flag is explicitly optional; done means the API and metrics servers can bind separately while existing setups keep working.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Problem. Both HTTP servers bind the one --http-address. The flag is defined at bin/ethlambda/src/cli.rs:37-38, and start_http_servers binds both servers to it at crates/net/rpc/src/lib.rs:118-138. So an operator whose Prometheus scrapes from another host has to move the API off loopback as well. That API is the one lambdaclass/ethlambda#778's "What the servers trust" section says must not be exposed, since anyone reaching it can:

  • redirect fee recipients;
  • join subnets;
  • trigger payload builds.

The only thing left keeping the two apart is a per-port firewall rule. The metrics server also carries the jemalloc heap-profile endpoints (/debug/pprof/allocs), which a default Linux build serves.

Why it is out of scope. lambdaclass/ethlambda#778 is docs-only. It documents the shared address and does not change the CLI.

Fix. Add --metrics-address, defaulting to --http-address's value so existing setups keep working, and serve metrics_app on it in start_http_servers. Equal ports would then merge only when the two addresses are equal too, and Options::validate_ports would need the same rule. Optionally, put /debug/pprof/* behind an opt-in flag, so a scrape-only exposure does not also serve heap profiles. Update the flag table and the trust section in docs/rpc.md.

Langage dominant
Rust
Étoiles
86
Forks
34
Merge moyen
9 j 20 h
PR mergées (30 j)
77

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de lambdaclass/ethlambda

Toutes les issues de lambdaclass/ethlambda

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.