Event bus: build high-rate topics only for clients that subscribed to them
I maintainer di solito rispondono entro 6 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- backend, distributed-systems
Direzione di ricerca
Start with crates/blockchain/src/events.rs and crates/net/rpc/src/events.rs, then trace the producer gates and sink trait in ethlambda-network-api; the issue describes two possible designs. Run or add a test where a client subscribes only to head. Done when that subscription does not build single_attestation, and the relevant high-rate topics are handled by the chosen design.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem. EventBus::has_subscribers is receiver_count() > 0 (crates/blockchain/src/events.rs:644). Every producer gates on it, so a single SSE client turns on every topic's payload construction, whatever ?topics= it asked for: a validator client that only wants head, for example. The filtering happens afterwards, in the stream (crates/net/rpc/src/events.rs, !topics.contains(&ev.topic())).
For the two high-rate beacon topics that means:
single_attestation(lambdaclass/ethlambda#757) clones every subnet attestation the node accepts: every vote on its backbone subnets, plus the duty subnets it joins.attestationclones every accepted aggregate.
Both go into the one ring all topics share (CHAIN_EVENT_CHANNEL_CAPACITY, 8192, events.rs:600). A client whose connection stalls lags after capacity / total rate, and loses the low-rate events it did ask for, which it learns only from the dropped N messages comment frame. The doc on CHAIN_EVENT_CHANNEL_CAPACITY already names this and calls a per-topic split "the escape hatch". The rates on a mainnet node are not measured; lean_-prefixed counters per topic emitted would measure them.
Why not in lambdaclass/ethlambda#757. 757 adds one producer and follows the bus's existing gate, as attestation already does. Per-topic interest changes the bus, the SSE handler and every producer's gate.
Fix. Either of two:
- Count subscriptions per
Topic. The SSE handler registers its topic set with a guard that decrements on drop, andEventBus::wants(Topic)replaceshas_subscribersat each producer; the sink trait inethlambda-network-apigrows the same method. - Keep
has_subscribers, but givesingle_attestationandattestationa ring of their own, so their rate cannot push low-rate events out of a slow client's window.
A test: a client subscribed to head alone causes no single_attestation to be built.
Also high-rate (from lambdaclass/ethlambda#748): the gloas payload_attestation_message and execution_payload_bid events are built per message too, so the same per-topic interest check should cover them.
- Lingua principale
- Rust
- Stelle
- 86
- Fork
- 34
- Merge medio
- 9g 20h
- PR unite (30g)
- 77
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lambdaclass/ethlambda
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lambdaclass/ethlambda#850 ·
I maintainer di solito rispondono entro 6 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
lambdaclass/ethlambda#777 · 1 reazione ·
I maintainer di solito rispondono entro 6 giorni
-
Run all gossip validation testsForse di nuovo libera @dicethedev l’ha presa 9 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lambdaclass/ethlambda#725 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
Handle malformed DB dataForse di nuovo libera @dicethedev l’ha presa 115 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
lambdaclass/ethlambda#529 · 4 commenti ·
I maintainer di solito rispondono entro 6 giorni
-
Document architectural choicesForse di nuovo libera @dicethedev l’ha presa 115 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
lambdaclass/ethlambda#521 · 2 commenti ·
I maintainer di solito rispondono entro 6 giorni
Tutte le issue di lambdaclass/ethlambda
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
antithesishq/bombadil#473 ·
I maintainer di solito rispondono entro 2 giorni
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
libracoder/kiri#669 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
autofixer: follow-up
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
tursodatabase/turso#12217 ·
I maintainer di solito rispondono entro 1 giorno
-
Declare the CMS schema library in the optional recipients extraForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaarea:python in-progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
yhay81/pyropdf#1005 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno