Skip to content

Commit

Permalink
Merge pull request #111 from migalabs/feature/add-inclusion-delay-to-…
Browse files Browse the repository at this point in the history
…pools

Add column avg inclusion delay to pools summary
  • Loading branch information
tdahar authored Mar 14, 2024
2 parents 78be628 + 008ec85 commit cfa8f25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE t_pool_summary DROP COLUMN avg_inclusion_delay;
1 change: 1 addition & 0 deletions pkg/db/migrations/000004_add_inclusion_delay_pools.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE t_pool_summary ADD COLUMN avg_inclusion_delay Float;
3 changes: 2 additions & 1 deletion pkg/db/pools_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var (
COUNT(*) as count_expected_attestations,
SUM(CASE WHEN t_proposer_duties.f_proposed = TRUE THEN 1 ELSE 0 END) as proposed_blocks_performance,
SUM(CASE WHEN t_proposer_duties.f_proposed = FALSE THEN 1 ELSE 0 END) as missed_blocks_performance,
count(distinct(t_validator_rewards_summary.f_val_idx)) as number_active_vals
count(distinct(t_validator_rewards_summary.f_val_idx)) as number_active_vals,
AVG(f_inclusion_delay) as avg_inclusion_delay
FROM t_validator_rewards_summary
LEFT JOIN t_eth2_pubkeys
ON t_validator_rewards_summary.f_val_idx = t_eth2_pubkeys.f_val_idx
Expand Down

0 comments on commit cfa8f25

Please sign in to comment.