Skip to content

feat: capture fast_confirmation beacon-api event in sentry#830

Merged
samcm merged 8 commits into
masterfrom
feat/fast-confirmation-event-v2
May 14, 2026
Merged

feat: capture fast_confirmation beacon-api event in sentry#830
samcm merged 8 commits into
masterfrom
feat/fast-confirmation-event-v2

Conversation

@samcm
Copy link
Copy Markdown
Member

@samcm samcm commented May 13, 2026

Wires the new `fast_confirmation` SSE event from beacon-APIs#598 end-to-end: sentry decorator and dedup, server-side ingester, consumoor route + ClickHouse migration (`002_fast_confirmation`), and a cross-cutting completeness test that asserts every `Event_Name` is either routed or in an explicit allowlist with a justification. Slot on the event is the confirmed block's slot, so `wallclock_slot`/`wallclock_epoch` are populated from the sentry's wall clock (mirrors voluntary_exit).

Triggered by adding `fast_confirmation` to `ethereum.beaconSubscriptions`. Depends on ethpandaops/go-eth2-client#24 (pinned via pseudo-version; bump to a tag once that merges). Replaces #829 — that one auto-closed when its `swap-eth2-client-fork` base branch was deleted after #828 merged.

samcm added 2 commits May 13, 2026 20:16
Wires the new fast_confirmation SSE event (beacon-APIs#598) all the way
through xatu: adds the proto schema, the sentry decorator + dedup cache,
the server-side ingester registration, a tap on the raw event stream
that decorates fast_confirmation messages (since ethpandaops/beacon
doesn't yet expose a typed OnFastConfirmation), the ClickHouse table +
distributed view as a new 002 migration, the consumoor rowgen and
flatten logic, and a cross-cutting TestCompletenessEveryEventNameHasRoute
that asserts every Event_Name has a route or an allowlisted reason.

The slot field on the event is the confirmed block's slot (typically in
the past), so wallclock_slot/wallclock_epoch are also populated from
the sentry's wall clock, mirroring voluntary_exit.

Triggered by adding fast_confirmation to ethereum.beaconSubscriptions
in the sentry config.

Depends on ethpandaops/go-eth2-client#24 (currently pinned via
pseudo-version; bump to a tag once that merges).
Epoch 0 is genuine genesis data, not 'missing'. Sentinel-zero on
optional derived columns conflated the two. Switch propagation_slot_start_diff,
epoch, epoch_start_date_time, wallclock_slot/epoch and their *_start_date_time
to Nullable so a real null can mean 'unknown'. slot_start_date_time stays
non-null because it's in ORDER BY.
@samcm
Copy link
Copy Markdown
Member Author

samcm commented May 14, 2026

Codex review notes + follow-up:

  • Derived fields are now Nullable so missing/genesis data are distinguishable (epoch 0 is real, not a sentinel). slot_start_date_time stays non-null because it's in ORDER BY.
  • Added a no_additional_data snapshot test to cover the null path and asserted propagation/wallclock_slot/wallclock_epoch in the populated case.
  • Batch lifecycle: flush always calls tw.newBatch() for a fresh batch — Reset() is contract surface, no manual reset hazard.

Follow-up (separate PR): bump ethpandaops/beacon to teach it the fast_confirmation topic. Today the raw event is published before the switch so OnEvent still fires, but each event logs unknown event topic fast_confirmation until beacon learns the constant.

samcm added 4 commits May 14, 2026 11:53
Pulls in ethpandaops/beacon#73 so the library handleEvent switch
recognises fast_confirmation, eliminating per-event 'unknown event
topic' errors when a sentry subscribes to the topic.
@samcm samcm merged commit 467c4b9 into master May 14, 2026
7 checks passed
@samcm samcm deleted the feat/fast-confirmation-event-v2 branch May 14, 2026 02:41
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