ChainSafe / chainbridge-celo

GNU Lesser General Public License v3.0
3 stars 2 forks source link

Fix validators public key aggregation #125

Closed waymobetta closed 3 years ago

waymobetta commented 3 years ago

Description

As explained in the related issue, the current APK (aggregated public key) is constructed by pulling in validator data from the validators who were selected for the current epoch, taking their public keys, then aggregating them.

Instead, the APK should be constructed by fetching all validators from the pool of validators for the epoch and then applying the bitmap included in the Istanbul extra data stored within the block header against this validator list. Once this filtering is done, then can the APK be constructed to appropriately represent the block that was verified.

This resulting list of validators will be only the validators who signed the block, rather than the entire pool of validators who were selected for the epoch.


Note:

_The additions to the syncerstorr_test and sync_test did not themselves break the tests; the tests were found to be failing prior to the change. This is being investigated_

Related Issue Or Context

Closes: #116

How Has This Been Tested? Testing details.

Unit tests were written.

Types of changes

Checklist:

github-actions[bot] commented 3 years ago

Go Test coverage is 41.1 %\ :sparkles: :sparkles: :sparkles:

github-actions[bot] commented 3 years ago

Go Test coverage is 41.1 %\ :sparkles: :sparkles: :sparkles: