You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some tests in ethereum common tests that have expected failures.
For example, the wrongCoinbase test is supposed with different failures for each of the forks: Byzantium is supposed to have an invalidStateRoot while Homestead is supposed to have a invalidReceiptsStateRoot,
We currently only use the value found under rlp key from that block hash in the json file. We ignore the rest of the values like the expectExceptionByzantium mentioned above.
We should assert that we are seeing the expected errors.
Other implementations
py-evm has a partial implementation where it makes sure that at least an error is raised (doesn't seem to check the exact error). That can be seen in their blockchain test
I include a copy of the code here in case that file changes by the time we decide to add these tests:
ifshould_be_good_block:
(block, mined_block, block_rlp) =apply_fixture_block_to_chain(block_fixture, chain)
assert_mined_block_unchanged(block, mined_block)
else:
try:
apply_fixture_block_to_chain(block_fixture, chain)
except (TypeError, rlp.DecodingError, rlp.DeserializationError, ValidationError) aserr:
# failure is expected on this bad blockpasselse:
raiseAssertionError("Block should have caused a validation error")
The text was updated successfully, but these errors were encountered:
There are some tests in ethereum common tests that have expected failures.
For example, the wrongCoinbase test is supposed with different failures for each of the forks: Byzantium is supposed to have an
invalidStateRoot
while Homestead is supposed to have ainvalidReceiptsStateRoot
,We currently only use the value found under
rlp
key from thatblock
hash in the json file. We ignore the rest of the values like theexpectExceptionByzantium
mentioned above.We should assert that we are seeing the expected errors.
Other implementations
py-evm has a partial implementation where it makes sure that at least an error is raised (doesn't seem to check the exact error). That can be seen in their blockchain test
I include a copy of the code here in case that file changes by the time we decide to add these tests:
The text was updated successfully, but these errors were encountered: