columns: a corrupt parent state is re-read once per sidecar of a group since #788 met #754

Ouverte
#839 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
78/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust

Piste de recherche

Start with ChainPrechecks::judge_header in crates/blockchain/state_transition/src/beacon/gossip/column.rs and the StateRebuilds documentation in crates/storage/src/state_writer.rs. Add a test showing that a corrupt parent state is read once for a multi sidecar group, while other read errors still retry. Update the reason="internal" description for lean_data_columns_rejected_total in docs/metrics.md, then run the relevant state transition tests.

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

Description

Problem. Merging main into lambdaclass/ethlambda#788 put the PR's "a failed parent-state read drops the sidecar" rule inside main's grouped column prechecks (#754). There, ChainPrechecks::judge_header (crates/blockchain/state_transition/src/beacon/gossip/column.rs) does not remember an Err from get_state. That is deliberate, so that one transient read error does not drop the whole block: the group's next sidecar reads the state again.

For a corrupt parent state, though, every one of those reads fails. A group then re-reads it once per sidecar, one after another on the group's permit, up to the block's 128 columns. Each attempt is a full failed rebuild (about a second of CPU, by the StateRebuilds doc in crates/storage/src/state_writer.rs) plus an error! line. That works against #788's own rule that a corrupt root is read once and shared (Error::CorruptState). Verdicts are unaffected: every sidecar is dropped as Ignore(Internal) either way. Only on-disk corruption triggers it.

A related doc gap: the lean_data_columns_rejected_total section of docs/metrics.md still says reason="internal" counts the sidecars that a panic in the checks cost. Since the merge, it also counts sidecars dropped for a failed parent-state read.

Why it is a follow-up. #788 is approved and in the merge queue. The re-read only costs CPU on a node whose store is already corrupt.

Fix.

  • In judge_header, remember the drop for the block's parent when the error is ethlambda_storage::Error::CorruptState, so the rest of the group is dropped without reading again. Keep reading again on any other Err.
  • Add a test: a corrupt parent state is read once for a multi-sidecar group.
  • Add the failed-read case to the reason="internal" text in docs/metrics.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.