consensus-specs
consensus-specs copied to clipboard
Only update LMD votes when target epoch is in the recent epochs
Issue
[Fork choice] Attestation time consideration
How to fix it
After discussing with @adiasg, we think option 4 is the best way to mitigate the issue.
In this PR, I changed validate_target_epoch_against_current_time to a is_target_epoch_in_recent_epochs function and we only update LMD votes when target.epoch is in the [current_epoch, previous_epoch].
Looks generally correct to me. Haven't done deep review of the test scenario