-
Notifications
You must be signed in to change notification settings - Fork 738
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
Restrict sync committee messages to optimistic blocks #3151
Comments
@michaelsproul I know you've done a lot of work on sync committees, so I'd be interested to know if what I've written makes sense and if you have a better suggestion? 🙏 |
Looks good, and I favour option (2) as well. I don't even think we need an extra request because I think we could read the optimistic status when we fetch the block root here: lighthouse/validator_client/src/sync_committee_service.rs Lines 177 to 187 in db0beb5
|
Update HTTP API to include `execution_optimistic` flag in responses Add `execution_optimistic` to server-sent events Fix formatting Fix tests Fix endpoint comment Remove redundent calls to `get_block` Fix route Return correct `execution_optimistic` values for api queries by state Updated api client functions Refactor HTTP API tests Return 404 when requested root is 0x000..000 Tidy up Avoid recomputing head More improvements Use head when computing status for slot Rebase on unstable Add tests Fix conflicts
## Issue Addressed Resolves #3151 ## Proposed Changes When fetching duties for sync committee contributions, check the value of `execution_optimistic` of the head block from the BN and refuse to sign any sync committee messages `if execution_optimistic == true`. ## Additional Info - Is backwards compatible with older BNs - Finding a way to add test coverage for this would be prudent. Open to suggestions.
## Issue Addressed Resolves #3151 ## Proposed Changes When fetching duties for sync committee contributions, check the value of `execution_optimistic` of the head block from the BN and refuse to sign any sync committee messages `if execution_optimistic == true`. ## Additional Info - Is backwards compatible with older BNs - Finding a way to add test coverage for this would be prudent. Open to suggestions.
## Issue Addressed Resolves #3151 ## Proposed Changes When fetching duties for sync committee contributions, check the value of `execution_optimistic` of the head block from the BN and refuse to sign any sync committee messages `if execution_optimistic == true`. ## Additional Info - Is backwards compatible with older BNs - Finding a way to add test coverage for this would be prudent. Open to suggestions.
Implemented in #3191 |
Description
The optimistic sync spec declares:
We need to ensure that a Lighthouse BN/VC pair will not sign sync committee messages that reference an optimistic
beacon_block_root
.Steps to resolve
The first change is to return an error in
BeaconChain::get_aggregated_sync_committee_contribution
whenever thesync_contribution
being return references an optimisticbeacon_block_root
(see #3140 to see how this was done for attestations).The second, more complicated change is to stop the VC from producing a
SyncCommitteeMessage
whenever that block references an optimistic head:lighthouse/validator_client/src/sync_committee_service.rs
Lines 233 to 241 in bac7c3f
We can't just refuse to accept the already-signed
SyncCommitteeMessage
at the BN HTTP API for two reasons:beacon_block_root
is valid (e.g. when using multiple BNs).I can see two options, both are blocked on #3070:
execution_optimistic
values around with the sync duties in the VCexecution_optimistic
are up-to-date without frequent polling./eth/v1/beacon/headers
before producing theSyncCommitteeMessage
and checking theexecution_optimistic
value before signingI'm leaning towards (2), since it's the easiest to implement and gives us the most up-to-date info. The call to
beacon/headers
should be nice and fast, so I don't think it's too much of a bottleneck.The text was updated successfully, but these errors were encountered: