Issue:
We're skipping checks for ActiveFields bitlist (such as BeaconStateGloasFieldCount == len(fieldRoots)) in some progressive methods (e.g. beaconState.progressiveHashRoot()).
This is important because a mismatch between the supposed number of gloas fields vs the actual passed field is indeed an error but we won't recognize it.
Also, this problem gets more important for later forks, when not every field is active and we also have non active/disabled fields.
Fix:
add a concrete way to get the supposed active field count for each fork, and add checks against the length of passed field roots list.
Issue:
We're skipping checks for ActiveFields bitlist (such as
BeaconStateGloasFieldCount == len(fieldRoots)) in some progressive methods (e.g.beaconState.progressiveHashRoot()).This is important because a mismatch between the supposed number of gloas fields vs the actual passed field is indeed an error but we won't recognize it.
Also, this problem gets more important for later forks, when not every field is active and we also have non active/disabled fields.
Fix:
add a concrete way to get the supposed active field count for each fork, and add checks against the length of passed field roots list.