Skip to content

feat: use full 2^31 leaf vrf trees on pq networks - #1526

Merged
barnabasbusa merged 3 commits into
pqfrom
pq-full-vrf
Nov 19, 2026
Merged

barnabasbusa merged 3 commits into
pqfrom
pq-full-vrf

Conversation

@barnabasbusa

@barnabasbusa barnabasbusa commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Moves pq networks from VRF trees padded with zeros above 2^20 to the full tree of compute_vrf_root in consensus-specs 2f43bc0, where a root covers 2^31 Keccak-256 leaves, about 4.3 billion hashes per validator, which neither the genesis generator nor a client can compute at startup. The package now ships, for the first 10000 keys of the default mnemonic, the public keys and full-tree VRF roots (b9dec4e1daa17dfe.bin, 64 bytes per key) and the precomputed VRF tree states (b9dec4e1daa17dfe.vrf, 1028 bytes per key: the root, then the compact state at slot 0), generated on a GPU and each checked against its seed. A new vrf_state_url network parameter, defaulting to the shipped file when the default mnemonic is used, is passed to consensoor as --vrf-state-url so it loads its validators' states by range instead of hashing each tree, and the default genesis generator image becomes ethpandaops/ethereum-genesis-generator:pq-full-vrf from ethereum-genesis-generator#342. Stacked on #1523 and kept apart from pq because Lighthouse's pq image still uses the padded tree and would fail RANDAO verification against these roots; tested with two consensoor nodes finalizing on full trees.

@redpanda-reviewer redpanda-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The PR switches pq networks to full 2^31-leaf VRF trees: new 10000-key .bin/.vrf tables, a vrf_state_url network param wired to consensoor's --vrf-state-url, and a pq-full-vrf default genesis generator image. The shipped tables check out byte-for-byte against the upstream fingerprint scheme and consensoor's record format, but the new default URLs point at commits that only exist on this unmerged branch, and nothing guards the case where the full-tree genesis meets a CL that cannot consume the precomputed states.

Issues

  • 🟡 src/package_io/constants.star:111 — default URLs pinned to a commit that only exists on this unmerged branch — see the thread on that line
  • 🟡 src/package_io/constants.star:120 — full-tree roots become the default for every pq network, but only consensoor can load their states — The pq-full-vrf image is now the default genesis generator for anyone enabling pq_fork_epoch, so all pq genesis states get full-tree vrf_roots, while vrf_state_url is consumed only by src/cl/consensoor/consensoor_launcher.star:151 and the package's default CL is lighthouse (lighthouse-pq-bn at src/cl/lighthouse/lighthouse_launcher.star:254, which the PR description says still builds the padded tree). A pq network started with a lighthouse participant therefore gets roots no client-side tree can match, with only a PR-description note and no sanity check or README warning; the previous :pq image at least matched the padded client. If this is knowingly acceptable while the stack is unmerged, a fail in sanity_check.star for pq+padded-tree clients (or a README caveat next to pq_fork_epoch) would keep the next reader from hitting it silently.

Reviewed @ cc17f41a
"If you don't have time to do it right, when will you have time to do it over?" — John Wooden

DEFAULT_DORA_PQ_IMAGE = "ethpandaops/dora:pq"
DEFAULT_XMSS_PUBKEY_URL = "https://raw.githubusercontent.com/ethpandaops/ethereum-package/b49c2c80c1eb84cccd82bcf7299e1c0441170c43/static_files/xmss-keys"
DEFAULT_XMSS_PUBKEY_URL = "https://raw.githubusercontent.com/ethpandaops/ethereum-package/d4c9a8ace9dd80ca4f9938885345f8f40a646fd0/static_files/xmss-keys"
DEFAULT_VRF_STATE_URL = "https://raw.githubusercontent.com/ethpandaops/ethereum-package/d4c9a8ace9dd80ca4f9938885345f8f40a646fd0/static_files/xmss-keys/b9dec4e1daa17dfe.vrf"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 default URLs pinned to a commit that only exists on this unmerged branch

Both DEFAULT_XMSS_PUBKEY_URL (110) and DEFAULT_VRF_STATE_URL (111) point at d4c9a8ace9dd..., which is this branch's own commit (git log: d4c9a8a feat: ship 10000 leanxmss keys with vrf roots and states over all 2^31 leaves), not a commit on the base pq/main (git branch -r --contains d4c9a8a lists only origin/pq-full-vrf). If the stack is squash-merged or this branch is rebased/force-pushed before merge, the commit becomes unreachable and both raw.githubusercontent URLs 404. The failure is quiet: eth-beacon-genesis logs "failed to fetch xmss keys, deriving them instead" and then derives a full 2^31-leaf root per key, which the README itself sizes at about an hour of CPU per key, so genesis generation stalls instead of erroring. Pinning to a commit that is on the base branch (as 35ec821 did for the previous key file) or to a release tag avoids this.

@redpanda-reviewer

Copy link
Copy Markdown

CI failed @ cc17f41a

Both failed jobs are the same root cause: the PR changes the default genesis-generator image to a tag that does not exist in the registry, so kurtosis run fails during environment validation before any enclave services start.

  • CI / runwithargs ./.github/tests/mev-mock.yaml — caused by this PR — kurtosis run failed while validating the final environment: Docker could not resolve docker.io/ethpandaops/ethereum-genesis-generator:pq-full-vrf (not found), logged at ../ci-logs/135781287066.log:311-324. That tag is the new default introduced by this PR; .github/tests/mev-mock.yaml sets no ethereum_genesis_generator_params override, so it inherits the changed default. The same job passed on the base commit 35ec821 (CI run 44560207119), so it is not pre-existing. (src/package_io/constants.star:119) — Make the ethpandaops/ethereum-genesis-generator:pq-full-vrf tag available (repair/rerun the upstream generator image build) and re-run the job, or point DEFAULT_ETHEREUM_GENESIS_GENERATOR_IMAGE at a published tag — now that generator PR docs: update readme with custom labels #342 is merged into its pq branch, the rebuilt ethpandaops/ethereum-genesis-generator:pq is the existing alternative.
  • CI / assertoor — caused by this PR — Same root cause: ../ci-logs/135781287189.log:221-234 shows kurtosis run failing to pull ethpandaops/ethereum-genesis-generator:pq-full-vrf: not found. The assertoor job runs .github/tests/mix-assert.yaml via .github/workflows/per-pr.yml:117, and that file sets no genesis-generator image override, so it also picks up the changed default. No assertoor assertion ran. (src/package_io/constants.star:119) — Same fix: publish the pq-full-vrf image, or use the rebuilt :pq image, then re-run the assertoor job.

Diagnosed CI @ cc17f41a
"If you don't have time to do it right, when will you have time to do it over?" — John Wooden

@barnabasbusa
barnabasbusa merged commit cc17f41 into pq Nov 19, 2026
5 of 13 checks passed
@barnabasbusa
barnabasbusa deleted the pq-full-vrf branch November 19, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant