Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

feat(eth2api): wire --beacon-node-headers into the beacon node client

Aperta
#709 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@varex83agent ci sta già lavorando.

Dal 29/9/2026.

  • #717 di @varex83agent — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start with crates/eth2api/src/client.rs, crates/app/src/node/mod.rs, and crates/core/src/validatorapi/router.rs, then trace parse_http_headers and the run configuration in crates/cli/src/commands/run.rs. Check the SSE listener and tracing configuration for URL and header logging paths. Done means the flag is accepted, headers reach both beacon-node clients and the validator proxy, and header values or URL userinfo do not appear in logs or metric labels.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Problem

--beacon-node-headers is parsed and validated, then rejected at startup by check_unsupported_flags: flag '--beacon-node-headers' is not yet supported by pluto run. Beacon nodes behind auth cannot be used.

Wiring required

  1. Headers on the HTTP client. EthBeaconNodeApiClient sets only ACCEPT and ETH_CONSENSUS_VERSION. Build the inner reqwest::Client with default_headers(...), which also covers the SSE /eth/v1/events stream.
  2. Plumb the parsed map. parse_http_headers is implemented and tested but has no non-test callers. Pass the map through build_api_client to both eth2_cl and submission_client.
  3. Validator API proxy. Inject the same headers in crates/core/src/validatorapi/router.rs, alongside the upstream basic-auth handling already there.
  4. Drop the flag from check_unsupported_flags, and add the field to AppConfig and build_app_config's exhaustive destructure.

--fallback-beacon-node-endpoints stays blocked on multi-endpoint support (TODO #402 part B). When fallbacks land they must receive the same header map — Charon's NewMultiHTTP calls newClients twice with one map.

Log leaks to fix alongside

Charon's redact only matches flags containing auth-token or address, so it prints --beacon-node-headers verbatim in its "Parsed config" line. Pluto should be stricter — no observable behaviour depends on log contents.

  • Live. warn_ignored_flags logs headers = ?config.otlp_headers at WARN whenever --otlp-address is set. --otlp-headers carries Authorization=Basic … / x-honeycomb-team=…. Log header names or a count.
  • Latent. The SSE listener takes client.base_url().to_string() as addr and uses it in ~15 log fields and as a metric label. url's Display includes userinfo, so https://user:pass@bn would reach logs and /metrics. Fix before the listener is wired into pluto run.
  • Hold the parsed headers in a newtype whose Debug shows names only. RunConfig derives Debug, so a ?config anywhere would otherwise dump them.
  • Promote redact_url_userinfo to a shared helper and apply it to BN and keymanager URLs in both log fields and metric labels.

Verified clean: reqwest strips URL userinfo into an Authorization header before a Request exists, so EthBeaconNodeApiClientError::Transport carries no credentials in Display or Debug.

Lingua principale
Rust
Stelle
8
Fork
6
Merge medio
4g 20h
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NethermindEth/pluto

Tutte le issue di NethermindEth/pluto

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.