@@ -41,6 +41,8 @@ func (d *DataAccessService) GetEthpool(ctx context.Context, day time.Time, valid
4141 AttestationsScheduled uint64 `db:"attestations_scheduled"`
4242 SyncExecuted uint64 `db:"sync_executed"`
4343 SyncScheduled uint64 `db:"sync_scheduled"`
44+ BalanceEnd uint64 `db:"balance_end"`
45+ BalanceStart uint64 `db:"balance_start"`
4446 }
4547
4648 var queryResults []Data
@@ -56,11 +58,14 @@ func (d *DataAccessService) GetEthpool(ctx context.Context, day time.Time, valid
5658 goqu .C ("attestations_scheduled" ),
5759 goqu .C ("sync_executed" ),
5860 goqu .C ("sync_scheduled" ),
61+ goqu .L ("finalizeAggregation(balance_end) as balance_end" ),
62+ goqu .L ("finalizeAggregation(balance_start) as balance_start" ),
5963 ).
6064 Where (
6165 goqu .C ("t" ).Eq (truncateToDay (day )),
6266 goqu .C ("validator_index" ).In (validators ),
6367 )
68+
6469 queryResults , err := runQueryRows [[]Data ](ctx , d .clickhouseReader , ds )
6570 if err != nil {
6671 return nil , fmt .Errorf ("error retrieving data from table validator_dashboard_data_daily: %w" , err )
@@ -83,6 +88,8 @@ func (d *DataAccessService) GetEthpool(ctx context.Context, day time.Time, valid
8388 MissedAttestations : result .AttestationsScheduled - result .AttestationsExecuted ,
8489 SyncExecuted : result .SyncExecuted ,
8590 SyncMissed : result .SyncScheduled - result .SyncExecuted ,
91+ BalanceEnd : result .BalanceEnd ,
92+ BalanceStart : result .BalanceStart ,
8693 }
8794 }
8895
0 commit comments