graphprotocol / graph-network-analytics-subgraph

Analytics subgraph for Graph Network
MIT License
6 stars 11 forks source link

Delegation daily data refactor and income charts #4

Closed juanmardefago closed 3 years ago

juanmardefago commented 3 years ago

@davekaj This started as work for the Income Chart (trying to aggregate as much data as possible for historical data), and kinda steered towards a full refactor of the delegation data, to try and pre-calculate as much as possible, since the Delegation table had performance issues in the frontend.

Of course batch updates aren't ideal, but the subgraph is still syncable.

Given that refactor, I had to change a few ways on how I aggregated historical data, and since it already is a lot easier to consume, I didn't finish implementing the GraphAccountDailyData since it would mean quite a bit more processing on the batch updates, with very little advantage while consuming it.