ChainSafe / chainbridge-celo

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

P1sar/feature/validator syncer integrations #84

Closed P1sar closed 3 years ago

P1sar commented 3 years ago

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: