PQ Devnet 2026-07-15 Latest

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-20260715T0251Z
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-20260715T0251Z
Duration: 1.3 hours
Time: 2026-07-15T02:51:46+00:00 to 2026-07-15T04:08:24+00:00
Slots: 5316 → 6716
Clients: buildx_buildkit_multiarch0, ethlambda_0, ethlambda_10, ethlambda_2, ethlambda_4, ethlambda_7, ethlambda_8, gean_0, gean_1, gean_2, gean_3, grandine_0, grandine_2, grandine_3, grandine_4, grandine_5, grandine_6, lantern_0, lantern_1, lantern_2, lantern_3, ream_0, ream_1, ream_2, ream_3, ream_4, ream_6, zeam_0, zeam_1, zeam_2, zeam_4, zeam_5, zeam_6

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 4608 timing records
Metrics: ['signing', 'verification', 'agg_verification']
Clients: ['ethlambda_10', 'ethlambda_8', 'ethlambda_4', 'ethlambda_0', 'ethlambda_7', 'ethlambda_2', 'gean_1', 'gean_3', 'gean_0', 'gean_2', 'grandine_4', 'grandine_3', 'grandine_6', 'grandine_5', 'grandine_0', 'grandine_2', 'lantern_3', 'lantern_1', 'lantern_2', 'lantern_0', 'ream_1', 'ream_2', 'ream_4', 'ream_6', 'ream_3', 'ream_0', 'zeam_2', 'zeam_0', 'zeam_1', 'zeam_4', 'zeam_5', 'zeam_6']
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 9009 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 (33): ['buildx_buildkit_multiarch0', 'ethlambda_0', 'ethlambda_10', 'ethlambda_2', 'ethlambda_4', 'ethlambda_7', 'ethlambda_8', 'gean_0', 'gean_1', 'gean_2', 'gean_3', 'grandine_0', 'grandine_2', 'grandine_3', 'grandine_4', 'grandine_5', 'grandine_6', 'lantern_0', 'lantern_1', 'lantern_2', 'lantern_3', 'ream_0', 'ream_1', 'ream_2', 'ream_3', 'ream_4', 'ream_6', 'zeam_0', 'zeam_1', 'zeam_2', 'zeam_4', 'zeam_5', 'zeam_6']

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()