Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional randao verification when producing blocks #222

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

michaelsproul
Copy link
Collaborator

Recently I've been speculatively creating blocks using the /eth/v2/validator/blocks/{slot} endpoint, polling the endpoint live at every slot.

Some beacon node implementations verify the randao_reveal signature when this endpoint is used, which causes speculative block proposal to fail (because the private key for the true proposer_index is not known).

A few months ago I added an optional verify_randao parameter to disable the verification in Lighthouse: sigp/lighthouse#3116. Recently I've discovered that Nimbus have started to verify the randao_reveal by default too, so I'd like to implore them to adopt the same parameter.

As far as I know the other clients (Teku/Prysm/Lodestar) don't verify the randao_reveal currently, so I think it would be acceptable for them to delay implementing the verify_randao parameter until they decide to. Alternatively they could maintain the same semantics and accept verify_randao=false/null, and error if verify_randao=true. I would like to impose the minimum burden on implementers, given that this is a relatively niche use case.

More background:

@michaelsproul michaelsproul force-pushed the verify-randao branch 2 times, most recently from 4edba50 to f7e6584 Compare July 4, 2022 06:11
@michaelsproul
Copy link
Collaborator Author

CI seems to be failing on an unrelated error in the blinded_blocks API, weirdly it doesn't occur locally for me with spectral 6.3.0

@mpetrunic
Copy link
Collaborator

CI seems to be failing on an unrelated error in the blinded_blocks API, weirdly it doesn't occur locally for me with spectral 6.3.0

yeah, seems like spectral has some serious bugs. I proposed to replace it #223 but need @djrtwo or someone to merge it

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable but would prefer more client teams to take a look

apis/validator/block.v2.yaml Outdated Show resolved Hide resolved
@ajsutton
Copy link
Contributor

Since Teku isn't validating the randao reveal when creating blocks now so it would be nice if we could just ignore this param and not need to make any changes. As such I'd have a mild preference for rando_reveal remaining required and callers can just fill it with junk.

It would also mean that verify_randao can only be used to disable validation but setting verify_randao=true still wouldn't perform verification in Teku. I'm not sure I see a real need to force the beacon node to verify randao when there are already APIs to get the validator public key and do the verification yourself.

@michaelsproul
Copy link
Collaborator Author

Thanks for the feedback @ajsutton, @djrtwo 🙏

How does this sound moving forward?

@ajsutton
Copy link
Contributor

Yep that works for me.

@michaelsproul
Copy link
Collaborator Author

Alternatively we could use a value-less ?no_verify_randao flag instead, to make the verify_randao=true case unrepresentable. I think I prefer this actually.

@djrtwo
Copy link
Contributor

djrtwo commented Jul 25, 2022

Can you rebase with master? redocli is merged

@michaelsproul michaelsproul force-pushed the verify-randao branch 2 times, most recently from ab72517 to b39d248 Compare July 26, 2022 02:23
@michaelsproul
Copy link
Collaborator Author

Done!

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving. will merge in 2 days unless any additional comments

@michaelsproul
Copy link
Collaborator Author

looks like we're good to merge @djrtwo! thanks!

@mpetrunic mpetrunic merged commit 39c9cc3 into ethereum:master Aug 9, 2022
@michaelsproul michaelsproul deleted the verify-randao branch September 5, 2022 04:38
bors bot pushed a commit to sigp/lighthouse that referenced this pull request Sep 19, 2022
…3540)

## Issue Addressed

ethereum/beacon-APIs#222

## Proposed Changes

Update Lighthouse's randao verification API to match the `beacon-APIs` spec. We implemented the API before spec stabilisation, and it changed slightly in the course of review.

Rather than a flag `verify_randao` taking a boolean value, the new API uses a `skip_randao_verification` flag which takes no argument. The new spec also requires the randao reveal to be present and equal to the point-at-infinity when `skip_randao_verification` is set.

I've also updated the `POST /lighthouse/analysis/block_rewards` API to take blinded blocks as input, as the execution payload is irrelevant and we may want to assess blocks produced by builders.

## Additional Info

This is technically a breaking change, but seeing as I suspect I'm the only one using these parameters/APIs, I think we're OK to include this in a patch release.
bors bot pushed a commit to sigp/lighthouse that referenced this pull request Sep 19, 2022
…3540)

## Issue Addressed

ethereum/beacon-APIs#222

## Proposed Changes

Update Lighthouse's randao verification API to match the `beacon-APIs` spec. We implemented the API before spec stabilisation, and it changed slightly in the course of review.

Rather than a flag `verify_randao` taking a boolean value, the new API uses a `skip_randao_verification` flag which takes no argument. The new spec also requires the randao reveal to be present and equal to the point-at-infinity when `skip_randao_verification` is set.

I've also updated the `POST /lighthouse/analysis/block_rewards` API to take blinded blocks as input, as the execution payload is irrelevant and we may want to assess blocks produced by builders.

## Additional Info

This is technically a breaking change, but seeing as I suspect I'm the only one using these parameters/APIs, I think we're OK to include this in a patch release.
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
…igp#3540)

## Issue Addressed

ethereum/beacon-APIs#222

## Proposed Changes

Update Lighthouse's randao verification API to match the `beacon-APIs` spec. We implemented the API before spec stabilisation, and it changed slightly in the course of review.

Rather than a flag `verify_randao` taking a boolean value, the new API uses a `skip_randao_verification` flag which takes no argument. The new spec also requires the randao reveal to be present and equal to the point-at-infinity when `skip_randao_verification` is set.

I've also updated the `POST /lighthouse/analysis/block_rewards` API to take blinded blocks as input, as the execution payload is irrelevant and we may want to assess blocks produced by builders.

## Additional Info

This is technically a breaking change, but seeing as I suspect I'm the only one using these parameters/APIs, I think we're OK to include this in a patch release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants