ethereum / ethereumj

DEPRECATED! Java implementation of the Ethereum yellowpaper. For JSON-RPC and other client features check Ethereum Harmony
GNU Lesser General Public License v3.0
2.18k stars 1.1k forks source link

Verify Randao reveal #1188

Closed mkalinin closed 5 years ago

mkalinin commented 5 years ago

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.

mkalinin commented 5 years ago

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.