feat(tests): evmone blockchain tets tool to support invalid blocks
I maintainer di solito rispondono entro 1 giorno
@gumb0 ci sta già lavorando.
Dal 6/5/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Currently evmone-blockchain test runner does not support invalid blocks.
But thats pretty easy:
ok so when you verify invalid blockchain test, you go all blocks one by one.
once you hit invalid block. it looks like this:
"blocks" : [
{
"blocknumber" : "1",
"chainname" : "default",
"expectException" : "BlockException.INVALID_STATE_ROOT",
"rlp" : "0x...",
"rlp_decoded" : {
you attmept to import data from rlp. need rlp here.
rlp usually valid. but can have wrong stateroot or coinbase or other header field.
so you import transactions from block. (from rlp)
if any tx is invalid, the whole block is invalid.
compare transaction exception error code with the one in
"expectException" : "TransactionException.INSUFFICIENT_ACCOUNT_FUNDS",
if all transactions are valid. executed the transition and calculate new post state. (header fields) then verify hashes against the ones provided in rlp's blockHeader
if there is a mismatch, throw an exception error code and compare to the one provided in expectException in the test.
in any case if exception match, the test passed. if you throw a different exception the test does not pass.
if you have no exception the test does not pass
if you don't have rlp, you can read data from rlp_decoded
but it is not recommended. as some invalid blocks might not have it.
example on invalid bc test:
https://github.com/ethereum/tests/blob/develop/BlockchainTests/InvalidBlocks/bcUncleHeaderValidity/diffTooLow2.json
Note. Difficulty block reorg tests are in Legacy, that support is optional.
- Lingua principale
- C++
- Stelle
- 979
- Fork
- 340
- Merge medio
- 12h 16m
- PR unite (30g)
- 25
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ipsilon/evmone
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 56/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ipsilon/evmone
Issue simili
-
Reference check: findingsApertaaudit-reference-check
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
schrodinger/pymol-open-source#532 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
xlnt-community/xlnt#174 ·