Skip to content

feat: support the consensus-specs pq fork - #939

Open
barnabasbusa wants to merge 87 commits into
masterfrom
pq
Open

barnabasbusa wants to merge 87 commits into
masterfrom
pq

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Indexes and displays networks running the consensus-specs pq feature fork at a4d16c5be, which replaces BLS consensus keys with leanXMSS on top of Gloas, so the PQ devnets have an explorer. Blocks, states and payload envelopes of the fork are decoded through go-eth2-client#70; epochs are persisted without sync committee assignments, validator pages and the validator list show the XMSS public key and VRF root, and the slot page shows the proposer's XMSS signature with its leaf index, the VRF RANDAO reveal and proof, the size of the aggregate attestation proof and the counts of the new preregistration and voluntary exit requests. It also makes /api/v1/slot compute the epoch from the chain's slots per epoch instead of assuming 32. Tested against Lighthouse and consensoor on Kurtosis devnets with the minimal preset.

Replaces the EIP-8450 registry support with the pq feature fork:
PQ_FORK_EPOCH in the fork schedule, pq blocks and states through the
fork-agnostic client types, the epoch transition for pq states
(XMSS-keyed deposits, no sync committees, pq committee limit), and
XMSS key, VRF and attestation proof details on the validator and slot
pages. Block replay is skipped for pq states, which are loaded from
the beacon node instead.

Claude-Session: https://claude.ai/code/session_01M9fA4V2rapVbjWM1bW21wn
…ersions

Epoch finalization failed on pq networks because the empty sync
committee assignment set was inserted, and execution payload envelopes
were stored under the Gloas version, so pq envelopes could not be
decoded again after a restart.

Claude-Session: https://claude.ai/code/session_01M9fA4V2rapVbjWM1bW21wn
@barnabasbusa barnabasbusa added the build-docker-image Automatically build docker image for PR branch label Nov 19, 2026
redpanda-reviewer[bot]

This comment was marked as outdated.

ampagent and others added 3 commits November 24, 2026 08:29
Adds an aggregates series to the propagation timeline from the xatu
attestation events: when each observing node first saw each aggregate
for the slot, with the AGGREGATE_DUE_BPS deadline. Sightings in the
following slot count toward the total, so late aggregates show as a
curve that stops short of 100%.

Amp-Thread-ID: https://ampcode.com/threads/T-01a20c65-2dd0-76d5-aa34-26b1ee6e0f4d
Co-authored-by: Sam Calder-Mason <samcaldermason@gmail.com>
feat: show when aggregates were seen on the slot timeline
pq: bring in master's GHCR + image-mirror CI
redpanda-reviewer[bot]

This comment was marked as outdated.

redpanda-reviewer[bot]

This comment was marked as outdated.

redpanda-reviewer[bot]

This comment was marked as outdated.

barnabasbusa and others added 4 commits November 24, 2026 16:36
… a flag

With indexer.attestationArrivals.enabled, dora records single_attestation
first-seen times per slot and block root in memory and serves them when xatu
is not configured or has no attestation events for the slot, for local and
devnet setups.
redpanda-reviewer[bot]

This comment was marked as outdated.

redpanda-reviewer[bot]

This comment was marked as outdated.

@redpanda-reviewer

This comment has been minimized.

@redpanda-reviewer

This comment has been minimized.

@redpanda-reviewer

redpanda-reviewer Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

CI failed @ d94132c1

The single failed job, Check typos / check-typos, is caused by this PR: the newly added templates/_shared/arrival_chart.html (1008 added lines, 0 removed) contains the identifier ths at lines 186 and 188, which crate-ci/typos flags as a misspelling of the/this and exits 2. Fix is to rename the local variable (its only two uses) or extend the typos word list.

  • Check typos / check-typos — caused by this PR — The crate-ci/typos step ran typos . and reported two errors for the identifier ths ("should be the, this") in templates/_shared/arrival_chart.html, exiting with code 2. The file is entirely added by this PR (git diff origin/master...HEAD --numstat: 1008 added, 0 removed), and the diff's added lines include both var ths = table.querySelectorAll('thead tr:last-child th'); and ths.forEach(function(th, i) {. Grep found no other ths occurrences in the repo, so the failure is introduced by this change, not pre-existing. (templates/_shared/arrival_chart.html:186) — Rename the local variable in applyTableSort: line 186 to var headerCells = table.querySelectorAll('thead tr:last-child th'); and line 188 to headerCells.forEach(function(th, i) { (its only two uses), then re-run the job. Alternatively add ths = "ths" to [default.extend-words] in the existing _typos.toml.

Diagnosed Check typos @ d94132c1
"The road to hell is paved with v2 rewrites."

@redpanda-reviewer

This comment has been minimized.

@redpanda-reviewer

This comment has been minimized.

@redpanda-reviewer

Copy link
Copy Markdown

Summary

The new commit adds per-aggregator staggered due times (AGGREGATE_DUE_BPS_PQ + position*AGGREGATOR_DELAY_BPS) to the aggregate rows, making redundancy and lateness position-aware. The mechanism is sound, but the fork gate is keyed on the spec value being present rather than on the PQ fork being active for the slot. Several earlier findings remain: the state transition still never applies upgrade_to_pq, the pending-validator projector still BLS-gates PQ deposits, and the PQ key registry aliases the state's slice.

Issues

  • 🟡 handlers/slot_waves.go:249 — staggered aggregate timing is gated on the spec field, not on the PQ fork being active — staggeredAggregation returns true whenever AggregatorDelayBps > 0, so on a chain whose chainspec merely configures the PQ fork (a future PQ_FORK_EPOCH) every slot, including the pre-PQ and Gloas-era ones, is timed with AGGREGATE_DUE_BPS_PQ and the stagger instead of AGGREGATE_DUE_BPS_GLOAS/AGGREGATE_DUE_BPS. The other timing helpers in this file gate on the fork for the slot (gloasActive, IsPqEnabled in chainspec.go:507); this one ignores the slot argument entirely, so aggregate due times, redundancy and the late counter are wrong for every epoch before the fork activates.
  • 🟡 indexer/beacon/statetransition/statetransition.go:96 — PQ fork epoch is still reconstructed without upgrade_to_pq — see the thread on that line
  • 🟡 indexer/beacon/statetransition/pending.go:132 — PQ deposits are still BLS-signature-gated in the validator projection — see the thread on that line
  • 🟡 indexer/beacon/pqkeys.go:26 — pqKeyRegistry keeps the state's own slice, which the transition later mutates — see the thread on that line
  • 🟡 indexer/execution/system_contracts/deposit_indexer.go:240 — PQ deposit bypass is gated on the fork being configured, not active — see the thread on that line
  • 🟡 handlers/slot.go:561 — slot page still sizes PQ committees from the pre-PQ cap — The PQ block added here leaves pageData.MaxCommitteesPerSlot (line 552) and the attestation committee filter (line 674) on specs.MaxCommitteesPerSlot, although the PR added MaxCommitteesPerSlotAt/MaxCommitteesPerSlotAtEpoch and uses them in statetransition/committees.go and duties.go. If a PQ network serves a MAX_COMMITTEES_PER_SLOT_PQ above the pre-PQ cap, committees above the old cap are dropped from the slot page; indexer/beacon/epochvotes.go has the same unswitched cap.

Reviewed @ d94132c1
"The road to hell is paved with v2 rewrites."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-docker-image Automatically build docker image for PR branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants