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

Ouverte
#858 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 6 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
56/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust
Domaine
api

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Rust
Étoiles
86
Forks
34
Merge moyen
9 j 20 h
PR mergées (30 j)
77

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de lambdaclass/ethlambda

Toutes les issues de lambdaclass/ethlambda

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.