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

Converge the coexisting subscription mechanisms

Aperta
#606 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia confrontando le implementazioni delle sottoscrizioni denominate in crates/core/src/scheduler.rs, crates/app/src/sse/mod.rs, crates/core/src/sigagg.rs e app/node/wire.rs, usando la semantica wireX di Charon come riferimento per la parità. Definisci le forme di sottoscrizione approvate e le regole relative a durata, scarto, ritardo, errori e annullamento della sottoscrizione, quindi migra le implementazioni divergenti e verifica che la semantica documentata sia coerente in tutto il workspace.

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

Descrizione

enhancement rust

Summary

The workspace has six mutually incompatible subscription patterns, with divergent semantics for lifetime, drop, lagging, and error propagation:

  1. tokio broadcast + spawned pump — only in the scheduler (the sole broadcast use in the workspace).
  2. Vec<mpsc::Sender<T>> fan-out — SSE listener, with both a builder-time and an actor-round-trip runtime subscribe (sse/mod.rs#L68).
  3. watch::Receiver-returning subscribe() — p2p peers, dkg sync, readiness.
  4. Sync Box<dyn Fn> callback vectors — consensus wrapper/qbft/priority; the prioritiser's is documented "Not thread safe relative to a running instance".
  5. Arc<dyn Fn> -> BoxFuture callback vectors — sigagg, parsigdb, fetcher (a consuming-builder variant), bcast, parsigex, validatorapi. Five different receiver forms (&self, &mut self, async &self, self -> Self, interior Mutex).
  6. Charon-style function-pointer wiring in app/node/wire.rs.

Semantics diverge where it matters:

  • Lagged is handled only in the scheduler, by silently and permanently unsubscribing the lagging subscriber; Closed also breaks silently.
  • Subscriber errors: scheduler logs and continues; sigagg propagates with ?, so one failing subscriber aborts the remaining ones (same in parsigdb) — this asymmetry is load-bearing for duty completion.
  • No subscribe() anywhere returns an unsubscribe handle (scheduler TODO), and the scheduler documents a known leak of detached tasks for stuck handlers.

Related: #84 (make sub calling non-blocking).

Proposed change

This is a design task first: pick one or two blessed shapes (e.g. broadcast/watch channels for events, an async-callback registry with defined error semantics for duty pipeline stages), and document lifetime/drop/lag/error rules. Then migrate the outliers. Concrete decisions to make:

  • Should a subscriber error abort sibling subscribers (current sigagg/parsigdb) or be isolated (current scheduler)? Charon's wireX semantics are the parity reference.
  • What happens on lag: drop events, kill the subscription (current), or apply backpressure?
  • Unsubscribe/drop story: handles vs relying on channel closure.
Lingua principale
Rust
Stelle
8
Fork
6
Merge medio
4g 3h
PR unite (30g)
18

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.