-
Notifications
You must be signed in to change notification settings - Fork 995
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
Remove lookback and properly handle min span updates in Slasher #5040
Comments
@0xKiwi Please add more context. I am not sure how to triage this issue or what action needs to be taken. |
The strategy we use for catching double and surround votes is referred to as min-max spans. This strategy involves maintaining every validators information on a per-epoch basis for the full validator set. Say we receive an aggregated attestation of 16 validators, spanning from source epoch 2 to target epoch 8. We update the min max spans representing epoch 0 to epoch 8 for each of those 16 validators. Currently, we chunk up the min max spans for the full validator set into per-epoch buckets, so if we want to change epoch 3, we need to load that epoch into the cache to perform an update on it. Every attestation we receive needs to have its min spans updated which means updating the spans from the source epoch, all the way to 0. This is troublesome to handle for validators that haven't attested until epoch 10,000, because it means we need to update the min spans from epoch 0, all the way to epoch 10,000. Processing such an attestation would normally load all of the existing validator history into memory for 10,000 epochs. This wouldn't be a huge problem to do once, but we would need to do it for every new validator index received in the network. Our current workaround is to only "lookback" 128 epochs. Say we get an attestation for epoch 1000, we only update the spans to epoch 872, instead of epoch 0. This allows us to keep the full 128 epochs of lookback in a cache to prevent unneeded database checks and edited. So the goal of this issue is to find a solution that will allow us to properly handle attestations with min man spans that are larger than the lookback distance of 128 epochs. |
started a design doc to resolve this issue |
Keep us posted on your progress on this @shayzluf, maybe we can have a quick design review session over voice chat - let's talk on discord about this |
starting to resolve this issue: |
@shayzluf I couldn't open the hackmd doc, any chance you have a newer link? |
@0xKiwi where did we take the lookback value (128)? |
This is an issue for handling min span updates in the slasher, since currently they require going to epoch 0 on a first run, we need a better way to handle them as using the lookback sacrifices security.
following the initial design doc: https://hackmd.prylabs.network/s/H1jO_H9wL
Starting to resolve this issue:
The text was updated successfully, but these errors were encountered: