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

Don't use a builder with an optimistic head #3394

Closed
paulhauner opened this issue Aug 1, 2022 · 2 comments
Closed

Don't use a builder with an optimistic head #3394

paulhauner opened this issue Aug 1, 2022 · 2 comments
Assignees
Labels
bellatrix Required to support the Bellatrix Upgrade

Comments

@paulhauner
Copy link
Member

Description

Lighthouse currently will allow proposing a block atop a head which it knows to be optimistic. Whilst this seems wrong, it is legitimate since an EL can only build a payload atop a parent payload when the parent is known and valid. Therefore, if the EL is able to produce a payload atop a payload which Lighthouse considers to be optimistic, then Lighthouse just had an outdated view of the EL payload tree.

This all holds true whilst we use a local EL, however it starts to become dubious when builders are involved. It might be the case that a malicious builder can produce a chain the honest ELs will never resolve, therefore forcing CLs into an optimistic state. To mitigate this, I propose that if the head is optimistic then we don't sign across any blinded payloads from builders.

Implementation

I think the implementation must be careful not to just check that the head is optimistic in one action the build a block in another without ensuring that the head hasn't changed between those two calls.

It may be desirable to try and produce a block using the EL when the head is optimistic, without checking the builder. This gives us a chance to still produce a block if the EL happens to sync in the nick of time. The risk here is that MEV can be disabled by forcing a node into optimistic sync at just the right time, however this is a very fiddly attack and we already operate under the assumption that an attacker cannot reliably force nodes into optimistic sync.

@paulhauner paulhauner added the bellatrix Required to support the Bellatrix Upgrade label Aug 1, 2022
@realbigsean realbigsean self-assigned this Aug 4, 2022
@realbigsean
Copy link
Member

Let me know what you think about the implementation in #3412

I think the implementation must be careful not to just check that the head is optimistic in one action the build a block in another without ensuring that the head hasn't changed between those two calls.

Builder queries are made with the parent block hash so as long as we are checking that this execution status is not optimistic, we should be good.

It may be desirable to try and produce a block using the EL when the head is optimistic, without checking the builder. This gives us a chance to still produce a block if the EL happens to sync in the nick of time

By adding this to the is_healthy check, we use the fallback-from-builder logic that already exists for other chain health conditions

bors bot pushed a commit that referenced this issue Aug 9, 2022
## Issue Addressed

Resolves #3394

Adds a check in `is_healthy` about whether the head is optimistic when choosing whether to use the builder network. 



Co-authored-by: realbigsean <[email protected]>
bors bot pushed a commit that referenced this issue Aug 9, 2022
## Issue Addressed

Resolves #3394

Adds a check in `is_healthy` about whether the head is optimistic when choosing whether to use the builder network. 



Co-authored-by: realbigsean <[email protected]>
@paulhauner
Copy link
Member Author

Resolved via #3412 🎉

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
Projects
None yet
Development

No branches or pull requests

2 participants