Optional randao verification when producing blocks
Implement
- https://github.com/ethereum/beacon-APIs/pull/222
This seems already part of this client. https://github.com/ChainSafe/lodestar/blob/011a0c4b89250b8fdc56a86f9b0a4698521554d0/packages/api/src/beacon/routes/validator.ts#L315
This seems already part of this client.
lodestar/packages/api/src/beacon/routes/validator.ts
Line 315 in 011a0c4
skip_randao_verification?: string;
it's there but we don't actually use it, meaning we never verify the randao right now
it's there but we don't actually use it, meaning we never verify the randao right now
Should we verify the reveal against the proposer to implement this?
it's there but we don't actually use it, meaning we never verify the randao right now
Should we verify the reveal against the proposer to implement this?
you can read up on it here https://github.com/ethereum/beacon-APIs/pull/222
@nflaig
I investigated it a bit. Based on your comment, I thought the whole Randao verification is absent in Lodestar, but noticed that all the required code is already there:
https://github.com/ChainSafe/lodestar/blob/2b5494153805e62342d612c56fb508282c16fa50/packages/state-transition/src/block/index.ts#L61
But skipRandaoVerification query param is not used through the passage from the route handler to the point above:
https://github.com/ChainSafe/lodestar/blob/2b5494153805e62342d612c56fb508282c16fa50/packages/beacon-node/src/api/impl/validator/index.ts#L534-L535
The above parameter is not used at all.
So, can this issue be reduced to correctly using the above param, so that it causes processRandao to actually verify it?
So, can this issue be reduced to correctly using the above param, so that it causes processRandao to actually verify it?
yes I think as per spec we should verify the randao, haven't read up on it myself though
I can work on this. Got a grasp of the requirements.
I can work on this. Got a grasp of the requirements.
Great thanks for looking into it, I have assigned you
I opened a draft PR, so that you can confirm or comment on the overall implementation. After that, I can add some tests, etc. if needed.
We can keep the issue open but it feels unnecessary to implement skip_randao_verification flag as we don't even validate the randao by default right now, let's revisit this once we decide to do the validation by default