From 7eeb436eba24598004b000acff277eece39c8b72 Mon Sep 17 00:00:00 2001 From: peter <1674920+peterbitfly@users.noreply.github.com> Date: Fri, 20 Dec 2024 05:57:12 +0000 Subject: [PATCH] feat(v1): use correct sync committee votes table --- db/bigtable.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/db/bigtable.go b/db/bigtable.go index 65d6a620cf..ca8918640e 100644 --- a/db/bigtable.go +++ b/db/bigtable.go @@ -1804,17 +1804,17 @@ func (bigtable *Bigtable) getValidatorSyncDutiesHistoryClickhouse(validators []u query := ` SELECT - validator_sync_committee_votes_epoch.validator_index, - validator_sync_committee_votes_epoch.epoch, - validator_sync_committee_votes_epoch.slot, - validator_sync_committee_votes_epoch.executed - FROM validator_sync_committee_votes_epoch FINAL + validator_sync_committee_votes_slot.validator_index, + validator_sync_committee_votes_slot.epoch, + validator_sync_committee_votes_slot.slot, + validator_sync_committee_votes_slot.executed + FROM validator_sync_committee_votes_slot FINAL WHERE - validator_sync_committee_votes_epoch.epoch_timestamp >= ? AND - validator_sync_committee_votes_epoch.epoch_timestamp <= ? AND - validator_sync_committee_votes_epoch.validator_index IN (?) AND - validator_sync_committee_votes_epoch.slot >= ? AND - validator_sync_committee_votes_epoch.slot <= ? + validator_sync_committee_votes_slot.epoch_timestamp >= ? AND + validator_sync_committee_votes_slot.epoch_timestamp <= ? AND + validator_sync_committee_votes_slot.validator_index IN (?) AND + validator_sync_committee_votes_slot.slot >= ? AND + validator_sync_committee_votes_slot.slot <= ? ORDER BY epoch ASC, slot ASC` err := ClickhouseReaderDb.Select(&rows, query, startEpochTs, endEpochTs, validators, startSlot, endSlot)