Add validatorsync package that is responsible for syncing and storing validators for every chain epoch.
SyncBlockValidators - is the gorutine that is thje main routine of that process. Walks true through last epochs blocks and applies their diff to previously known validators.
ValidatorsStore struct is wrapper around levelDB that implements several methods related to storing block-validators to DB
also it implements interface ValidatorsAggregator thats aggregate validators into aggregatedPubKey for provided block number.
ValidatorsAggregator interface used by listener for receiving aggragatedPubKey
Related Issue Or Context
73 #24
How Has This Been Tested? Testing details.
Unit tests + running syncer localy on celo nodes with elections
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have ensured that all acceptance criteria (or expected behavior) from issue are met
[x] I have updated the documentation locally and in chainbridge-docs.
[x] I have added tests to cover my changes.
[x] I have ensured that all the checks are passing and green, I've signed the CLA bot
Description
Add validatorsync package that is responsible for syncing and storing validators for every chain epoch. SyncBlockValidators - is the gorutine that is thje main routine of that process. Walks true through last epochs blocks and applies their diff to previously known validators. ValidatorsStore struct is wrapper around levelDB that implements several methods related to storing block-validators to DB also it implements interface ValidatorsAggregator thats aggregate validators into aggregatedPubKey for provided block number. ValidatorsAggregator interface used by listener for receiving aggragatedPubKey
Related Issue Or Context
73 #24
How Has This Been Tested? Testing details.
Unit tests + running syncer localy on celo nodes with elections
Types of changes
Checklist: