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.
There was a bug in the accounting of sync committees. One validator could participate in the same sync committee multiple times under different committee indexes. Previously in the code, there was an implicit assumption that a validator can be presented in a sync committee of the particular block only one time. This led to an incorrect accounting of sync committees and incorrect calculation of validator rewards for participation in sync committees.
For example, in the 5-th Pectra devnet, the validator 8568 proposed a slot 179518 in the epoch 5609. The sync committee for epoch 5609 contains validators with indexes 1298, 2561, 4326, 8113, and 9377 two times. Rewards for participation of these validators in the sync committee for the second time were not taken into account. So, when slot 179518 is proposed, EVM calculated rewards for proposing this slot incorrectly.
Now the bug is fixed. The
sync_meta
field of theValidatorDutySummary
structure was extended to contain several synced blocks if a validator participate in the same committee multiple times. Also, the calculation of the percentage of sync committee participation and the calculation of rewards for sync committee participation have been updated.