Skip to content

Commit

Permalink
feat(v1): use correct sync committee votes table
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly committed Dec 20, 2024
1 parent 8e61a49 commit 7eeb436
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions db/bigtable.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7eeb436

Please sign in to comment.