Skip to content

Conversation

@raulk
Copy link
Contributor

@raulk raulk commented Jan 20, 2026

Adds a new notebook analyzing how validator attestations accumulate over time after the attested slot.

Features

  • Attestation buildup heatmap: Shows cumulative inclusion percentage by delay for each slot
  • CDF distribution histograms: Distribution of inclusion rates at key delays (1, 2, 4, 8 slots)
  • Mean CDF curve: Average buildup curve with 5th-95th percentile bands
  • Correlation analysis: Box plots and scatter plots correlating inclusion rates with:
    • Blob count (do more blobs slow attestation propagation?)
    • Block size (do larger blocks affect attestation timing?)
    • Block propagation time (do late blocks reduce attestation inclusion?)
  • Epoch-level aggregation: Temporal trends in network health
  • Slow slots analysis: Highlights slots with unusually slow attestation inclusion

Technical notes

First-inclusion deduplication: The canonical_beacon_elaborated_attestation table stores attestations in every block where they were included, not just the first. The query uses ARRAY JOIN validators with min(block_slot) per validator to find each validator's first inclusion, ensuring accurate CDF calculations.

EIP-7045 compliance: Per EIP-7045 (Deneb), attestations can now be included through the end of epoch N+1, giving a variable inclusion window of 32-64 slots depending on the attestation's position within its epoch. The query captures delays 1-64 to reflect this extended window.

FROM default.canonical_beacon_elaborated_attestation
WHERE meta_network_name = '{network}'
AND {date_filter}
AND block_slot - slot BETWEEN 1 AND 32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we limiting the inclusion time to only 32 slots?

Since EIP-7045, attestations for the first block in epoch N would have until the end of epoch N+1 to be included, meaning that the max inclusion distance is 63 slots.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, this needs to be updated for EIP-7045. I'll take a stab later today.

@raulk raulk force-pushed the attestation-buildup branch from 6c124c0 to bfe7637 Compare January 28, 2026 17:03
Add notebook 09-attestation-buildup analyzing how validator attestations
accumulate over time. For each slot, attestations can be included in blocks
up to 32 slots later. This analysis shows:

- Attestation inclusion CDF heatmaps by slot and epoch
- Correlation with blob count and block size
- Block propagation timing effects on attestation inclusion
- Time series trends of network health

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@raulk raulk force-pushed the attestation-buildup branch from bfe7637 to 7125486 Compare January 28, 2026 17:11
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

Preview Deployment

🚀 Preview is ready!

URL: https://observatory-staging.ethp2p.dev/pr-49/

Updated: 2026-01-30T11:55:54.425Z

…ggregates

The canonical_beacon_elaborated_attestation table stores multiple aggregate
attestations per committee at different positions in the same block. These
aggregates have massively overlapping validator sets (up to 98% overlap),
causing sum(length(validators)) to overcount by 6-7x.

Fix by using arrayUniq(arrayFlatten(groupArray(validators))) to count unique
validators across all aggregates for each (slot, delay) combination.

Also fixes:
- Add nullif() to prevent division by zero on empty slots
- Remove unused Path import
- Remove unused numpy import from notebook
- Fix markdown error: "Size indicates total validators" -> "block size"
- Remove hardcoded blob count range "(0-6)" from markdown
- Add box plot legend annotations per CLAUDE.md requirements
@raulk raulk changed the title feat: add attestation buildup analysis notebook feat(notebooks): add attestation buildup analysis Jan 29, 2026
raulk added 4 commits January 29, 2026 14:29
EIP-7045 (Deneb) extended attestation validity from 32 slots to the end
of epoch N+1, giving a variable window of 32-64 slots depending on the
attestation's position within its epoch.

Update query to capture delays 1-64 instead of 1-32, and update notebook
visualizations (heatmaps, CDF curves, summary stats) accordingly.
The canonical_beacon_elaborated_attestation table stores attestations
in every block where they were included, not just the first. This
caused the same validator to be counted at multiple inclusion delays,
inflating totals by ~2x.

Fix: Use ARRAY JOIN to explode validators, then min(block_slot) per
validator to find first inclusion. Each validator is now counted
exactly once at their earliest inclusion delay.

Verified: Slot 13564099 now shows 99.76% at delay 1 (was 49.94%).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants