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

Ensure SingleAttestation conversion happens on the BeaconProcessor #6805

Closed
michaelsproul opened this issue Jan 15, 2025 · 2 comments
Closed
Assignees
Labels
A0 electra Required for the Electra/Prague fork optimization Something to make Lighthouse run more efficiently. v7.0.0-beta.0 New release c. Q1 2025

Comments

@michaelsproul
Copy link
Member

Description

In our SingleAttestation MVP, the conversion from SingleAttestation to Attestation happens on the main Tokio executor:

We should ensure this is optimised out prior to shipping Electra. Some ideas for that here:

The other option is to more wholeheartedly embrace SingleAttestation:

@michaelsproul michaelsproul added optimization Something to make Lighthouse run more efficiently. electra Required for the Electra/Prague fork labels Jan 15, 2025
@michaelsproul michaelsproul changed the title Ensure SingleAttestation conversion happens _on_ the BeaconProcessor Ensure SingleAttestation conversion happens on the BeaconProcessor Jan 15, 2025
@eserilev eserilev self-assigned this Jan 16, 2025
@michaelsproul michaelsproul added the v7.0.0-beta.0 New release c. Q1 2025 label Feb 6, 2025
@michaelsproul michaelsproul self-assigned this Feb 6, 2025
@michaelsproul
Copy link
Member Author

I'm going to work on a small standalone PR for this.

mergify bot pushed a commit that referenced this issue Feb 7, 2025
Closes

- #6805


  - Use a new `WorkEvent::GossipAttestationToConvert` to handle the conversion from `SingleAttestation` to `Attestation` _on_ the beacon processor (prevents a Tokio thread being blocked).
- Improve the error handling for single attestations. I think previously we had no ability to reprocess single attestations for unknown blocks -- we would just error. This seemed to be the case in both gossip processing and processing of `SingleAttestation`s from the HTTP API.
- Move the `SingleAttestation -> Attestation` conversion function into `beacon_chain` so that it can return the `attestation_verification::Error` type, which has well-defined error handling and peer penalties. The now-unused variants of `types::Attestation::Error` have been removed.
@michaelsproul
Copy link
Member Author

Fixed by:

Part of v7.0.0-beta.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0 electra Required for the Electra/Prague fork optimization Something to make Lighthouse run more efficiently. v7.0.0-beta.0 New release c. Q1 2025
Projects
None yet
Development

No branches or pull requests

2 participants