-
Notifications
You must be signed in to change notification settings - Fork 998
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
Altair: carry-over prev epoch participation #2373
Conversation
2f6a796
to
8b635ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks that this solution doesn't increase too much complexity 👍
#### `get_attestation_participation_flags` | ||
|
||
```python | ||
def get_attestation_participation_flag_indices(state: BeaconState, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this refactoring! IMHO we can apply it even if the translate_participation
solution doesn't get included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review!
0461a02
to
ea6c042
Compare
This was discussed on the latest eth2 implementers call, and there was a decent amount of pushback on the complexity and testing tradeoff. Looking for more engineering input here before a merge or close |
This looks pretty straight forward to implement to me and particularly with the refactoring to use the I'm not overly concerned about validators being penalised for an epoch - the optics aren't great but it's likely to be forgotten pretty quickly. But given we already have to do a special transition to activate Altair and this is a pretty simple change I'd lean in favour of including it. |
I'm also leaning towards inclusion. Reasons:
With that said, I'm also not concerned about stakers getting penalized for one epoch, the social implication won't be good, but they will be forgotten rather quickly |
I'm making a PR to this PR handling the merge conflict and adding tests |
Closes #2314
This is a (draft) PR implementing the translation of phase0 participation information into Altair participation flags at the fork, in order to prevent loss of information (and rewards).
It factors out a function from
process_attestation
which I had already factored out in Lighthouse anyway for use in the op pool (being able to calculate attestation flag bits independent of processing is nice).Apart from that it adds a small function called
translate_participation
, which acts on the pre state'sprevious_epoch_attestations
. I initially thought it should translatecurrent_epoch_attestations
but the lists have already been swapped byprocess_participation_record_updates
at the time of the upgrade.I'll start working on tests shortly. I think the main risk is covering all of the possible attestation behaviours, so I'll look into whether it's possible to reuse generators from the attestation tests.