Skip to content

pq-devnet-1: expose aggregation timings (committee proof, recursive merge, aggregate arrival) #938

Backlog

Description

@pablodeymo

Branch: pq-devnet-1

What was asked

During the pq-devnet-1 run, ethPandaOps asked the client teams to add aggregate timings to their clients. It is also a line in the devnet's requirements (pq-devnet-1 notes, "Client requirements from pq-devnet-0", Timings): expose aggregation timings (committee proof, recursive merge, aggregate arrival) in a common format that xatu can ingest and Dora can show. The notes say the format is still TBD, proposed over OpenTelemetry. One of the devnet's goals depends on it: aggregation timings measured the same way in every client, as a gossipsub baseline to compare against later.

Where ethlambda is today

pq-devnet-1 at 25302a5a measures these timings but only writes them to the log:

Timing Code Reported today as
Committee proof crates/net/rpc/src/beacon/pq_aggregation.rs Log fields. Proved a PQ aggregate has prove_ms; Finished proving this seat's PQ aggregates has the queue, state, proving and total times and the proved / late / failed / already-proven counts
Recursive merge (a block's proof) crates/blockchain/src/pq_attestation_packing.rs (#914) Log fields. Merged PQ attestation proofs and Packed the next PQ block's attestations ahead of its slot have took_ms
Aggregate arrival p2p gossip validation lean_beacon_gossip_validation_seconds times arrival to verdict. Nothing among the lean_beacon_gossip_* series records where in the slot a PQ attestation or aggregate arrived

None of the three files above, nor crates/common/crypto/src/stark/leanvm.rs, records a Prometheus metric. A devnet dashboard has nothing to plot for ethlambda's proving, and comparing ethlambda with another client means scraping logs.

What the other clients did

Lighthouse (cf6dd546), Prysm (734a7838), Teku (Consensys/teku#11709) and Lodestar (eb8fd660) all write one export, schema 1 of Lighthouse's scripts/pq-measurement, so Lighthouse's plot.py draws every client's runs side by side.

  • --pq-timing-output <dir> writes one directory per run:
    • run.json, the manifest: schema version, client and leanVM revision, prover threads and CPU profile, hardware, the slot's timing constants (attestation due, committee cutoff, aggregator delay, aggregate due), where receipts are stamped, and counts of dropped events.
    • events-NNNNNN.jsonl.zst chunks, rotated at 64 MiB or 5 minutes and kept to 8 GiB. An unfinished chunk ends in .partial.
    • Emitting never blocks: a full queue drops the event and counts it in the manifest.
  • Each line has seq, kind, wall_ns, mono_ns and the fields of its kind:
    • message_received: every PQ single attestation and aggregate, stamped before SSZ decode. Message kind, message id, slot, committee, subnet, bytes, signer count, vote data root.
    • validated: the outcome (accepted, duplicate, deferred, rejected, ignored, dropped) and receipt_to_validation_ns.
    • proof_started, proof_finished, job_outcome: one set per committee proof and per round of a block-proof merge. Queue wait, backend duration, whether it was late, proof bytes, proof id, round, recursive depth.
    • proposal_snapshot: what the proposal had at block production.
  • --pq-measurement is an observer mode: a node with no validators joins every attestation subnet and, every third slot, proves a committee or merges a block proof (or both) from live gossip, without publishing the result.

Lighthouse also exports Prometheus series from the same points: beacon_pq_timing_seconds{stage,kind,origin} and beacon_pq_timing_events_total{stage,kind,origin,outcome}.

Proposed

In this order, each one useful without the next:

  1. Prometheus metrics on the node. Small, and enough for a Grafana panel. Names are a suggestion, following the repo's lean_ prefix:
    • lean_beacon_pq_committee_proof_seconds{position}: leanVM proving time of one committee's aggregate, by aggregator seat.
    • lean_beacon_pq_committee_proof_ready_offset_seconds{position}: how far into the slot the proof was ready, to read against that seat's cutoff and broadcast time.
    • lean_beacon_pq_committee_proofs_total{position,outcome}: proved, late, failed, already_proven, unproved.
    • lean_beacon_pq_merge_seconds{round} and lean_beacon_pq_merge_children: a block-proof merge, ahead of the slot and at production.
    • lean_beacon_pq_aggregate_verify_seconds: leanVM verification of one received aggregate.
    • lean_beacon_pq_gossip_arrival_offset_seconds{kind}: offset into the message's slot at receipt, for attestation and aggregate.
    • lean_beacon_pq_proof_size_bytes{kind}: committee and merged proofs.
    • lean_beacon_pq_committee_signatures: signatures in one committee proof.
  2. --pq-timing-output <dir> on ethlambda beacon, in the shared schema. The values run.json needs already exist (LEANVM_REV, PROTOCOL_VERSION, --pq-prover-threads, the Config timing fields). The events map onto the gossip handler's receipt and verdict, prove_seat / prove_committee, and the packing task's merges.
  3. --pq-measurement observer mode. A follow-up, only if ethPandaOps wants an ethlambda observer on the devnet.

To confirm with ethPandaOps

  • Which of these they need from us first: Prometheus series, the --pq-timing-output export, or the OpenTelemetry format the notes list as TBD.
  • If their dashboards already query other clients' series, which names and labels, so ours match.

Done when

  • The node's /metrics has the committee proof, merge, verification and arrival timings, documented in docs/metrics.md.
  • A run recorded with --pq-timing-output is drawn by Lighthouse's plot.py unchanged, next to a Lighthouse run from the same local devnet.
  • Recording costs nothing on the proving or gossip paths when the flag is off, and never blocks them when it is on.

Activity

  1. added
    enhancement
    beacon
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    beaconenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions