Beacon chain validation lacks verification of Randao image that has been revealed by proposer.
Fix
First, add an update of validator structure with new Randao image to BeaconStateTransition.
Next, check that previous Randao image revealed by proposer equals blake2(newImage), consider block invalid if check has failed.
It is better to start working on this issue after initial AttestationRecord is added to block. Thus, it will be much easier to get proposer of the block.
What's wrong
Beacon chain validation lacks verification of Randao image that has been revealed by proposer.
Fix
First, add an update of validator structure with new Randao image to BeaconStateTransition. Next, check that previous Randao image revealed by proposer equals
blake2(newImage)
, consider block invalid if check has failed.