Closed P1sar closed 3 years ago
Current GetAPKForBlock implementation build APK for block from all validators that was selected as validators in current epoch, but this is wrong. APK should only be generated for validators that signed specific block
To filter validator you should use Bitmask applied on validators array. https://github.com/celo-org/celo-blockchain/blob/master/core/types/istanbul.go#L42
Some code example that could be useful https://github.com/celo-org/celo-blockchain/blob/8cfe3d15966eb99deb80ba82686230ca588e91dd/consensus/istanbul/backend/engine.go#L329
Write unit tests
unit tests are pass APK is build according to bitmask
Current GetAPKForBlock implementation build APK for block from all validators that was selected as validators in current epoch, but this is wrong. APK should only be generated for validators that signed specific block
Implementation details
To filter validator you should use Bitmask applied on validators array. https://github.com/celo-org/celo-blockchain/blob/master/core/types/istanbul.go#L42
Some code example that could be useful https://github.com/celo-org/celo-blockchain/blob/8cfe3d15966eb99deb80ba82686230ca588e91dd/consensus/istanbul/backend/engine.go#L329
Testing details
Write unit tests
Acceptance Criteria
unit tests are pass APK is build according to bitmask