Repository navigation
feat: use full 2^31 leaf vrf trees on pq networks - #1526
Conversation
There was a problem hiding this comment.
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 — Thepq-full-vrfimage is now the default genesis generator for anyone enablingpq_fork_epoch, so all pq genesis states get full-treevrf_roots, whilevrf_state_urlis consumed only bysrc/cl/consensoor/consensoor_launcher.star:151and the package's default CL is lighthouse (lighthouse-pq-bnatsrc/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:pqimage at least matched the padded client. If this is knowingly acceptable while the stack is unmerged, afailinsanity_check.starfor pq+padded-tree clients (or a README caveat next topq_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" |
There was a problem hiding this comment.
🟡 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.
CI failed @
|
Moves pq networks from VRF trees padded with zeros above 2^20 to the full tree of
compute_vrf_rootin 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 newvrf_state_urlnetwork parameter, defaulting to the shipped file when the default mnemonic is used, is passed to consensoor as--vrf-state-urlso it loads its validators' states by range instead of hashing each tree, and the default genesis generator image becomesethpandaops/ethereum-genesis-generator:pq-full-vrffrom ethereum-genesis-generator#342. Stacked on #1523 and kept apart frompqbecause Lighthouse'spqimage still uses the padded tree and would fail RANDAO verification against these roots; tested with two consensoor nodes finalizing on full trees.