Aggregation Performance

Analysis of post-quantum signature aggregation and verification in Lean Consensus clients.

This notebook examines:

  • Signature aggregation time
  • Total signatures aggregated
  • Aggregation verification time
  • Aggregation and verification throughput (per second and per slot)
  • Performance comparison across clients
Show code
import json
from pathlib import Path

import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots

# Set default renderer for static HTML output
import plotly.io as pio
pio.renderers.default = "notebook"
Show code
# Resolve devnet_id
DATA_DIR = Path("../data")

if devnet_id is None:
    # Use latest devnet from manifest
    devnets_path = DATA_DIR / "devnets.json"
    if devnets_path.exists():
        with open(devnets_path) as f:
            devnets = json.load(f).get("devnets", [])
        if devnets:
            devnet_id = devnets[-1]["id"]  # Latest
            print(f"Using latest devnet: {devnet_id}")
    else:
        raise ValueError("No devnets.json found. Run 'just detect-devnets' first.")

DEVNET_DIR = DATA_DIR / devnet_id
print(f"Loading data from: {DEVNET_DIR}")
Loading data from: ../data/pqdevnet-20260518T0141Z
Show code
# Load devnet metadata
with open(DATA_DIR / "devnets.json") as f:
    devnets_data = json.load(f)
    devnet_info = next((d for d in devnets_data["devnets"] if d["id"] == devnet_id), None)

if devnet_info:
    print(f"Devnet: {devnet_info['id']}")
    print(f"Duration: {devnet_info['duration_hours']:.1f} hours")
    print(f"Time: {devnet_info['start_time']} to {devnet_info['end_time']}")
    print(f"Slots: {devnet_info['start_slot']} β†’ {devnet_info['end_slot']}")
    print(f"Clients: {', '.join(devnet_info['clients'])}")
Devnet: pqdevnet-20260518T0141Z
Duration: 0.2 hours
Time: 2026-05-18T01:41:31+00:00 to 2026-05-18T01:55:37+00:00
Slots: 0 β†’ 2849
Clients: ethlambda_0, ethlambda_1, ethlambda_10, ethlambda_11, ethlambda_12, ethlambda_13, ethlambda_14, ethlambda_15, ethlambda_2, ethlambda_3, ethlambda_4, ethlambda_5, ethlambda_6, ethlambda_7, ethlambda_8, ethlambda_9, gean_0, gean_1, gean_2, gean_3, gean_4, gean_5, gean_6, gean_7, nlean_0, nlean_1, nlean_2, nlean_3, nlean_4, nlean_5, nlean_6, nlean_7, ream_0, ream_1, ream_10, ream_11, ream_12, ream_14, ream_15, ream_2, ream_3, ream_4, ream_5, ream_6, ream_7, ream_8, ream_9, zeam_0, zeam_1, zeam_10, zeam_11, zeam_12, zeam_13, zeam_14, zeam_15, zeam_2, zeam_3, zeam_4, zeam_5, zeam_6, zeam_7, zeam_8, zeam_9

Load DataΒΆ

Show code
# Load PQ signature timing data
timing_df = pd.read_parquet(DEVNET_DIR / "pq_signature_timing.parquet")
print(f"Loaded {len(timing_df)} timing records")
print(f"Metrics: {timing_df['metric'].unique().tolist()}")
print(f"Clients: {timing_df['client'].unique().tolist()}")
Loaded 1242 timing records
Metrics: ['signing', 'verification', 'agg_verification']
Clients: ['ethlambda_1', 'ethlambda_9', 'ethlambda_4', 'ethlambda_10', 'ethlambda_13', 'ethlambda_8', 'ethlambda_0', 'ethlambda_11', 'ethlambda_5', 'ethlambda_12', 'ethlambda_15', 'ethlambda_7', 'ethlambda_2', 'ethlambda_3', 'ethlambda_6', 'ethlambda_14', 'gean_7', 'gean_1', 'gean_0', 'gean_2', 'gean_6', 'gean_4', 'gean_5', 'gean_3', 'nlean_6', 'nlean_1', 'nlean_7', 'nlean_4', 'nlean_0', 'nlean_3', 'nlean_2', 'nlean_5', 'zeam_4', 'zeam_12', 'zeam_7', 'zeam_13', 'zeam_2', 'zeam_10', 'zeam_0', 'zeam_8', 'zeam_14', 'zeam_15', 'zeam_1', 'zeam_9', 'zeam_11', 'zeam_5', 'zeam_6', 'zeam_3', 'ream_2', 'ream_1', 'ream_3']
Show code
# Load PQ signature counts
counts_df = pd.read_parquet(DEVNET_DIR / "pq_signature_metrics.parquet")
print(f"Loaded {len(counts_df)} count records")
print(f"Metrics: {counts_df['metric'].unique().tolist()}")

# Unified client list from devnet metadata (includes all containers via cAdvisor)
all_clients = sorted(devnet_info["clients"])
n_cols = min(len(all_clients), 2)
n_rows = -(-len(all_clients) // n_cols)
print(f"\nAll clients ({len(all_clients)}): {all_clients}")
Loaded 2474 count records
Metrics: ['lean_pq_sig_aggregated_signatures_valid_total', 'lean_pq_sig_aggregated_signatures_invalid_total', 'lean_pq_sig_aggregated_signatures_total', 'lean_pq_sig_attestations_in_aggregated_signatures_total']

All clients (63): ['ethlambda_0', 'ethlambda_1', 'ethlambda_10', 'ethlambda_11', 'ethlambda_12', 'ethlambda_13', 'ethlambda_14', 'ethlambda_15', 'ethlambda_2', 'ethlambda_3', 'ethlambda_4', 'ethlambda_5', 'ethlambda_6', 'ethlambda_7', 'ethlambda_8', 'ethlambda_9', 'gean_0', 'gean_1', 'gean_2', 'gean_3', 'gean_4', 'gean_5', 'gean_6', 'gean_7', 'nlean_0', 'nlean_1', 'nlean_2', 'nlean_3', 'nlean_4', 'nlean_5', 'nlean_6', 'nlean_7', 'ream_0', 'ream_1', 'ream_10', 'ream_11', 'ream_12', 'ream_14', 'ream_15', 'ream_2', 'ream_3', 'ream_4', 'ream_5', 'ream_6', 'ream_7', 'ream_8', 'ream_9', 'zeam_0', 'zeam_1', 'zeam_10', 'zeam_11', 'zeam_12', 'zeam_13', 'zeam_14', 'zeam_15', 'zeam_2', 'zeam_3', 'zeam_4', 'zeam_5', 'zeam_6', 'zeam_7', 'zeam_8', 'zeam_9']

Total Signatures AggregatedΒΆ

Cumulative number of individual signatures included in aggregated signature proofs over time.

Show code
att_in_agg_df = counts_df[counts_df["metric"] == "lean_pq_sig_attestations_in_aggregated_signatures_total"]

if att_in_agg_df.empty:
    print("No signatures in aggregated signature proof available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = att_in_agg_df[att_in_agg_df["client"] == client].sort_values("timestamp")
        if not cdf.empty and cdf["value"].max() > 0:
            fig.add_trace(
                go.Scatter(
                    x=cdf["timestamp"], y=cdf["value"],
                    showlegend=False,
                    line=dict(color="#636EFA"),
                ),
                row=row, col=col,
            )
            fig.update_yaxes(title_text="count", row=row, col=col)
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )

    fig.update_layout(
        title="Total Signatures Aggregated by Client",
        height=270 * n_rows,
    )
    fig.show()

Signature Aggregation TimeΒΆ

Time to build an aggregated signatures proof from individual post-quantum signatures.

Show code
# Filter to aggregate building metric
agg_build_df = timing_df[timing_df["metric"] == "agg_building"].copy()

if agg_build_df.empty:
    print("No signature aggregation timing data available")
else:
    agg_build_df["value_ms"] = agg_build_df["value"] * 1000

    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    colors = {"0.5": "#636EFA", "0.95": "#EF553B", "0.99": "#00CC96"}
    legend_added = set()

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = agg_build_df[agg_build_df["client"] == client]
        if not cdf.empty:
            for q in sorted(cdf["quantile"].unique()):
                qdf = cdf[cdf["quantile"] == q].sort_values("timestamp")
                q_str = str(q)
                label = f"p{int(q * 100)}"
                show_legend = q_str not in legend_added
                legend_added.add(q_str)
                fig.add_trace(
                    go.Scatter(
                        x=qdf["timestamp"], y=qdf["value_ms"],
                        name=label, legendgroup=q_str,
                        showlegend=show_legend,
                        line=dict(color=colors.get(q_str, "#AB63FA")),
                    ),
                    row=row, col=col,
                )
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
        fig.update_yaxes(title_text="ms", row=row, col=col)

    fig.update_layout(
        title="Signature Aggregation Time by Client",
        height=270 * n_rows,
    )
    fig.show()
No signature aggregation timing data available
Show code
# Summary statistics by client
if not agg_build_df.empty:
    summary = agg_build_df.groupby(["client", "quantile"])["value_ms"].agg(["mean", "min", "max"]).round(3)
    summary.columns = ["Mean (ms)", "Min (ms)", "Max (ms)"]
    display(summary)

Aggregation Verification TimeΒΆ

Time to verify an aggregated post-quantum signatures proof.

Show code
# Filter to aggregate verification metric
agg_ver_df = timing_df[timing_df["metric"] == "agg_verification"].copy()

if agg_ver_df.empty:
    print("No aggregated signature verification timing data available")
else:
    agg_ver_df["value_ms"] = agg_ver_df["value"] * 1000

    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    colors = {"0.5": "#636EFA", "0.95": "#EF553B", "0.99": "#00CC96"}
    legend_added = set()

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = agg_ver_df[agg_ver_df["client"] == client]
        if not cdf.empty:
            for q in sorted(cdf["quantile"].unique()):
                qdf = cdf[cdf["quantile"] == q].sort_values("timestamp")
                q_str = str(q)
                label = f"p{int(q * 100)}"
                show_legend = q_str not in legend_added
                legend_added.add(q_str)
                fig.add_trace(
                    go.Scatter(
                        x=qdf["timestamp"], y=qdf["value_ms"],
                        name=label, legendgroup=q_str,
                        showlegend=show_legend,
                        line=dict(color=colors.get(q_str, "#AB63FA")),
                    ),
                    row=row, col=col,
                )
        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
        fig.update_yaxes(title_text="ms", row=row, col=col)

    fig.update_layout(
        title="Aggregation Verification Time by Client",
        height=270 * n_rows,
    )
    fig.show()
Show code
# Summary statistics by client
if not agg_ver_df.empty:
    summary = agg_ver_df.groupby(["client", "quantile"])["value_ms"].agg(["mean", "min", "max"]).round(3)
    summary.columns = ["Mean (ms)", "Min (ms)", "Max (ms)"]
    display(summary)
Mean (ms) Min (ms) Max (ms)
client quantile
ethlambda_0 0.50 50.642 50.579 50.731
0.95 96.221 96.099 96.388
0.99 130.625 118.868 145.857
ethlambda_1 0.50 108.822 88.617 122.759
0.95 359.356 341.667 388.963
... ... ... ... ...
zeam_8 0.95 95.000 95.000 95.000
0.99 99.000 99.000 99.000
zeam_9 0.50 50.000 50.000 50.000
0.95 95.000 95.000 95.000
0.99 99.000 99.000 99.000

153 rows Γ— 3 columns

Signatures Aggregated per SlotΒΆ

Rate of signature aggregations per slot (4-second slot time). Useful for researchers and implementers with a focus on signature aggregation in conjunction with consensus.

Show code
SLOT_TIME = 4  # seconds

agg_total_df = counts_df[counts_df["metric"] == "lean_pq_sig_aggregated_signatures_total"]

if agg_total_df.empty:
    print("No signature aggregation count data available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = agg_total_df[agg_total_df["client"] == client].sort_values("timestamp")
        if not cdf.empty and cdf["value"].max() > 0:
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt * SLOT_TIME).iloc[1:]
            ts = cdf["timestamp"].iloc[1:]
            mask = rate >= 0
            rate = rate[mask]
            ts = ts[mask]
            if not rate.empty:
                fig.add_trace(
                    go.Scatter(
                        x=ts, y=rate,
                        showlegend=False,
                        line=dict(color="#636EFA"),
                    ),
                    row=row, col=col,
                )
                fig.update_yaxes(title_text="/slot", row=row, col=col)
                continue
        fig.add_trace(
            go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
            row=row, col=col,
        )
        _n = (row - 1) * n_cols + col
        _s = "" if _n == 1 else str(_n)
        fig.add_annotation(
            text="No data available",
            xref=f"x{_s} domain", yref=f"y{_s} domain",
            x=0.5, y=0.5,
            showarrow=False,
            font=dict(size=12, color="#999"),
        )

    fig.update_layout(
        title="Signatures Aggregated per Slot by Client",
        height=270 * n_rows,
    )
    fig.show()
Show code
# Summary statistics by client
if not agg_total_df.empty:
    rows = []
    for client in all_clients:
        cdf = agg_total_df[agg_total_df["client"] == client].sort_values("timestamp")
        if cdf.empty or cdf["value"].max() == 0:
            continue
        dt = cdf["timestamp"].diff().dt.total_seconds()
        dv = cdf["value"].diff()
        rate = (dv / dt * SLOT_TIME).iloc[1:]
        rate = rate[rate >= 0]
        if not rate.empty:
            rows.append({"client": client, "Mean (/slot)": rate.mean(), "Min (/slot)": rate.min(), "Max (/slot)": rate.max()})
    if rows:
        display(pd.DataFrame(rows).set_index("client").round(3))
Mean (/slot) Min (/slot) Max (/slot)
client
ethlambda_0 0.152 0.000 1.067
ethlambda_1 0.152 0.000 1.067
ethlambda_10 0.229 0.000 1.067
ethlambda_11 0.229 0.000 1.067
ethlambda_12 0.044 0.000 0.133
ethlambda_13 0.097 0.000 1.067
ethlambda_14 0.305 0.000 1.067
ethlambda_15 0.267 0.000 1.067
ethlambda_2 0.229 0.000 1.067
ethlambda_3 0.229 0.000 1.067
ethlambda_4 0.152 0.000 1.067
ethlambda_5 0.229 0.000 1.067
ethlambda_6 1.743 1.000 2.600
ethlambda_7 0.133 0.000 1.067
ethlambda_8 2.062 1.467 3.000
ethlambda_9 0.229 0.000 1.067
gean_0 0.190 0.000 1.200
nlean_0 0.000 0.000 0.000
zeam_0 0.229 0.000 1.067
zeam_1 0.242 0.000 1.067
zeam_10 0.229 0.000 1.067
zeam_11 0.229 0.000 1.067
zeam_12 0.229 0.000 1.067
zeam_13 0.229 0.000 1.067
zeam_14 0.305 0.000 1.067
zeam_15 0.305 0.000 1.067
zeam_2 0.000 0.000 0.000
zeam_3 0.327 0.000 1.067
zeam_4 0.229 0.000 1.067
zeam_5 0.229 0.000 1.067
zeam_6 0.305 0.000 1.067
zeam_7 0.305 0.000 1.067
zeam_8 0.229 0.000 1.067
zeam_9 0.305 0.000 1.067

Signatures Verified per SlotΒΆ

Rate of valid/invalid aggregated signature verifications per slot (4-second slot time). Useful for researchers and implementers with a focus on signature aggregation in conjunction with consensus.

Show code
SLOT_TIME = 4  # seconds

# Calculate valid/invalid signature counts
valid_df = counts_df[counts_df["metric"] == "lean_pq_sig_aggregated_signatures_valid_total"]
invalid_df = counts_df[counts_df["metric"] == "lean_pq_sig_aggregated_signatures_invalid_total"]

if valid_df.empty and invalid_df.empty:
    print("No signature count data available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    colors = {"valid": "#2ecc71", "invalid": "#e74c3c"}
    legend_added = set()

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        has_data = False

        for status, sdf in [("valid", valid_df), ("invalid", invalid_df)]:
            cdf = sdf[sdf["client"] == client].sort_values("timestamp")
            if cdf.empty or cdf["value"].max() == 0:
                continue
            # Compute rate per slot: diff(value) / diff(seconds) * slot_time
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt * SLOT_TIME).iloc[1:]
            ts = cdf["timestamp"].iloc[1:]
            # Drop negative rates (counter resets)
            mask = rate >= 0
            rate = rate[mask]
            ts = ts[mask]
            if rate.empty:
                continue
            has_data = True
            show_legend = status not in legend_added
            legend_added.add(status)
            fig.add_trace(
                go.Scatter(
                    x=ts, y=rate,
                    name=status, legendgroup=status,
                    showlegend=show_legend,
                    line=dict(color=colors[status]),
                ),
                row=row, col=col,
            )

        if has_data:
            fig.update_yaxes(title_text="/slot", row=row, col=col)

        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
    fig.update_layout(
        title="Signatures Verified per Slot by Client",
        height=270 * n_rows,
    )
    fig.show()
Show code
# Summary statistics by client
if not valid_df.empty or not invalid_df.empty:
    rows = []
    for client in all_clients:
        for status, sdf in [("valid", valid_df), ("invalid", invalid_df)]:
            cdf = sdf[sdf["client"] == client].sort_values("timestamp")
            if cdf.empty or cdf["value"].max() == 0:
                continue
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt * SLOT_TIME).iloc[1:]
            rate = rate[rate >= 0]
            if not rate.empty:
                rows.append({"client": client, "status": status, "Mean (/slot)": rate.mean(), "Min (/slot)": rate.min(), "Max (/slot)": rate.max()})
    if rows:
        display(pd.DataFrame(rows).set_index(["client", "status"]).round(3))
Mean (/slot) Min (/slot) Max (/slot)
client status
ethlambda_0 valid 3.581 2.133 5.333
ethlambda_1 valid 3.657 2.133 6.400
ethlambda_10 valid 3.657 2.133 5.333
ethlambda_11 valid 3.581 2.133 5.333
ethlambda_12 valid 0.933 0.000 2.133
ethlambda_13 valid 3.491 0.000 6.400
ethlambda_14 valid 3.581 1.067 5.333
ethlambda_15 valid 0.356 0.000 1.067
ethlambda_2 valid 3.657 2.133 5.333
ethlambda_3 valid 3.581 2.133 5.333
ethlambda_4 valid 3.581 1.067 5.333
ethlambda_5 valid 3.581 2.133 5.333
ethlambda_6 valid 3.581 2.133 5.333
ethlambda_7 valid 4.089 0.000 8.533
ethlambda_8 valid 3.581 2.133 5.333
ethlambda_9 valid 3.581 2.133 5.333
ream_1 valid 0.000 0.000 0.000
ream_2 valid 0.474 0.000 1.067
ream_3 valid 0.457 0.000 2.133
zeam_0 valid 0.229 0.000 1.067
zeam_1 valid 0.242 0.000 1.067
zeam_10 valid 0.229 0.000 1.067
zeam_11 valid 0.229 0.000 1.067
zeam_12 valid 0.229 0.000 1.067
zeam_13 valid 0.229 0.000 1.067
zeam_14 valid 0.305 0.000 1.067
zeam_15 valid 0.305 0.000 1.067
zeam_3 valid 0.348 0.000 1.067
zeam_4 valid 0.229 0.000 1.067
zeam_5 valid 0.229 0.000 1.067
zeam_6 valid 0.305 0.000 1.067
zeam_7 valid 0.305 0.000 1.067
zeam_8 valid 0.229 0.000 1.067
zeam_9 valid 0.305 0.000 1.067

Signatures Aggregated per SecondΒΆ

Rate of signature aggregations per second. Useful for researchers and implementers with a focus on signature aggregation performance.

Show code
if agg_total_df.empty:
    print("No signature aggregation count data available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        cdf = agg_total_df[agg_total_df["client"] == client].sort_values("timestamp")
        if not cdf.empty and cdf["value"].max() > 0:
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt).iloc[1:]
            ts = cdf["timestamp"].iloc[1:]
            mask = rate >= 0
            rate = rate[mask]
            ts = ts[mask]
            if not rate.empty:
                fig.add_trace(
                    go.Scatter(
                        x=ts, y=rate,
                        showlegend=False,
                        line=dict(color="#636EFA"),
                    ),
                    row=row, col=col,
                )
                fig.update_yaxes(title_text="/s", row=row, col=col)
                continue
        fig.add_trace(
            go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
            row=row, col=col,
        )
        _n = (row - 1) * n_cols + col
        _s = "" if _n == 1 else str(_n)
        fig.add_annotation(
            text="No data available",
            xref=f"x{_s} domain", yref=f"y{_s} domain",
            x=0.5, y=0.5,
            showarrow=False,
            font=dict(size=12, color="#999"),
        )

    fig.update_layout(
        title="Signatures Aggregated per Second by Client",
        height=270 * n_rows,
    )
    fig.show()
Show code
# Summary statistics by client
if not agg_total_df.empty:
    rows = []
    for client in all_clients:
        cdf = agg_total_df[agg_total_df["client"] == client].sort_values("timestamp")
        if cdf.empty or cdf["value"].max() == 0:
            continue
        dt = cdf["timestamp"].diff().dt.total_seconds()
        dv = cdf["value"].diff()
        rate = (dv / dt).iloc[1:]
        rate = rate[rate >= 0]
        if not rate.empty:
            rows.append({"client": client, "Mean (/s)": rate.mean(), "Min (/s)": rate.min(), "Max (/s)": rate.max()})
    if rows:
        display(pd.DataFrame(rows).set_index("client").round(3))
Mean (/s) Min (/s) Max (/s)
client
ethlambda_0 0.038 0.000 0.267
ethlambda_1 0.038 0.000 0.267
ethlambda_10 0.057 0.000 0.267
ethlambda_11 0.057 0.000 0.267
ethlambda_12 0.011 0.000 0.033
ethlambda_13 0.024 0.000 0.267
ethlambda_14 0.076 0.000 0.267
ethlambda_15 0.067 0.000 0.267
ethlambda_2 0.057 0.000 0.267
ethlambda_3 0.057 0.000 0.267
ethlambda_4 0.038 0.000 0.267
ethlambda_5 0.057 0.000 0.267
ethlambda_6 0.436 0.250 0.650
ethlambda_7 0.033 0.000 0.267
ethlambda_8 0.515 0.367 0.750
ethlambda_9 0.057 0.000 0.267
gean_0 0.048 0.000 0.300
nlean_0 0.000 0.000 0.000
zeam_0 0.057 0.000 0.267
zeam_1 0.061 0.000 0.267
zeam_10 0.057 0.000 0.267
zeam_11 0.057 0.000 0.267
zeam_12 0.057 0.000 0.267
zeam_13 0.057 0.000 0.267
zeam_14 0.076 0.000 0.267
zeam_15 0.076 0.000 0.267
zeam_2 0.000 0.000 0.000
zeam_3 0.082 0.000 0.267
zeam_4 0.057 0.000 0.267
zeam_5 0.057 0.000 0.267
zeam_6 0.076 0.000 0.267
zeam_7 0.076 0.000 0.267
zeam_8 0.057 0.000 0.267
zeam_9 0.076 0.000 0.267

Signatures Verified per SecondΒΆ

Rate of valid/invalid aggregated signature verifications per second. Useful for researchers and implementers with a focus on signature aggregation performance.

Show code
if valid_df.empty and invalid_df.empty:
    print("No signature count data available")
else:
    fig = make_subplots(
        rows=n_rows, cols=n_cols,
        subplot_titles=all_clients,
        vertical_spacing=0.12 / max(n_rows - 1, 1) * 2,
        horizontal_spacing=0.08,
    )

    colors = {"valid": "#2ecc71", "invalid": "#e74c3c"}
    legend_added = set()

    for i, client in enumerate(all_clients):
        row = i // n_cols + 1
        col = i % n_cols + 1
        has_data = False

        for status, sdf in [("valid", valid_df), ("invalid", invalid_df)]:
            cdf = sdf[sdf["client"] == client].sort_values("timestamp")
            if cdf.empty or cdf["value"].max() == 0:
                continue
            # Compute rate: diff(value) / diff(timestamp) in per-second
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt).iloc[1:]  # per second, skip first NaN
            ts = cdf["timestamp"].iloc[1:]
            # Drop negative rates (counter resets)
            mask = rate >= 0
            rate = rate[mask]
            ts = ts[mask]
            if rate.empty:
                continue
            has_data = True
            show_legend = status not in legend_added
            legend_added.add(status)
            fig.add_trace(
                go.Scatter(
                    x=ts, y=rate,
                    name=status, legendgroup=status,
                    showlegend=show_legend,
                    line=dict(color=colors[status]),
                ),
                row=row, col=col,
            )

        if has_data:
            fig.update_yaxes(title_text="/s", row=row, col=col)

        else:
            fig.add_trace(
                go.Scatter(x=[None], y=[None], showlegend=False, hoverinfo='skip'),
                row=row, col=col,
            )
            _n = (row - 1) * n_cols + col
            _s = "" if _n == 1 else str(_n)
            fig.add_annotation(
                text="No data available",
                xref=f"x{_s} domain", yref=f"y{_s} domain",
                x=0.5, y=0.5,
                showarrow=False,
                font=dict(size=12, color="#999"),
            )
    fig.update_layout(
        title="Signatures Verified per Second by Client",
        height=270 * n_rows,
    )
    fig.show()
Show code
# Summary statistics by client
if not valid_df.empty or not invalid_df.empty:
    rows = []
    for client in all_clients:
        for status, sdf in [("valid", valid_df), ("invalid", invalid_df)]:
            cdf = sdf[sdf["client"] == client].sort_values("timestamp")
            if cdf.empty or cdf["value"].max() == 0:
                continue
            dt = cdf["timestamp"].diff().dt.total_seconds()
            dv = cdf["value"].diff()
            rate = (dv / dt).iloc[1:]
            rate = rate[rate >= 0]
            if not rate.empty:
                rows.append({"client": client, "status": status, "Mean (/s)": rate.mean(), "Min (/s)": rate.min(), "Max (/s)": rate.max()})
    if rows:
        display(pd.DataFrame(rows).set_index(["client", "status"]).round(3))
Mean (/s) Min (/s) Max (/s)
client status
ethlambda_0 valid 0.895 0.533 1.333
ethlambda_1 valid 0.914 0.533 1.600
ethlambda_10 valid 0.914 0.533 1.333
ethlambda_11 valid 0.895 0.533 1.333
ethlambda_12 valid 0.233 0.000 0.533
ethlambda_13 valid 0.873 0.000 1.600
ethlambda_14 valid 0.895 0.267 1.333
ethlambda_15 valid 0.089 0.000 0.267
ethlambda_2 valid 0.914 0.533 1.333
ethlambda_3 valid 0.895 0.533 1.333
ethlambda_4 valid 0.895 0.267 1.333
ethlambda_5 valid 0.895 0.533 1.333
ethlambda_6 valid 0.895 0.533 1.333
ethlambda_7 valid 1.022 0.000 2.133
ethlambda_8 valid 0.895 0.533 1.333
ethlambda_9 valid 0.895 0.533 1.333
ream_1 valid 0.000 0.000 0.000
ream_2 valid 0.119 0.000 0.267
ream_3 valid 0.114 0.000 0.533
zeam_0 valid 0.057 0.000 0.267
zeam_1 valid 0.061 0.000 0.267
zeam_10 valid 0.057 0.000 0.267
zeam_11 valid 0.057 0.000 0.267
zeam_12 valid 0.057 0.000 0.267
zeam_13 valid 0.057 0.000 0.267
zeam_14 valid 0.076 0.000 0.267
zeam_15 valid 0.076 0.000 0.267
zeam_3 valid 0.087 0.000 0.267
zeam_4 valid 0.057 0.000 0.267
zeam_5 valid 0.057 0.000 0.267
zeam_6 valid 0.076 0.000 0.267
zeam_7 valid 0.076 0.000 0.267
zeam_8 valid 0.057 0.000 0.267
zeam_9 valid 0.076 0.000 0.267

SummaryΒΆ

Key findings from this devnet iteration:

Show code
# Generate summary statistics
print(f"Devnet: {devnet_id}")
print(f"Duration: {devnet_info['duration_hours']:.1f} hours")
print(f"Clients analyzed: {len(timing_df['client'].unique())}")
print()

if not agg_build_df.empty:
    p95_agg = agg_build_df[agg_build_df["quantile"] == 0.95]["value_ms"].mean()
    print(f"Average P95 aggregation time: {p95_agg:.2f} ms")

if not agg_ver_df.empty:
    p95_ver = agg_ver_df[agg_ver_df["quantile"] == 0.95]["value_ms"].mean()
    print(f"Average P95 proof verification time: {p95_ver:.2f} ms")
Devnet: pqdevnet-20260518T0141Z
Duration: 0.2 hours
Clients analyzed: 51

Average P95 proof verification time: 166.12 ms