blockchaintest: blocks are executed from the decoded JSON fields, so the block RLP body is never validated against its header
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- blockchain, testing
Línea de trabajo
The runner currently applies blockchain_test blocks from the JSON decoded fields (blockHeader, transactions, uncleHeaders, withdrawals) instead of decoding the rlp bytes and checking that body against the header. Find where fixtures are loaded and blocks executed, then decode rlp as [header, txs, ommers, withdrawals] and fail when that body does not match the committed transactionsTrie (and related header fields). Done when a fixture whose rlp body was edited (last tx dropped) is rejected while an unedited multi-tx blockchain_test still passes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
While running the Merkle Patricia Trie structural test suite of https://github.com/ethereum/execution-specs/pull/3600 against several clients, I corrupted fixtures on purpose to check that each runner rejects them. That surfaced which part of a blockchain_test fixture evmone consumes.
A fixture block carries the block twice: rlp, the canonical bytes, and the sibling fields blockHeader, transactions, uncleHeaders, withdrawals, documented as "Decoded block header fields included in the block RLP" and "List of decoded transactions included in the block RLP". The consumption procedure says to decode rlp (step 7.2) and then apply "the current decoded block" (step 7.3).
So a fixture whose RLP body disagrees with the header contained in that same RLP is consistent on the JSON side and passes.
Evidence
One fixture, one block, two transactions. Two edits, each self-consistent on its own side:
A. Remove the last transaction from the block RLP body only, leaving blockHeader (including transactionsTrie) and the JSON transactions untouched.
B. Remove the last transaction from the JSON transactions array only, leaving rlp untouched.
A runner that follows 7.2 and 7.3 fails A and passes B. evmone passes A and fails B. Of eight runners I tried the same pair on, six (go-ethereum, erigon, reth, Nethermind, nimbus-eth1, Besu) fail A and pass B; evmone and ethrex invert it.
Reproduction
Take any blockchain_test fixture with a block holding at least two transactions, decode blocks[0].rlp as [header, txs, ommers, withdrawals], drop the last element of txs, re-encode, and write it back to rlp without touching the other fields. Then
evmone test <dir>
It passes; per steps 7.2 and 7.3 it should fail, because the decoded block's transactions do not hash to the transactionsTrie committed in its own header.
Fixtures to reproduce with: uv run fill tests/mpt/ --clean on the branch of ethereum/execution-specs#3600, or any existing multi-transaction blockchain_test.
- Lenguaje dominante
- C++
- Estrellas
- 979
- Forks
- 340
- Merge medio
- 12 h 16 min
- PR fusionados (30 d)
- 25
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ipsilon/evmone
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
Todos los issues de ipsilon/evmone
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
phantoslayer21/wronggpu#275 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ReyeMe/SaturnRingLib#155 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Nheko-Reborn/nheko#2092 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
isocpp/CppCoreGuidelines#2345 ·