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

Align slasher runs to fixed point in each slot #1861

Closed
michaelsproul opened this issue Nov 5, 2020 · 2 comments
Closed

Align slasher runs to fixed point in each slot #1861

michaelsproul opened this issue Nov 5, 2020 · 2 comments
Assignees

Comments

@michaelsproul
Copy link
Member

Description

Presently the slasher (#1567) runs batch updates at a user configurable interval -- optimally once per slot. In future it might be nice to make it so that it runs, e.g. just after most attestations are expected to have been received, or just in time to finish before the next block proposal. This would ensure that a validator doesn't accidentally miss out

Currently the slasher updates will often run for longer than 12 seconds (particularly when spinning up), so this issue is likely more relevant once we can guarantee its runtime within substantially less than 12 seconds.

@paulhauner paulhauner added the A1 label Nov 9, 2020
@paulhauner
Copy link
Member

@michaelsproul feel free to set Ax status as you see fit :)

@michaelsproul michaelsproul self-assigned this Nov 2, 2021
@michaelsproul
Copy link
Member Author

Working on this currently

bors bot pushed a commit that referenced this issue Nov 8, 2021
## Issue Addressed

Closes #2112
Closes #1861

## Proposed Changes

Collect attestations by validator index in the slasher, and use the magic of reference counting to automatically discard redundant attestations. This results in us storing only 1-2% of the attestations observed when subscribed to all subnets, which carries over to a 50-100x reduction in data stored 🎉 

## Additional Info

There's some nuance to the configuration of the `slot-offset`. It has a profound effect on the effictiveness of de-duplication, see the docs added to the book for an explanation: https://github.com/michaelsproul/lighthouse/blob/5442e695e5256046b91d4b4f45b7d244b0d8ad12/book/src/slasher.md#slot-offset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants