Allow same-slot attestations to affect the fork choice #2534
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The fork choice rule does not consider attestations from the same slot. Apart from the fact that some attacks may benefit from this, it's unclear why the fork choice rule should not consider same-slot attestations.
An attacker may strategically release attestations from previous slots in such a way that it could tip over honest attestors from the current slot to vote for a different head of the chain. There may be scenarios where this only works because the fork choice is disregarding attestations from the current slot.
Proposed solution
Allow attestations from the current slot to be considered by the fork choice.
EDIT: Read some counterarguments to this PR in a comment below. Summary: While in optimistic scenarios this PR intuitively makes sense, it seems that in adversarial conditions there may be strong reasons to not consider same-slot attestations.
Special thanks to @adiasg and @barnabemonnot for discussions/help.