Beacon API: serve states/{state_id}/committees and blocks/{block_id}/attestations

Abierto
#858 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust
Área
api

Línea de trabajo

The payload names only docs/rpc.md; start by locating the existing beacon API route table and the committee shuffling the node already computes during attestation validation. Implement GET /eth/v1/beacon/states/{state_id}/committees with the epoch, index and slot filters, then GET /eth/v2/beacon/blocks/{block_id}/attestations honouring Eth-Consensus-Version, and add both to docs/rpc.md. Done means xatu sentry, assertoor and slashoor receive real data instead of 404s.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem. GET /eth/v1/beacon/states/{state_id}/committees and GET /eth/v2/beacon/blocks/{block_id}/attestations are not served. Three of ethereum-package's tools depend on them. These findings come from reading each tool's source against main (b2722cfd); nothing was run.

  • xatu sentry (one per participant): its duties service fetches states/head/committees.
    • On the 404 it retries for 15 minutes and then never reports ready.
    • Every event handler checks that readiness, so the sentry stays up but drops every event (head, block, attestation, data column, proposer duties) and logs an error for each.
    • Removing attestation from its subscriptions does not avoid this: the package's template also enables committee fetching.
  • assertoor: check_consensus_attestation_stats asks for committees by state root. The task never records a result, so the bundled stability-check playbook never passes.
    • On an ethlambda-only network the state-root lookup in lambdaclass/ethlambda#857 is needed as well.
    • In a mixed network it can pass by chance, when the request goes to another client.
  • slashoor: it reads blocks/{id}/attestations and the committees to find double and surround votes.
    • On 404s it processes zero attestations and logs nothing, so it misses every attester slashing.
    • Proposer slashings still work.

Fix.

  • Serve GET /eth/v1/beacon/states/{state_id}/committees, with the epoch, index and slot filters, from the committee shuffling the node already computes for attestation validation.
  • Serve GET /eth/v2/beacon/blocks/{block_id}/attestations, with Eth-Consensus-Version.
  • Document both in docs/rpc.md.
Lenguaje dominante
Rust
Estrellas
86
Forks
34
Merge medio
9 d 20 h
PR fusionados (30 d)
77

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lambdaclass/ethlambda

Todos los issues de lambdaclass/ethlambda

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.