# Data extraction for revali ###### tags: `data`,`prysm` ## Data extraction flow 1. wait till beacon node is in sync 2. get chain head epoch 3. get finalized epoch 4. iterate epochs genesis->head 5. extract data and update epoch state (pending,justified,finalized) to cache 6. tick every epoch * iterate through all non justified epochs * update data * update status ## Data to extract * validator public key->id map * active validators per epoch [bitmap] * validator balances per epoch by public key * epoch assignments * blocks [slot][root] * beacon committees * validator participation stats # Revali specific data ### Participation: common participation vs revali participation - [ ] add filter by validator ids to GetValidatorParticipationRequest ### validator balance in revali vs average validator balance use ListValidatorBalances ### Revali staked ether % of total ether staked use ListValidatorBalances ### user validators balance history use db association to generate balance history ### user requests add counter to revali api key table for all request that were initiated by using the api key(can be later used to prevent dos) ### Proposal history use GetValidatorPerformance use GetEpochAssignments(epoch)