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

Aberta
#818 0 comentários 0 reações 0 responsáveis Ver no GitHub

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
35/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
86
Forks
34
Merge médio
9d 20h
PRs com merge (30d)
77

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de lambdaclass/ethlambda

Todas as issues de lambdaclass/ethlambda

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.