Event bus: build high-rate topics only for clients that subscribed to them
Mantenedores costumam responder em até 6 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- rust
- Domínio
- backend, distributed-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 86
- Forks
- 34
- Merge médio
- 9d 20h
- PRs com merge (30d)
- 77
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de lambdaclass/ethlambda
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
lambdaclass/ethlambda#850 ·
Mantenedores costumam responder em até 6 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
lambdaclass/ethlambda#777 · 1 reação ·
Mantenedores costumam responder em até 6 dias
-
Run all gossip validation testsTalvez livre de novo @dicethedev assumiu há 9 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
lambdaclass/ethlambda#725 · 2 comentários ·
Mantenedores costumam responder em até 6 dias
-
Handle malformed DB dataTalvez livre de novo @dicethedev assumiu há 115 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
lambdaclass/ethlambda#529 · 4 comentários ·
Mantenedores costumam responder em até 6 dias
-
Document architectural choicesTalvez livre de novo @dicethedev assumiu há 115 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
lambdaclass/ethlambda#521 · 2 comentários ·
Mantenedores costumam responder em até 6 dias
Todas as issues de lambdaclass/ethlambda
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
antithesishq/bombadil#473 ·
Mantenedores costumam responder em até 2 dias
-
bench/api.sh exec test fails with curl exit 52, and --ignore-failure still records the timingsAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
libracoder/kiri#669 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 5 dias
-
autofixer: follow-up
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
tursodatabase/turso#12217 ·
Mantenedores costumam responder em até 1 dia
-
Declare the CMS schema library in the optional recipients extraTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaarea:python in-progress
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
yhay81/pyropdf#1005 · 2 comentários ·
Mantenedores costumam responder em até 1 dia