consensus-specs icon indicating copy to clipboard operation
consensus-specs copied to clipboard

Only update LMD votes when target epoch is in the recent epochs

Open hwwhww opened this issue 3 years ago • 1 comments

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].

hwwhww avatar Feb 01 '22 22:02 hwwhww

Looks generally correct to me. Haven't done deep review of the test scenario

djrtwo avatar Feb 03 '22 15:02 djrtwo