ethereum / consensus-specs

Ethereum Proof-of-Stake Consensus Specifications
Creative Commons Zero v1.0 Universal
3.55k stars 970 forks source link

Redundant SSZ generic tests #3343

Open hwwhww opened 1 year ago

hwwhww commented 1 year ago

Thank @winsvega for reporting it.

Issue

For example, the tests uint_128_max_0 - uint_128_max_4 are redundant because variation doesn't make difference in non-random tests.

It also applies to other SSZ types:

Its not just with uint. Other folders also have similar same tests. Looks like a bug in test generator script. Also the containers. Ssz requires a structure. There it goes input {a, b, c, d, e} But it actually is { [a,b], c, d, e} or similar. And the container also has redundant tests

How to fix it?

Go thought the get_random_ssz_object helper and check if variation was wrongly used in non-random tests.

ralexstokes commented 6 months ago

did #3468 resolve this? if so, we can close the issue