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
the json is not a plain transcript of rlp.
it is a static structure. because rlp does not have meaning (keys) of its elements. if we add or substruct one element from the rlp we can't just do the same in json. (substraction in this case) because some clients are trying to construct a block from this jsons (instead of rlps) and because it violates the validity of rlp structure making it an invalid rlp structure test.
in blockchain tests we assume that the rlp are all of a valid structure. (no wrong rlp length bytes, no wrong rlp bytes, correct ethereum structures (field count and field type) )
all the cases when rlp is invalid is another type of a test. so we can provide such vectors there (tx with missing or extra fields, invalid rlp encoding, invalid rlp field types, over 256 bit values)
The text was updated successfully, but these errors were encountered:
winsvega
changed the title
invalid block json decription
invalid block json description
Jan 30, 2024
This should potentially be a hive only test. Where we get the appropriate error response from the engine API.
Using geth evm blocktest we get:
Block decoding failed index=15 err="rlp: input string too long for uint64, decoding into (types.Block)(types.extblock).Header.BlobGasUsed"
Which is technically not the correct invalidity. And like you mention I don't think there is a way to deterministically get the appropriate error response solely from the rlp
The invalid rlps or block import of invalid structure rlps should be in a separate class of tests. Thats why I added rlp decoded field, because otherwise it's impossoble to decode an invalid rlp
(cancun/eip4844_blobs/tests/tmp/tmptest_e63dbf6c_a8b3_42b0_92dd_7f524cd5686f/test_excess_blob_gas_fork_transition.py::test_invalid_post_fork_block_without_blob_fields[fork_ShanghaiToCancunAtTime15k-blockchain_test-excess_blob_gas_missing_False-blob_gas_used_missing_True], step: BlockchainTest)
the json is not a plain transcript of rlp.
it is a static structure. because rlp does not have meaning (keys) of its elements. if we add or substruct one element from the rlp we can't just do the same in json. (substraction in this case) because some clients are trying to construct a block from this jsons (instead of rlps) and because it violates the validity of rlp structure making it an invalid rlp structure test.
in blockchain tests we assume that the rlp are all of a valid structure. (no wrong rlp length bytes, no wrong rlp bytes, correct ethereum structures (field count and field type) )
all the cases when rlp is invalid is another type of a test. so we can provide such vectors there (tx with missing or extra fields, invalid rlp encoding, invalid rlp field types, over 256 bit values)
The text was updated successfully, but these errors were encountered: