feat(tests): evmone blockchain tets tool to support invalid blocks
メンテナーはふだん 1 日以内に返信
@gumb0 がすでに取り組んでいます。
2025年5月6日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- C++
- スター
- 979
- フォーク
- 340
- 平均マージ
- 12時間 16分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ipsilon/evmone のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
audit-reference-check
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
schrodinger/pymol-open-source#532 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
xlnt-community/xlnt#174 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
sleepyviper1213/redis#30 ·