Check the payload block hash rule on live nodes before gloas refuses

Abierto
#818 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Start with crates/net/p2p/src/beacon/payload_hash.rs and docs/spec_deviations.md; review the existing counters and ignored payload_hash::tests::verify_block_cost test. After deployment, track mismatch and validation overload metrics across the named networks for several days, measure worst case peak memory, and verify final header fields and the envelope counter on Platåberget before changing envelope_verdict to refuse mismatches.

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

Descripción

lambdaclass/ethlambda#770 added a rule the consensus specification does not have: beacon p2p rebuilds the execution header from a payload's fields and compares keccak256(rlp(header)) with its block_hash (crates/net/p2p/src/beacon/payload_hash.rs). A pre-gloas gossip block that does not match is IGNOREd. A gloas envelope is only counted and logged, because the Amsterdam header may still change. The PR pinned the encoding with real-chain vectors per fork and a local check over 200 mainnet blocks, but nothing on a running node, which is out of a code review's scope.

What to measure once it is deployed:

  • lean_beacon_payload_block_hash_mismatch_total{kind} on the mainnet, Hoodi, Sepolia and Platåberget followers: it should stay at zero for several days. A non-zero block count means honest blocks are being dropped from gossip. A non-zero envelope count means the gloas encoding is off.
  • Validation-permit saturation on beacon_block: the rate of lean_beacon_gossip_validation_total{kind="beacon_block",reason="overloaded"} before and after. The hash runs inside a gossip_validation_permits permit (about 0.24 ms for a 238-transaction mainnet block, up to 0.6 s for the worst-case block at the size limit; see docs/spec_deviations.md).
  • Peak memory of the worst case (1,048,576 tiny transactions, each copied into the trie). It was not measured; the ignored payload_hash::tests::verify_block_cost could measure it locally.

Before gloas refuses on a mismatch (envelope_verdict in payload_hash.rs):

  • re-pin block_access_list_hash and slot_number against the final EIP-7928 and EIP-7843 header, with a real envelope from a network on the final header;
  • check the envelope counter has stayed at zero on Platåberget.

Refusing would then mean turning envelope_verdict into the same Ignore(PayloadBlockHashMismatch) path block_verdict uses.

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.