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

[Merged by Bors] - Indicate that invalid blocks are optimistic #3383

Closed
wants to merge 2 commits into from

Conversation

paulhauner
Copy link
Member

@paulhauner paulhauner commented Jul 28, 2022

Issue Addressed

NA

Proposed Changes

This PR will make Lighthouse return blocks with invalid payloads via the API with execution_optimistic = true. This seems a bit awkward, however I think it's better than returning a 404 or some other error.

Let's consider the case where the only possible head is invalid (#3370 deals with this). In such a scenario all of the duties endpoints will start failing because the head is invalid. I think it would be better if the duties endpoints continue to work, because it's likely that even though the head is invalid the duties are still based upon valid blocks and we want the VC to have them cached. There's no risk to the VC here because we won't actually produce an attestation pointing to an invalid head.

Ultimately, I don't think it's particularly important for us to distinguish between optimistic and invalid blocks on the API. Neither should be trusted and the only real reason that we track this is so we can try and fork around the invalid blocks.

Additional Info

@paulhauner paulhauner added blocked work-in-progress PR is a work-in-progress bellatrix Required to support the Bellatrix Upgrade v2.5.0 Required for Goerli merge release labels Jul 28, 2022
@paulhauner paulhauner force-pushed the is-strictly-optimistic branch from ebca20f to dd2a9b5 Compare July 28, 2022 22:58
@paulhauner paulhauner added ready-for-review The code is ready for review and removed blocked work-in-progress PR is a work-in-progress labels Jul 28, 2022
@paulhauner paulhauner marked this pull request as ready for review July 28, 2022 23:46
Copy link
Member

@macladson macladson left a comment

Choose a reason for hiding this comment

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

LGTM!

@paulhauner
Copy link
Member Author

I'll block this on #3372 so I can resolve the conflicts here.

@paulhauner paulhauner added blocked and removed ready-for-review The code is ready for review labels Jul 29, 2022
Make clippy pass

Fix test compile errors
@paulhauner paulhauner force-pushed the is-strictly-optimistic branch from dd2a9b5 to 4508aae Compare July 30, 2022 05:07
@paulhauner
Copy link
Member Author

I just fixed a couple of simple conflicts introduced via #3372.

bors r+

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed blocked labels Jul 30, 2022
bors bot pushed a commit that referenced this pull request Jul 30, 2022
## Issue Addressed

NA

## Proposed Changes

This PR will make Lighthouse return blocks with invalid payloads via the API with `execution_optimistic = true`. This seems a bit awkward, however I think it's better than returning a 404 or some other error.

Let's consider the case where the only possible head is invalid (#3370 deals with this). In such a scenario all of the duties endpoints will start failing because the head is invalid. I think it would be better if the duties endpoints continue to work, because it's likely that even though the head is invalid the duties are still based upon valid blocks and we want the VC to have them cached. There's no risk to the VC here because we won't actually produce an attestation pointing to an invalid head.

Ultimately, I don't think it's particularly important for us to distinguish between optimistic and invalid blocks on the API. Neither should be trusted and the only *real* reason that we track this is so we can try and fork around the invalid blocks.


## Additional Info

- ~~Blocked on #3370~~
@bors bors bot changed the title Indicate that invalid blocks are optimistic [Merged by Bors] - Indicate that invalid blocks are optimistic Jul 30, 2022
@bors bors bot closed this Jul 30, 2022
bors bot pushed a commit that referenced this pull request Aug 1, 2022
## Issue Addressed

NA

## Proposed Changes

Bump versions.

## Additional Info

- ~~Blocked on #3383~~
- ~~Awaiting further testing.~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bellatrix Required to support the Bellatrix Upgrade ready-for-merge This PR is ready to merge. v2.5.0 Required for Goerli merge release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants