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

Return errors from ProduceBlindedBlock #12309

Merged
merged 8 commits into from
Apr 21, 2023
Merged

Conversation

rkapka
Copy link
Contributor

@rkapka rkapka commented Apr 19, 2023

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

ProduceBlindedBlock currently assumes that v1alpha1 server will return blinded blocks. This doesn't have to be true. When we get a full block or the builder is not configured, we won't be able to deal with the block so we should return an error.

Which issues(s) does this PR fix?

Part of #12103

@rkapka rkapka added Ready For Review A pull request ready for code review OK to merge API Api related tasks labels Apr 19, 2023
@rkapka rkapka requested a review from a team as a code owner April 19, 2023 12:05
Copy link
Contributor

@saolyn saolyn left a comment

Choose a reason for hiding this comment

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

Can you add some tests to cover these new additions.

Copy link
Member

@terencechain terencechain left a comment

Choose a reason for hiding this comment

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

I don't think this is correct, the beacon api stated the return should be blinded block or error. In this case, wouldn't error be most appropriate

Really the best option is to fix the underly inefficiency so it actually can return blind block instead of error

@rkapka rkapka changed the title Add support for non-blinded blocks to ProduceBlindedBlock Return errors from ProduceBlindedBlock Apr 20, 2023
james-prysm
james-prysm previously approved these changes Apr 20, 2023
Copy link
Contributor

@james-prysm james-prysm left a comment

Choose a reason for hiding this comment

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

I'm ok with adding additional defensive checks.

@james-prysm james-prysm dismissed their stale review April 20, 2023 16:29

tests failing

@rkapka rkapka merged commit b7ef762 into develop Apr 21, 2023
@rkapka rkapka deleted the unblind-when-publishing branch April 21, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants