Wed, Dec 3, 2025

Propagation anomalies - 2025-12-03

Detection of blocks that propagated slower than expected given their blob count.

Show code
display_sql("block_production_timeline", target_date)
View query
WITH
-- Base slots using proposer duty as the source of truth
slots AS (
    SELECT DISTINCT
        slot,
        slot_start_date_time,
        proposer_validator_index
    FROM canonical_beacon_proposer_duty
    WHERE meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
),

-- Proposer entity mapping
proposer_entity AS (
    SELECT
        index,
        entity
    FROM ethseer_validator_entity
    WHERE meta_network_name = 'mainnet'
),

-- Blob count per slot
blob_count AS (
    SELECT
        slot,
        uniq(blob_index) AS blob_count
    FROM canonical_beacon_blob_sidecar
    WHERE meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
    GROUP BY slot
),

-- Canonical block hash (to verify MEV payload was actually used)
canonical_block AS (
    SELECT
        slot,
        execution_payload_block_hash
    FROM canonical_beacon_block
    WHERE meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
),

-- MEV bid timing using timestamp_ms
mev_bids AS (
    SELECT
        slot,
        slot_start_date_time,
        min(timestamp_ms) AS first_bid_timestamp_ms,
        max(timestamp_ms) AS last_bid_timestamp_ms
    FROM mev_relay_bid_trace
    WHERE meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
    GROUP BY slot, slot_start_date_time
),

-- MEV payload delivery - join canonical block with delivered payloads
-- Note: Use is_mev flag because ClickHouse LEFT JOIN returns 0 (not NULL) for non-matching rows
-- Get value from proposer_payload_delivered (not bid_trace, which may not have the winning block)
mev_payload AS (
    SELECT
        cb.slot,
        cb.execution_payload_block_hash AS winning_block_hash,
        1 AS is_mev,
        max(pd.value) AS winning_bid_value,
        groupArray(DISTINCT pd.relay_name) AS relay_names,
        any(pd.builder_pubkey) AS winning_builder
    FROM canonical_block cb
    GLOBAL INNER JOIN mev_relay_proposer_payload_delivered pd
        ON cb.slot = pd.slot AND cb.execution_payload_block_hash = pd.block_hash
    WHERE pd.meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
    GROUP BY cb.slot, cb.execution_payload_block_hash
),

-- Winning bid timing from bid_trace (may not exist for all MEV blocks)
winning_bid AS (
    SELECT
        bt.slot,
        bt.slot_start_date_time,
        argMin(bt.timestamp_ms, bt.event_date_time) AS winning_bid_timestamp_ms
    FROM mev_relay_bid_trace bt
    GLOBAL INNER JOIN mev_payload mp ON bt.slot = mp.slot AND bt.block_hash = mp.winning_block_hash
    WHERE bt.meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
    GROUP BY bt.slot, bt.slot_start_date_time
),

-- Block gossip timing with spread
block_gossip AS (
    SELECT
        slot,
        min(event_date_time) AS block_first_seen,
        max(event_date_time) AS block_last_seen
    FROM libp2p_gossipsub_beacon_block
    WHERE meta_network_name = 'mainnet'
      AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
    GROUP BY slot
),

-- Column arrival timing: first arrival per column, then min/max of those
column_gossip AS (
    SELECT
        slot,
        min(first_seen) AS first_column_first_seen,
        max(first_seen) AS last_column_first_seen
    FROM (
        SELECT
            slot,
            column_index,
            min(event_date_time) AS first_seen
        FROM libp2p_gossipsub_data_column_sidecar
        WHERE meta_network_name = 'mainnet'
          AND slot_start_date_time >= '2025-12-03' AND slot_start_date_time < '2025-12-03'::date + INTERVAL 1 DAY
          AND event_date_time > '1970-01-01 00:00:01'
        GROUP BY slot, column_index
    )
    GROUP BY slot
)

SELECT
    s.slot AS slot,
    s.slot_start_date_time AS slot_start_date_time,
    pe.entity AS proposer_entity,

    -- Blob count
    coalesce(bc.blob_count, 0) AS blob_count,

    -- MEV bid timing (absolute and relative to slot start)
    fromUnixTimestamp64Milli(mb.first_bid_timestamp_ms) AS first_bid_at,
    mb.first_bid_timestamp_ms - toInt64(toUnixTimestamp(mb.slot_start_date_time)) * 1000 AS first_bid_ms,
    fromUnixTimestamp64Milli(mb.last_bid_timestamp_ms) AS last_bid_at,
    mb.last_bid_timestamp_ms - toInt64(toUnixTimestamp(mb.slot_start_date_time)) * 1000 AS last_bid_ms,

    -- Winning bid timing (from bid_trace, may be NULL if block hash not in bid_trace)
    if(wb.slot != 0, fromUnixTimestamp64Milli(wb.winning_bid_timestamp_ms), NULL) AS winning_bid_at,
    if(wb.slot != 0, wb.winning_bid_timestamp_ms - toInt64(toUnixTimestamp(s.slot_start_date_time)) * 1000, NULL) AS winning_bid_ms,

    -- MEV payload info (from proposer_payload_delivered, always present for MEV blocks)
    if(mp.is_mev = 1, mp.winning_bid_value, NULL) AS winning_bid_value,
    if(mp.is_mev = 1, mp.relay_names, []) AS winning_relays,
    if(mp.is_mev = 1, mp.winning_builder, NULL) AS winning_builder,

    -- Block gossip timing with spread
    bg.block_first_seen,
    dateDiff('millisecond', s.slot_start_date_time, bg.block_first_seen) AS block_first_seen_ms,
    bg.block_last_seen,
    dateDiff('millisecond', s.slot_start_date_time, bg.block_last_seen) AS block_last_seen_ms,
    dateDiff('millisecond', bg.block_first_seen, bg.block_last_seen) AS block_spread_ms,

    -- Column arrival timing (NULL when no blobs)
    if(coalesce(bc.blob_count, 0) = 0, NULL, cg.first_column_first_seen) AS first_column_first_seen,
    if(coalesce(bc.blob_count, 0) = 0, NULL, dateDiff('millisecond', s.slot_start_date_time, cg.first_column_first_seen)) AS first_column_first_seen_ms,
    if(coalesce(bc.blob_count, 0) = 0, NULL, cg.last_column_first_seen) AS last_column_first_seen,
    if(coalesce(bc.blob_count, 0) = 0, NULL, dateDiff('millisecond', s.slot_start_date_time, cg.last_column_first_seen)) AS last_column_first_seen_ms,
    if(coalesce(bc.blob_count, 0) = 0, NULL, dateDiff('millisecond', cg.first_column_first_seen, cg.last_column_first_seen)) AS column_spread_ms

FROM slots s
GLOBAL LEFT JOIN proposer_entity pe ON s.proposer_validator_index = pe.index
GLOBAL LEFT JOIN blob_count bc ON s.slot = bc.slot
GLOBAL LEFT JOIN mev_bids mb ON s.slot = mb.slot
GLOBAL LEFT JOIN mev_payload mp ON s.slot = mp.slot
GLOBAL LEFT JOIN winning_bid wb ON s.slot = wb.slot
GLOBAL LEFT JOIN block_gossip bg ON s.slot = bg.slot
GLOBAL LEFT JOIN column_gossip cg ON s.slot = cg.slot

ORDER BY s.slot DESC
Show code
df = load_parquet("block_production_timeline", target_date)

# Filter to valid blocks (exclude missed slots)
df = df[df["block_first_seen_ms"].notna()]
df = df[(df["block_first_seen_ms"] >= 0) & (df["block_first_seen_ms"] < 60000)]

# Flag MEV vs local blocks
df["has_mev"] = df["winning_bid_value"].notna()
df["block_type"] = df["has_mev"].map({True: "MEV", False: "Local"})

# Get max blob count for charts
max_blobs = df["blob_count"].max()

print(f"Total valid blocks: {len(df):,}")
print(f"MEV blocks: {df['has_mev'].sum():,} ({df['has_mev'].mean()*100:.1f}%)")
print(f"Local blocks: {(~df['has_mev']).sum():,} ({(~df['has_mev']).mean()*100:.1f}%)")
Total valid blocks: 7,116
MEV blocks: 6,544 (92.0%)
Local blocks: 572 (8.0%)

Anomaly detection method

Blocks that are slow relative to their blob count are more interesting than blocks that are simply slow. A 500ms block with 15 blobs may be normal; with 0 blobs it's anomalous.

The method:

  1. Fit linear regression: block_first_seen_ms ~ blob_count
  2. Calculate residuals (actual - expected)
  3. Flag blocks with residuals > 2σ as anomalies

Points above the ±2σ band propagated slower than expected given their blob count.

Show code
# Conditional outliers: blocks slow relative to their blob count
df_anomaly = df.copy()

# Fit regression: block_first_seen_ms ~ blob_count
slope, intercept, r_value, p_value, std_err = stats.linregress(
    df_anomaly["blob_count"].astype(float), df_anomaly["block_first_seen_ms"]
)

# Calculate expected value and residual
df_anomaly["expected_ms"] = intercept + slope * df_anomaly["blob_count"].astype(float)
df_anomaly["residual_ms"] = df_anomaly["block_first_seen_ms"] - df_anomaly["expected_ms"]

# Calculate residual standard deviation
residual_std = df_anomaly["residual_ms"].std()

# Flag anomalies: residual > 2σ (unexpectedly slow)
df_anomaly["is_anomaly"] = df_anomaly["residual_ms"] > 2 * residual_std

n_anomalies = df_anomaly["is_anomaly"].sum()
pct_anomalies = n_anomalies / len(df_anomaly) * 100

# Prepare outliers dataframe
df_outliers = df_anomaly[df_anomaly["is_anomaly"]].copy()
df_outliers["relay"] = df_outliers["winning_relays"].apply(lambda x: x[0] if len(x) > 0 else "Local")

print(f"Regression: block_ms = {intercept:.1f} + {slope:.2f} × blob_count (R² = {r_value**2:.3f})")
print(f"Residual σ = {residual_std:.1f}ms")
print(f"Anomalies (>2σ slow): {n_anomalies:,} ({pct_anomalies:.1f}%)")
Regression: block_ms = 1846.1 + 13.90 × blob_count (R² = 0.004)
Residual σ = 635.1ms
Anomalies (>2σ slow): 167 (2.3%)
Show code
# Create scatter plot with regression band
x_range = np.array([0, int(max_blobs)])
y_pred = intercept + slope * x_range
y_upper = y_pred + 2 * residual_std
y_lower = y_pred - 2 * residual_std

fig = go.Figure()

# Add ±2σ band
fig.add_trace(go.Scatter(
    x=np.concatenate([x_range, x_range[::-1]]),
    y=np.concatenate([y_upper, y_lower[::-1]]),
    fill="toself",
    fillcolor="rgba(100,100,100,0.2)",
    line=dict(width=0),
    name="±2σ band",
    hoverinfo="skip",
))

# Add regression line
fig.add_trace(go.Scatter(
    x=x_range,
    y=y_pred,
    mode="lines",
    line=dict(color="white", width=2, dash="dash"),
    name="Expected",
))

# Normal points (sample to avoid overplotting)
df_normal = df_anomaly[~df_anomaly["is_anomaly"]]
if len(df_normal) > 2000:
    df_normal = df_normal.sample(2000, random_state=42)

fig.add_trace(go.Scatter(
    x=df_normal["blob_count"],
    y=df_normal["block_first_seen_ms"],
    mode="markers",
    marker=dict(size=4, color="rgba(100,150,200,0.4)"),
    name=f"Normal ({len(df_anomaly) - n_anomalies:,})",
    hoverinfo="skip",
))

# Anomaly points
fig.add_trace(go.Scatter(
    x=df_outliers["blob_count"],
    y=df_outliers["block_first_seen_ms"],
    mode="markers",
    marker=dict(
        size=7,
        color="#e74c3c",
        line=dict(width=1, color="white"),
    ),
    name=f"Anomalies ({n_anomalies:,})",
    customdata=np.column_stack([
        df_outliers["slot"],
        df_outliers["residual_ms"].round(0),
        df_outliers["relay"],
    ]),
    hovertemplate="<b>Slot %{customdata[0]}</b><br>Blobs: %{x}<br>Actual: %{y:.0f}ms<br>+%{customdata[1]}ms vs expected<br>Relay: %{customdata[2]}<extra></extra>",
))

fig.update_layout(
    margin=dict(l=60, r=30, t=30, b=60),
    xaxis=dict(title="Blob count", range=[-0.5, int(max_blobs) + 0.5]),
    yaxis=dict(title="Block first seen (ms from slot start)"),
    legend=dict(orientation="h", yanchor="bottom", y=1.02, xanchor="right", x=1),
    height=500,
)
fig.show(config={"responsive": True})

All propagation anomalies

Blocks that propagated much slower than expected given their blob count, sorted by residual (worst first).

Show code
# All anomalies table with selectable text and Lab links
if n_anomalies > 0:
    df_table = df_outliers.sort_values("residual_ms", ascending=False)[
        ["slot", "blob_count", "block_first_seen_ms", "expected_ms", "residual_ms", "relay"]
    ].copy()
    df_table["block_first_seen_ms"] = df_table["block_first_seen_ms"].round(0).astype(int)
    df_table["expected_ms"] = df_table["expected_ms"].round(0).astype(int)
    df_table["residual_ms"] = df_table["residual_ms"].round(0).astype(int)
    
    # Create Lab links
    df_table["lab_link"] = df_table["slot"].apply(
        lambda s: f'<a href="https://lab.ethpandaops.io/ethereum/slots/{s}" target="_blank">View</a>'
    )
    
    # Build HTML table
    html = '''
    <style>
    .anomaly-table { border-collapse: collapse; width: 100%; font-family: monospace; font-size: 13px; }
    .anomaly-table th { background: #2c3e50; color: white; padding: 8px 12px; text-align: left; position: sticky; top: 0; }
    .anomaly-table td { padding: 6px 12px; border-bottom: 1px solid #eee; }
    .anomaly-table tr:hover { background: #f5f5f5; }
    .anomaly-table .num { text-align: right; }
    .anomaly-table .delta { background: #ffebee; color: #c62828; font-weight: bold; }
    .anomaly-table a { color: #1976d2; text-decoration: none; }
    .anomaly-table a:hover { text-decoration: underline; }
    .table-container { max-height: 600px; overflow-y: auto; }
    </style>
    <div class="table-container">
    <table class="anomaly-table">
    <thead>
    <tr><th>Slot</th><th class="num">Blobs</th><th class="num">Actual (ms)</th><th class="num">Expected (ms)</th><th class="num">Δ (ms)</th><th>Relay</th><th>Lab</th></tr>
    </thead>
    <tbody>
    '''
    
    for _, row in df_table.iterrows():
        html += f'''<tr>
            <td>{row["slot"]}</td>
            <td class="num">{row["blob_count"]}</td>
            <td class="num">{row["block_first_seen_ms"]}</td>
            <td class="num">{row["expected_ms"]}</td>
            <td class="num delta">+{row["residual_ms"]}</td>
            <td>{row["relay"]}</td>
            <td>{row["lab_link"]}</td>
        </tr>'''
    
    html += '</tbody></table></div>'
    display(HTML(html))
    print(f"\nTotal anomalies: {len(df_table):,}")
else:
    print("No anomalies detected.")
SlotBlobsActual (ms)Expected (ms)Δ (ms)RelayLab
13159116 0 11022 1846 +9176 Local View
13165126 0 9923 1846 +8077 Local View
13158738 0 8648 1846 +6802 Local View
13159214 0 6054 1846 +4208 Local View
13163840 0 5683 1846 +3837 Local View
13163009 0 4932 1846 +3086 Local View
13159522 0 4844 1846 +2998 Local View
13160454 9 4913 1971 +2942 Local View
13161092 0 4753 1846 +2907 Local View
13164887 9 4659 1971 +2688 Local View
13163195 9 4532 1971 +2561 Local View
13159119 0 4108 1846 +2262 Local View
13159305 0 4053 1846 +2207 Local View
13161446 0 4049 1846 +2203 Local View
13163486 8 4140 1957 +2183 Ultra Sound View
13158920 0 3998 1846 +2152 Local View
13163251 0 3973 1846 +2127 Local View
13160964 7 4040 1943 +2097 Agnostic Gnosis View
13161309 0 3905 1846 +2059 Local View
13163487 0 3875 1846 +2029 Local View
13158722 0 3872 1846 +2026 Local View
13159900 5 3897 1916 +1981 Titan Relay View
13159521 0 3599 1846 +1753 Flashbots View
13163048 9 3677 1971 +1706 BloXroute Max Profit View
13159776 4 3601 1902 +1699 Aestus View
13162591 3 3585 1888 +1697 Titan Relay View
13162467 9 3666 1971 +1695 Local View
13159135 7 3630 1943 +1687 Flashbots View
13163753 7 3619 1943 +1676 Ultra Sound View
13158976 4 3571 1902 +1669 Local View
13162582 9 3638 1971 +1667 Local View
13159744 5 3573 1916 +1657 Titan Relay View
13163371 8 3585 1957 +1628 Ultra Sound View
13162330 9 3579 1971 +1608 Local View
13163545 7 3551 1943 +1608 EthGas View
13160762 4 3502 1902 +1600 Local View
13161894 0 3445 1846 +1599 Local View
13161644 7 3538 1943 +1595 Titan Relay View
13162864 8 3538 1957 +1581 Ultra Sound View
13164829 0 3405 1846 +1559 BloXroute Regulated View
13162400 0 3387 1846 +1541 Ultra Sound View
13161800 0 3382 1846 +1536 Local View
13162463 0 3380 1846 +1534 Ultra Sound View
13163268 9 3494 1971 +1523 Local View
13158921 9 3491 1971 +1520 Titan Relay View
13160878 8 3476 1957 +1519 Ultra Sound View
13162816 8 3476 1957 +1519 Ultra Sound View
13159074 6 3448 1930 +1518 Titan Relay View
13160981 5 3421 1916 +1505 Ultra Sound View
13159969 9 3473 1971 +1502 Ultra Sound View
13161315 9 3473 1971 +1502 BloXroute Regulated View
13164867 6 3431 1930 +1501 BloXroute Regulated View
13162792 4 3392 1902 +1490 Ultra Sound View
13162368 6 3418 1930 +1488 Ultra Sound View
13159592 7 3424 1943 +1481 Titan Relay View
13161579 8 3434 1957 +1477 Titan Relay View
13163864 4 3363 1902 +1461 BloXroute Max Profit View
13158622 7 3399 1943 +1456 Ultra Sound View
13162437 9 3421 1971 +1450 Flashbots View
13163591 7 3392 1943 +1449 BloXroute Regulated View
13159168 4 3347 1902 +1445 Ultra Sound View
13162931 7 3388 1943 +1445 Titan Relay View
13159874 4 3343 1902 +1441 Titan Relay View
13164336 0 3286 1846 +1440 Ultra Sound View
13165039 0 3277 1846 +1431 BloXroute Regulated View
13162162 9 3400 1971 +1429 Ultra Sound View
13164333 0 3270 1846 +1424 BloXroute Regulated View
13161123 9 3395 1971 +1424 Ultra Sound View
13158506 7 3366 1943 +1423 BloXroute Regulated View
13158515 5 3334 1916 +1418 BloXroute Regulated View
13163859 6 3347 1930 +1417 Titan Relay View
13159404 6 3345 1930 +1415 BloXroute Regulated View
13164498 0 3258 1846 +1412 BloXroute Regulated View
13160574 7 3354 1943 +1411 BloXroute Regulated View
13158898 5 3320 1916 +1404 Titan Relay View
13161920 7 3346 1943 +1403 EthGas View
13165075 9 3373 1971 +1402 BloXroute Max Profit View
13163067 8 3358 1957 +1401 Titan Relay View
13159954 9 3371 1971 +1400 BloXroute Regulated View
13164796 9 3370 1971 +1399 Flashbots View
13163933 9 3367 1971 +1396 Titan Relay View
13162041 9 3362 1971 +1391 Ultra Sound View
13164385 9 3361 1971 +1390 BloXroute Regulated View
13159228 7 3333 1943 +1390 BloXroute Regulated View
13162927 8 3345 1957 +1388 Ultra Sound View
13159994 8 3342 1957 +1385 BloXroute Regulated View
13162590 9 3354 1971 +1383 Ultra Sound View
13160209 4 3283 1902 +1381 BloXroute Regulated View
13160455 7 3324 1943 +1381 Agnostic Gnosis View
13160336 8 3337 1957 +1380 Ultra Sound View
13162854 9 3350 1971 +1379 BloXroute Regulated View
13162072 8 3336 1957 +1379 Titan Relay View
13160903 7 3318 1943 +1375 BloXroute Regulated View
13162395 0 3220 1846 +1374 BloXroute Max Profit View
13163267 9 3345 1971 +1374 Ultra Sound View
13159627 9 3344 1971 +1373 Ultra Sound View
13159938 4 3269 1902 +1367 Flashbots View
13161434 4 3267 1902 +1365 Ultra Sound View
13162784 4 3267 1902 +1365 Ultra Sound View
13160264 4 3265 1902 +1363 BloXroute Regulated View
13165090 9 3330 1971 +1359 BloXroute Max Profit View
13158551 6 3287 1930 +1357 Agnostic Gnosis View
13161623 6 3287 1930 +1357 Ultra Sound View
13161117 8 3309 1957 +1352 Titan Relay View
13163695 9 3321 1971 +1350 Flashbots View
13158366 9 3321 1971 +1350 Agnostic Gnosis View
13160725 7 3292 1943 +1349 BloXroute Regulated View
13159589 7 3291 1943 +1348 Ultra Sound View
13160233 4 3249 1902 +1347 BloXroute Regulated View
13163241 6 3274 1930 +1344 BloXroute Regulated View
13163013 8 3301 1957 +1344 Titan Relay View
13158015 0 3189 1846 +1343 Ultra Sound View
13163033 9 3310 1971 +1339 Ultra Sound View
13158739 9 3309 1971 +1338 Ultra Sound View
13163676 7 3280 1943 +1337 Local View
13162679 9 3307 1971 +1336 BloXroute Regulated View
13164191 9 3306 1971 +1335 Flashbots View
13163017 8 3291 1957 +1334 Ultra Sound View
13158153 8 3290 1957 +1333 Ultra Sound View
13159444 9 3302 1971 +1331 Ultra Sound View
13158043 9 3302 1971 +1331 Titan Relay View
13162253 0 3175 1846 +1329 Ultra Sound View
13158466 5 3244 1916 +1328 Local View
13162475 8 3284 1957 +1327 BloXroute Max Profit View
13162826 9 3297 1971 +1326 Ultra Sound View
13158458 8 3279 1957 +1322 Agnostic Gnosis View
13162614 0 3164 1846 +1318 Ultra Sound View
13158782 7 3261 1943 +1318 Titan Relay View
13160084 7 3260 1943 +1317 Ultra Sound View
13162193 7 3260 1943 +1317 BloXroute Regulated View
13158163 1 3176 1860 +1316 BloXroute Regulated View
13161140 9 3287 1971 +1316 Ultra Sound View
13159371 8 3271 1957 +1314 BloXroute Regulated View
13161619 7 3256 1943 +1313 BloXroute Regulated View
13159051 9 3283 1971 +1312 Flashbots View
13158743 5 3227 1916 +1311 BloXroute Max Profit View
13164170 9 3279 1971 +1308 Ultra Sound View
13159905 8 3265 1957 +1308 Flashbots View
13163051 9 3275 1971 +1304 Ultra Sound View
13158669 8 3261 1957 +1304 Ultra Sound View
13165094 6 3233 1930 +1303 Flashbots View
13158511 9 3274 1971 +1303 Flashbots View
13161447 9 3272 1971 +1301 Titan Relay View
13164091 8 3258 1957 +1301 Ultra Sound View
13160102 9 3269 1971 +1298 BloXroute Regulated View
13164684 0 3142 1846 +1296 Ultra Sound View
13158918 9 3266 1971 +1295 Ultra Sound View
13158606 9 3265 1971 +1294 Ultra Sound View
13160986 8 3251 1957 +1294 Ultra Sound View
13158217 8 3250 1957 +1293 BloXroute Max Profit View
13164837 0 3136 1846 +1290 Ultra Sound View
13158594 0 3135 1846 +1289 Local View
13162963 9 3260 1971 +1289 Flashbots View
13162544 8 3246 1957 +1289 Titan Relay View
13163672 6 3218 1930 +1288 Titan Relay View
13164891 6 3215 1930 +1285 Ultra Sound View
13158230 4 3187 1902 +1285 Ultra Sound View
13164949 0 3130 1846 +1284 Ultra Sound View
13158377 8 3238 1957 +1281 Ultra Sound View
13159701 9 3247 1971 +1276 Ultra Sound View
13162371 7 3219 1943 +1276 Ultra Sound View
13160624 9 3246 1971 +1275 Local View
13163239 6 3204 1930 +1274 BloXroute Max Profit View
13164142 4 3174 1902 +1272 Titan Relay View
13161491 1 3132 1860 +1272 Ultra Sound View
13163722 9 3242 1971 +1271 Ultra Sound View
13161698 8 3228 1957 +1271 Ultra Sound View
Total anomalies: 167

Anomalies by relay

Which relays have the most propagation anomalies?

Show code
if n_anomalies > 0:
    # Count anomalies by relay
    relay_counts = df_outliers["relay"].value_counts().reset_index()
    relay_counts.columns = ["relay", "anomaly_count"]
    
    # Get total blocks per relay for context
    df_anomaly["relay"] = df_anomaly["winning_relays"].apply(lambda x: x[0] if len(x) > 0 else "Local")
    total_by_relay = df_anomaly.groupby("relay").size().reset_index(name="total_blocks")
    
    relay_counts = relay_counts.merge(total_by_relay, on="relay")
    relay_counts["anomaly_rate"] = relay_counts["anomaly_count"] / relay_counts["total_blocks"] * 100
    relay_counts = relay_counts.sort_values("anomaly_count", ascending=True)
    
    fig = go.Figure()
    
    fig.add_trace(go.Bar(
        y=relay_counts["relay"],
        x=relay_counts["anomaly_count"],
        orientation="h",
        marker_color="#e74c3c",
        text=relay_counts.apply(lambda r: f"{r['anomaly_count']} ({r['anomaly_rate']:.1f}%)", axis=1),
        textposition="outside",
        hovertemplate="<b>%{y}</b><br>Anomalies: %{x}<br>Total blocks: %{customdata[0]:,}<br>Rate: %{customdata[1]:.1f}%<extra></extra>",
        customdata=np.column_stack([relay_counts["total_blocks"], relay_counts["anomaly_rate"]]),
    ))
    
    fig.update_layout(
        margin=dict(l=150, r=80, t=30, b=60),
        xaxis=dict(title="Number of anomalies"),
        yaxis=dict(title=""),
        height=350,
    )
    fig.show(config={"responsive": True})

Anomalies by blob count

Are anomalies more common at certain blob counts?

Show code
if n_anomalies > 0:
    # Count anomalies by blob count
    blob_anomalies = df_outliers.groupby("blob_count").size().reset_index(name="anomaly_count")
    blob_total = df_anomaly.groupby("blob_count").size().reset_index(name="total_blocks")
    
    blob_stats = blob_total.merge(blob_anomalies, on="blob_count", how="left").fillna(0)
    blob_stats["anomaly_count"] = blob_stats["anomaly_count"].astype(int)
    blob_stats["anomaly_rate"] = blob_stats["anomaly_count"] / blob_stats["total_blocks"] * 100
    
    fig = go.Figure()
    
    fig.add_trace(go.Bar(
        x=blob_stats["blob_count"],
        y=blob_stats["anomaly_count"],
        marker_color="#e74c3c",
        hovertemplate="<b>%{x} blobs</b><br>Anomalies: %{y}<br>Total: %{customdata[0]:,}<br>Rate: %{customdata[1]:.1f}%<extra></extra>",
        customdata=np.column_stack([blob_stats["total_blocks"], blob_stats["anomaly_rate"]]),
    ))
    
    fig.update_layout(
        margin=dict(l=60, r=30, t=30, b=60),
        xaxis=dict(title="Blob count", dtick=1),
        yaxis=dict(title="Number of anomalies"),
        height=350,
    )
    fig.show(config={"responsive": True})