Skip to content

feat(models): canonical backstops so attestation correctness backfills pre-event#271

Open
samcm wants to merge 1 commit into
masterfrom
orgroup-canonical-backfill
Open

feat(models): canonical backstops so attestation correctness backfills pre-event#271
samcm wants to merge 1 commit into
masterfrom
orgroup-canonical-backfill

Conversation

@samcm

@samcm samcm commented Jun 22, 2026

Copy link
Copy Markdown
Member

OR-group the event-stream dependencies of fct_block_proposer (fct_block_proposer_head → OR int_block_proposer_canonical) and fct_attestation_vote_correctness_by_validator (int_attestation_attested_head → OR int_attestation_attested_canonical) with their canonical equivalents, matching the existing int_beacon_committee_head/fct_block_proposer_head backstops. These models are floored at 2025 only because the event data — which is supplementary and already LEFT-JOINed (orphaned-block status, gossip first-seen timing) — doesn't exist earlier; canonical reaches genesis, so relaxing coverage lets the whole canonical chain backfill the full history (correctness_by_validator_canonical and inclusion_delay fully correct; vote_correctness with NULL gossip-timing pre-event), while int_attestation_first_seen_aggregate is left unchanged as it has no canonical equivalent.

SQL is unchanged — this only relaxes dependency-coverage scheduling; pulling the history down is a follow-up coverage-reset op once deployed.

…s pre-event

fct_block_proposer and fct_attestation_vote_correctness_by_validator are floored
at 2025 because they hard-depend on event-stream-derived models
(fct_block_proposer_head, int_attestation_attested_head) that only exist from
when sentries began capturing gossip/beacon-API events. That event data is
supplementary and already LEFT-JOINed (orphaned-block status; gossip first-seen
timing), so canonical data alone produces valid historical rows.

OR-group each event dep with its canonical equivalent (which reaches genesis),
matching the existing int_beacon_committee_head / fct_block_proposer_head
backstops. The engine unions OR-group bounds, so either source satisfies
coverage and the models backfill the full chain history; event-derived columns
are NULL pre-event.

Unblocks the canonical-only downstream chain to genesis with no further changes:
fct_attestation_correctness_by_validator_canonical and
fct_attestation_inclusion_delay_{daily,hourly} (fully correct historically), plus
fct_attestation_vote_correctness_by_validator{,_daily,_hourly} (NULL gossip
timing pre-event). int_attestation_first_seen_aggregate is intentionally left
unchanged — it has no canonical equivalent (pure gossip first-seen metric).

SQL is unchanged; this only relaxes dependency-coverage scheduling.
@samcm
samcm force-pushed the orgroup-canonical-backfill branch from e1e4bb0 to 273e046 Compare June 22, 2026 06:23
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.

1 participant