Skip to content

Conversation

@raulk
Copy link
Contributor

@raulk raulk commented Jan 9, 2026

Summary

  • Add temporal filtering to only count transactions seen in mempool before their inclusion slot started
  • Implement three-way transaction categorization: before slot (public), after slot (propagated), never seen (private/MEV)
  • Add age percentiles (p50-p99) showing how long transactions waited in mempool
  • Add delay percentiles for transactions first seen after block propagation

Changes

New query: fetch_mempool_availability

  • Per-slot, per-transaction-type aggregation
  • Uses quantilesIf() for efficient percentile computation
  • Filters epoch-zero timestamps to avoid bogus age calculations
  • Extended mempool lookback window for post-propagation detection

Updated notebook: 04-mempool-visibility.ipynb

  • Summary table with 3-way breakdown percentages
  • Stacked bar chart showing before/after/never composition
  • Hourly coverage trends and volume charts with 3-way breakdown
  • New "Mempool age distribution" section with percentile table and chart
  • New "Propagation delay" section for post-slot observations

Test plan

  • Query executes successfully (~60s for full day)
  • Notebook renders without errors
  • Visualizations display correctly with new data structure

Improve mempool visibility analysis with three key enhancements:

1. Pre-slot temporal filtering: Only count transactions as "seen" if they
   were observed in the mempool BEFORE the slot start time of the block
   that included them. This corrects for transactions that appear in the
   mempool after block propagation.

2. Three-way transaction categorization:
   - seen_before_slot: Available in mempool before inclusion (public)
   - seen_after_slot: First appeared after block propagation
   - never_seen: Truly private (MEV bundles, direct builder submissions)

3. Age/delay percentile analysis:
   - age_percentiles_ms: How long transactions waited in mempool (p50-p99)
   - delay_percentiles_ms: Propagation delay for post-slot observations

The new fetch_mempool_availability query aggregates per-slot, per-tx-type
with efficient quantilesIf() computation. Notebook visualizations updated
to show stacked breakdowns and percentile distributions.
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Preview Deployment

🚀 Preview is ready!

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

Updated: 2026-01-10T11:41:09.959Z

raulk added 6 commits January 9, 2026 23:45
Add binned histogram visualization alongside percentile analysis:

- 15 log2 buckets from <0.5s to >=1h for both age and delay metrics
- Faceted bar charts showing distribution per transaction type
- Consistent color scheme (TX_TYPE_COLORS) across all visualizations
- Replaced grouped bar charts with percentile line charts

Query changes:
- Generate histogram columns dynamically using countIf
- Buckets: <0.5s, 0.5-1s, 1-2s, 2-4s, 4-8s, 8-16s, 16-32s, 32s-1m,
  1-2m, 2-4m, 4-8m, 8-17m, 17-34m, 34-60m, >=1h

The histograms reveal distribution shape (where most transactions
cluster) while percentile lines show tail behavior for SLA analysis.
…plots

Faceted subplots with shared y-axes made smaller tx types hard to read.
Grouped bar charts show all tx types side-by-side on the same scale,
making distribution comparisons easier.
Log scale better shows the range of values across percentiles,
especially when p99 is orders of magnitude larger than p50.
Each tx type now has its own y-scale, making distribution shapes
visible regardless of absolute transaction counts.
Add facet_col_wrap=2 to age and delay histograms for better layout
on narrow screens. Increase chart height to 600 to accommodate
the 3-row facet layout (5 tx types / 2 cols).
@raulk raulk merged commit 5236a22 into main Jan 10, 2026
1 check passed
@raulk raulk deleted the feat/mempool-availability-timing branch January 10, 2026 11:22
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.

2 participants