Repository navigation
feat(pq): pq-devnet-1 — leanVM bindings v0.19.0 in process, consensus-specs pq at 4c296784 - #896
Draft
pablodeymo wants to merge 54 commits into
Draft
pablodeymo wants to merge 54 commits into
pablodeymo wants to merge 54 commits into
Conversation
…e deadline The duty loop slept until ATTESTATION_DUE_BPS(_GLOAS) every slot, so every vote went out after the deadline, behind every client that votes on the block. Follow the first beacon node's head events and cut the wait short once a head at the slot is reported, as the honest-validator guide asks. The deadline stays the fallback.
…e executor post_pq_attestations ran one leanXMSS verification after another on the async handler, so the last vote of a validator client's batch waited for every other one's and the worker thread was held throughout. Run it on spawn_blocking, check the batch with rayon, and publish in submission order.
…ys at the deadline" This reverts commit 24a9e5a.
…its payload does
The validator client signed attestations, sync committee messages and PTC
votes at their clock offsets only. The specification asks for whichever
comes first: the slot's block (its payload and blob data, for the PTC
vote) or the offset. Every other validator client the issue surveys
attests on the block by default.
beacon_node/events.rs reads GET /eth/v1/events with Response::chunk and a
small SSE parser (reqwest's stream feature would change Cargo.lock), on a
client of its own with a connect timeout and a 60 s idle timeout.
head_monitor.rs reads every configured node's stream, one connection per
topic (head, plus execution_payload_available when gloas is scheduled),
reconnecting with backoff, and wakes each duty on the earlier of its event
and its clock offset. The early attempt signs only when the node's answer
names the event's block (and, for the PTC vote, says payload_present and
blob_data_available); otherwise nothing is recorded, and the duty asks
again on the next report about the slot it has not tried (the answering
node's own, typically) or runs at its deadline, so each duty is still
signed at most once a slot. The services gained a fetch half and a sign
half for that check. A stream that idles out (quiet by design before
gloas, on a node with no keep-alives) reopens with debug logging only.
The duty loop's sleep to the first duty now ends on the block too, and
the PTC vote runs beside attest+aggregate rather than after the
aggregation. --disable-event-stream turns it all off.
ethlambda_validator_duty_triggers_total{duty,trigger} counts what started
each duty.
Closes #829.
…treams that end at once The open-stream gauge was incremented when a stream opened and decremented after it ended, so a reader aborted mid-stream (HeadMonitor's drop) left its stream counted. It is now a guard dropped with the reader's future. A node that keeps handing out streams that break or close before delivering any event logged a warning and an info line on every reconnect, forever. The first such end still warns; later ones, and the reopens between them, log at debug until a stream delivers an event or goes quiet, as repeated refused subscriptions already did. Docs: CLAUDE.md's gloas validator-client sentence and the comment above the proposer preparations still described the offsets as start times.
…pre-duty wait on a payload too An early attempt's request (attestation data, head root, payload attestation data) was awaited past the deadline: one still out then, and answering a mismatch, started the deadline attempt late. Each is now bounded by the deadline and dropped there, counted as a mismatch, so from the deadline on a duty runs exactly as it would with no event. The duty loop's wait before the slot's duties watched head reports only, so with a node's head stream down and its payload stream up the committee vote waited for the first duty's offset. `report_within` (was `head_within`) ends on either topic's report for the slot. A refused subscription's body excerpt bounded each piece's read rather than the whole read, so a body trickled a byte at a time could hold the reconnect for many minutes. One timeout now covers the whole read. Docs: the PTC deadline's doc in slot_clock.rs, the sync committee module doc, and spec_deviations.md, whose "signs a sync committee message at the deadline only" entry is no longer a deviation and is removed.
…ecar pq-devnet-1 runs one leanVM release for signer, prover and verifier: bindings v0.17.0 (1e997c99), which removed leanvm-sidecar and its client API in favour of lean_vm's in-process setup/aggregate/from_bytes. A proof from another revision does not verify. - claims and lean_xmss move to 1e997c99 (no wire change); leanvm_sidecar becomes lean_vm with the experimental prover, the one the pq-devnet-0 sidecar ran. cpu_tiers stays off: it needs leanVM's tier-rustc wrapper, and the node's own CPU baseline already gives the prover its clmul. - stark::sidecar becomes stark::leanvm: same Lighthouse claim mapping, merges folded MAX_RECURSIONS at a time, verification in process. With nothing to be unreachable, try_verify_aggregates, SidecarUnreachable and the prover_unreachable IGNORE go. - The node installs the backend itself once --network says PQ is scheduled; --pq-prover-socket becomes --pq-prover-threads. - The image no longer builds a sidecar. ethlambda-pq stays as a shim that execs ethlambda (LEANVM_THREADS -> --pq-prover-threads), so pq-devnet-0 launchers keep working; the publish workflow's leanvm_rev input goes.
… has them Reverts e033029 (the move back to pq-devnet-0's unstaggered aggregators): pq-devnet-1 runs consensus-specs pq at or after 4595f0fc, which staggers a committee's aggregators by their seat in its aggregation committee (AGGREGATION_CUTOFF_BPS, AGGREGATE_DUE_BPS_PQ, AGGREGATOR_DELAY_BPS) and has one skip an aggregate a received one already covers. Merged with what landed since the revert: - The node's prover proves per seat, with the per-pass cost line of cd849e3 (now per seat) and b28ae83's genesis rule: the first slot to seal is the wall clock's until its last seat's cutoff, so a node started before genesis still proves slot 0. - The validator client's seats sign in parallel off the duty task, as 908e88d has them. - Tests on the runtime preset accessors; aggregator_position in the test duty helpers #880 brought. Config's layout is 8's again; DB_VERSION goes to 10 rather than back to 8, so a pq-devnet-0 (version 9) directory is refused rather than misread.
…q b5d422b2 has them Reverts beb567c (the move back to pq-devnet-0's revealed leaves): from b5d422b2 a VRF leaf is keccak256("VRF_LEAF" || secret || le64(slot)) over the slot's secret keccak256("VRF_SECRET" || seed || le64(slot)), and the proof reveals the secret, not the leaf. leanVM bindings v0.17.0's lean_vrf, pq-devnet-1's release, follows the same rule. A VRF tree a pq-devnet-0 validator client stored is refused at load (WrongSeed: both stored formats are re-derived from the seed) and hashed again under the new rule, so an upgraded directory never proves with one. tooling/pq-devnet stays deleted (5c2fab2: ethereum-package's pq branch runs ethlambda); CLAUDE.md keeps the current text until the docs pass.
…nsus-specs pq af898d07 has it A temporary, testing-only config key that replaces MAX_COMMITTEES_PER_SLOT_PQ in PQ's get_committee_count_per_slot, so a small devnet can put its validators into fewer, larger committees. Mainnet 16 and minimal 4, each equal to its preset's MAX_COMMITTEES_PER_SLOT_PQ, which it may not exceed. The state transition counts committees from a state alone, so the cap is selected once per process from the network's config.yaml, beside the preset (network::select_committee_cap, after select_preset), and read through config::x_max_committee_count_per_slot(). Unset, as in the spec tests, it is the preset's value, which the specification's configs equal. A value outside 1..=MAX_COMMITTEES_PER_SLOT_PQ is moved into range with a warning. A resume refuses a changed cap, since it reshuffles every PQ committee. The field rides on DB_VERSION 10 (still unreleased).
…specs pq 4c296784 has them compute_legacy_xmss_pubkey and compute_legacy_vrf_root hash the BLS key and domain byte with keccak256, the VRF tree's hash, rather than sha256; the RANDAO mix and aggregation committee seeds stay on sha256. The fork upgrade gives these to every validator and builder that registered no PQ key, and a deposit for a new one looks its key up by them. ethlambda_crypto::keccak256 wraps sha3's Keccak256; a test checks it against the VRF tree's single-block permutation and the empty-input digest, and another that the legacy keys are no longer the sha256 ones.
…ings v0.17.0 The spec pin moves from b5d422b2 to 4c296784 in every module doc, the preset test and the docs (no preset changed in between; 9bd63ad0 and 32919f0f only wrap and reformat the xmss/stark calls). docs/beacon_pq.md describes in-process proving and what became of the sidecar and its supervisor, the committee cap, the keccak256 legacy keys, and running pq-devnet-1; cli.md swaps --pq-prover-socket for --pq-prover-threads; metrics.md loses prover_unreachable; CLAUDE.md follows, DB_VERSION 10 included.
# Conflicts: # crates/validator/src/head_monitor.rs
MegaRedHand
marked this pull request as draft
November 25, 2026 19:31
leanVM now runs in the node's own process, on the threads that import blocks and judge gossip, where pq-devnet-0's sidecar could crash on an input and be restarted. Every call into it goes through guarded(), which turns a panic into a proof that does not verify, or one that was not made, instead of an unwind through the chain actor. LeanVmBackend::setup now ends with a self-check: one throwaway signature proved and verified, and checked not to verify against another claim. A prover that cannot run on the machine is reported at startup, not at the first aggregation duty. measure() proves the same input several rounds over, for pq-prover-check. More prover threads than cores are lowered to the cores with a warning rather than oversubscribed. Tests: garbage and truncated bytes in a proof's place verify against nothing; a signature at another leaf than its statement's is refused; the leanVM pin is the same in the constant, the manifest and leanvm-revision. The end-to-end prover test stays ignored for a plain cargo test (minutes unoptimized) and make test-consensus, so CI, runs it by name.
…s host A seat has the window from its cutoff to its broadcast to prove in, 2.4 s of a 12-second slot, and leanVM makes one proof at a time. Whether a host keeps up depends on its cores and on which CPU instructions the build uses, which nothing showed before a devnet's first aggregation duty. The command starts the prover as the node does, proves and verifies an aggregate of --signatures claims --rounds times, and reports each round against that window. No network, no data directory.
…e above it is refused Two things the first version of the cap got wrong: - An absent key parsed as mainnet's 16, like every key, and was then lowered to the preset's value with a warning. A minimal network whose config.yaml predates the key (every pq-devnet-0 one) warned at each start about a value its file never set. An absent key now takes the preset's MAX_COMMITTEES_PER_SLOT_PQ, which the specification's configs equal, and the config says so afterwards, so the data directory and /eth/v1/config/spec hold what the node runs on. - A value above the preset's was lowered with a warning. The specification says it must not exceed it, and a node that quietly ran another cap than the file's would shuffle other committees than peers that refused or ran it. It is now a startup error naming both values. Also restores the doc comment of Config's Default impl, which the cap's statics had been inserted under.
A committee's seats are staggered 0.6 s apart and one node can hold several. Unless a vote arrived between two cutoffs, the later seat collected exactly what the earlier one proved, and proving it again took the prover, which makes one proof at a time, as long again for an aggregate insert_proven would not keep and should_broadcast_aggregate rules out once the earlier seat has broadcast. The held aggregate still answers the later seat's request. PqSignaturePool::is_proven says so, and the seat's cost line counts already_proven.
The node holds an aggregate request for up to three seconds while the proof asked for is still being made. Seats were served one after another, so a held request for the seat due at 7.2 s kept the seats due at 7.8, 8.4 and 9.0 s from even asking until 10.2 s. Each seat now waits for its own time and runs on its own. The mock can hold pq_aggregate requests and records when each arrived.
Without them leanVM's prover runs on the build's portable baseline (x86-64-v3 with PCLMULQDQ), and on a host with AVX-512, GFNI or VPCLMULQDQ says so on stderr at the first proof: slower than the CPU allows, and slower than the other clients' leanVM builds, which pick a tier at run time. The leanvm-cpu-tiers feature compiles the prover once more per tier. A tier only gets its instructions under leanVM's scripts/tier-rustc as RUSTC_WRAPPER, which the Dockerfile fetches at the pinned revision and sets before cargo chef cook; every other crate is compiled as before. Off by default, so an ordinary build does not compile the copies; the image builds with it. Cargo.lock gains the tier crates.
…ules; seats Also corrects the memory note: the node's jemalloc returns a proof's buffers like any freed memory. It is leanVM's own builds that keep them (dirty_decay_ms:-1), which MALLOC_CONF can ask of the node too.
MegaRedHand
added a commit
that referenced
this pull request
Nov 26, 2026
#896 adds the same helper at the same place; identical lines merge cleanly when pq-devnet-0 is merged into pq-devnet-1.
Two commits since the last merge: - ba522d4 starts the gloas and PQ payload build a third of a slot ahead. Taken as is. - a3732f4 gave the sidecar client a pool of verifying connections, so gossip validation and block production's check of a merged proof stopped waiting for each other. There is no sidecar here: leanVM verifies in process, on the calling thread, under no lock, which is that change's whole effect already. Its file stays deleted. pq_proposal.rs: two comments still spoke of the proving sidecar.
…1 launches on pq-devnet-1 moved from v0.17.0 to v0.19.0 for every client, and takes no other revision. Between the two: - v0.18.0: setup picks the experimental prover's CPU tier (so a build that leaves some of the CPU unused says so at startup, not at the first proof), and faster leanXMSS key generation and signing. - v0.19.0: lean_xmss::MAX_CACHED_BOTTOM_TREES is renamed DEFAULT_BOTTOM_TREE_CACHE_SIZE and is 8, not 4 (only a comment named it here); signing hashes chain steps in batches; PROTOCOL_VERSION, bumped on every STARK-breaking change, which the prover's startup line and pq-prover-check now report (1). No wire or file format changes: the proved program, the verifier's tag, the claim encoding and the key cache layout are the same, and a cache file with two bottom trees (xmss_cache_url's 14696-byte records) still loads. scripts/tier-rustc is unchanged. Also corrects the manifest comment that still said cpu_tiers was not enabled.
pq-devnet-1 asks clients to sign in parallel on every core and publish each attestation as it is signed, not once the whole batch is done: pq-devnet-0's attestations went out five to ten seconds into the slot that way and missed the aggregation cutoff. ethlambda already signed a duty's keys in parallel, and then published the batch in one request. Normally that is a few signatures' time, but a key that has to build a bottom tree at signing time takes seconds, and every other key's vote waited for it. pq::sign_each hands each signature over the moment it exists (one leaf record flush for the batch, as before). AttestationService publishes it with whatever else was signed by then, each request on its own, so none waits for a slower key or for an earlier request's answer. Failing every request is the error the single request used to be; failing some is logged and the rest count as published. Other forks, and PQ's PTC votes and aggregates, publish as before.
Brings pq-devnet-0's improvements of 2026-11-26 to pq-devnet-1: - #906: publish each attestation as soon as it is signed; - #907: sign the payload committee's votes after the slot's attestations; - #908: fetch the next epoch's payload committee after the slot's duties; - #909: sign a proposal's envelope alongside its block; - #899: park votes for a block still importing, and check them again once it lands; - #914: merge a block's attestation proofs ahead of its slot. Resolution: - #906 and 065f80e are two implementations of the same change. pq-devnet-1's is kept (pq::sign_each returning a receiver, concurrent submissions in publish_pq_as_signed). #906's callback sign_each, sign_streamed and their tests are dropped, and its per-vote delay metric (ethlambda_validator_attestation_vote_delay_seconds) is recorded on each accepted submission of pq-devnet-1's loop. - #914's packing code moves unchanged into the blockchain crate. It merges through PqPacked::merge, which on this branch proves in process. Its docs say leanVM instead of the sidecar, and why a packing a third of a slot ahead comes after the node's own aggregator seats' proofs. - docs/beacon_pq.md: the Proposing paragraph describes packing ahead with leanVM in process; the known gaps drop the merge-ahead item and keep pq-devnet-1's interop one.
3 tasks done
…Q self-build target) (#953) ## Problem pq-devnet-1's `config.yaml` schedules a gas limit of 200M from epoch 0 through `GAS_LIMIT_SCHEDULE` ([EIP-8261](https://eips.ethereum.org/EIPS/eip-8261)). Devops reported that ethlambda votes the gas limit down. The chain shows something more specific: **ethlambda never moves it.** Over slots 20213–23212, each canonical block's gas limit compared with its parent's (Dora's slots API): | Client | Raises | Lowers | Keeps | |---|---|---|---| | lighthouse | 444 | 0 | 0 | | teku | 437 | 0 | 0 | | lodestar | 405 | 0 | 0 | | grandine | 281 | 0 | 0 | | **ethlambda** | 0 | 0 | **272** | | prysm | 0 | 0 | 472 | | nimbus | 0 | 273 | 0 | | silver | 0 | 267 | 0 | | unlabelled proposer | 0 | 102 | 0 | Two things in this branch cause it: 1. **The validator client never reads the schedule.** Its default target gas limit is a fixed 60M, and the ansible deployment doesn't pass `--gas-limit`. It signs 60M into every PQ proposer preference. 2. **The beacon node's PQ self-build ignores the preferences anyway.** `prepare_pq_proposal` builds every PQ payload toward `parent_bid.gas_limit`, so whatever a preference says, ethlambda's own blocks keep the parent's limit. Gloas's self-build does read the preferences (`prepare_gloas_proposal_on`); the PQ one never did. ## What this does ### 1. `GAS_LIMIT_SCHEDULE` (port of #873) **Beacon node:** - Parses `GAS_LIMIT_SCHEDULE` into `Config` and serves it on `/eth/v1/config/spec`. - Stores it in a `Metadata` row of its own, so the `config` row's encoding and `DB_VERSION` (10) don't change. - A directory written before this change resumes and gains the row. **Validator client:** - `--gas-limit` no longer has a default. - Each validator's gas limit resolves in this order: its own override, then `--gas-limit`, then the schedule's value for the duty's epoch, then 60M. - The epoch is the proposal's for preferences, BLS and PQ alike. `publish_pq_epoch` is a call site #873 never saw. **Differences from #873:** - **No chain check:** this branch doesn't have it (#854). The schedule is followed by a small module of its own instead; see part 3. - **Test helper:** `gas_limit_schedule_text` moved from `chain_check` to `proposer_settings`. - **`dto` tests:** they use a local `spec_with` in place of main's `complete_spec`, since this branch's spec parser accepts absent keys. - **Docs:** comments that said `DB_VERSION` 7 now say 10. ### 2. PQ payloads follow the proposer's preferences (new) - **The rule:** `prepare_pq_proposal` takes the PQ builder market. When it holds the proposer's own signed preferences for the slot, under the slot's dependent root, it builds toward their `target_gas_limit`, as gloas's self-build does. Otherwise it keeps the parent's limit, as before. - **Callers:** both pass the node's one PQ market: the `pq_blocks` endpoint, and the chain actor's payload preparation ahead of the slot (`PayloadPreparation::pq_builder_market`, wired in `main.rs`). - **Prepared builds:** the actor's `AttributesKey` now includes the PQ preferences, so a build prepared before they arrived is redone. Production and preparation still ask for the same attributes. - **Fee recipient:** unchanged, still `prepare_beacon_proposer`'s. ### 3. The schedule is read off every beacon node, every epoch (review fix) Before this change, the schedule came from whichever node answered the startup `/eth/v1/config/spec`. If that node served no `GAS_LIMIT_SCHEDULE`, or one `check_rules` refuses, every preference targeted 60M until a restart, even with another node serving the right schedule. Nothing was logged. `crates/validator/src/gas_limit_schedule.rs` now: - **Asks every node:** all `--beacon-nodes` at once, taking the first non-empty schedule in that order. - **Repeats every epoch:** it reads at startup and again each epoch on its own task, aborted when the client stops. A node that comes up, or starts serving the key, later is followed without a restart. - **Keeps a held schedule** while no node serves one. A node restarted on an old build is likelier than the network dropping its schedule. - **Warns** when no node serves a schedule while gloas is scheduled and `--gas-limit` is unset, once per run of empty reads. ### Not done EIP-8261 says a client SHOULD warn when an operator's gas limit is above the scheduled value. #873 doesn't, and neither does this. ## Checked - **Real config:** the beacon node from this branch, started on `ethpandaops/pq-devnets`' `network-configs/devnet-1/metadata`, serves `"GAS_LIMIT_SCHEDULE": [{"EPOCH": "0", "GAS_LIMIT": "200000000"}]`, no longer among its ignored keys. - **New tests:** - `a_pq_preference_carries_the_scheduled_gas_limit` (validator). - `a_pq_proposal_takes_the_gas_target_of_its_proposers_own_preferences` (blockchain): the proposer's own preference is used; none held, another validator's, or another dependent root fall back to the parent's limit. - **Reviewer's scenario, real binaries:** a beacon node on pq-devnet-1's config, behind a proxy that strips `GAS_LIMIT_SCHEDULE`, is listed first, then the node itself. The previous build started with `gas_limit_schedule=[]`, silently. This one logs `Took the gas limit schedule a beacon node serves … node=1 schedule=[0: 200000000]`. With only the stripped node it warns `No beacon node serves a usable GAS_LIMIT_SCHEDULE while gloas is scheduled …`. - **`gas_limit_schedule` unit tests:** - the first serving node wins over an empty or down one; - order decides between two serving nodes; - a schedule is followed when it appears, kept when it disappears, and replaced by another; - no answer changes nothing; - the warning is given once per run, and only when it matters. - **Suites:** `cargo test` for `ethlambda-validator`, `ethlambda-types`, `ethlambda-storage` (with `rocksdb`), `ethlambda-rpc`, `ethlambda-blockchain --lib` and the `ethlambda` binary all pass. That includes #873's tests. `make fmt` and `make lint` are clean. - **Not yet run on a devnet.** The expected result is that ethlambda's blocks join the "raises" column, at the usual ~1/1024 per block, toward 200M.
…) to pq-devnet-1 pq-devnet-1 exported no PQ measurement events: the telemetry only lived on pq-devnet-2, where it arrived in the same commit as the ERC-8517 keys and the X_COMMITTEE_COUNTS rotation (470cdfb), then moved to wire 0.4 (fcbf6a8) and 0.5 (142f7fc). pq-devnet-1 is live without those protocol changes, so this carries the telemetry alone: - ethlambda-telemetry's pq_events module and its lifecycle test, byte for byte pq-devnet-2's: OTLP Logs over grpc and http/protobuf configured through OTEL_*, the pq.* events of ethDreamer/pq-measurement-spec at wire 0.5, and the pq_measurement_* exporter-health counters. - --telemetry-events=pq on `beacon` and `validator`, and every hook site the pq-devnet-2 branch has: gossip receipt, admission, validation and pool result in p2p, publication results in the swarm adapter, committee and proposal duties and proving operations in rpc, merge calls in block packing, backend calls in ethlambda-crypto, proof verification timing in the PQ gossip rules, and the validator client's duty schedule, publication and abandonment. - The validator client now reads CONFIG_NAME from the node's spec, so its pq.context names the network rather than the default. Nothing of ERC-8517 or X_COMMITTEE_COUNTS is included; the telemetry crate is identical to pq-devnet-2's, and the lifecycle test's records pass the spec's schemas, tools/metadata.py and tools/otlp.py at efdd060.
…map, as pq-devnet-2's does
…acon node The other consensus clients on the PQ devnets export both families of the measurement spec; ethlambda refused cl. --telemetry-events now takes pq, cl or pq,cl on beacon (validator keeps pq only: it publishes over HTTP and has no gossip stack), with cl running wherever gloas or PQ is scheduled. The cl family shares the pq family's recorder, process UUID, event_seq and exporter under its own eth.cl.context: - object_received: a block or envelope gossip delivery, before decompression, with the reference first-observation window (64 slots, 4096 keys). - object_processed: one summary per delivery, decode and validation timed from the handler to the verdict verdict::report sends to gossipsub, closed as expired after two slots and as interrupted at shutdown. - object_publication: this node's Beacon API blocks and envelopes, from the p2p actor's handoff to gossipsub's publish result. - object_stage: block and envelope import at the commit, the envelope's data availability decision and its raw engine_newPayload answer. A Copy token carried in BlockArrival, ImportTimings and HeldEnvelope names the gossip attempt a stage belongs to, never matched by root. The exporter now announces one context per family and gates each family's records on its own context; a valid partial_success rejecting a context is settled instead of re-sent, as the spec requires. Health counters cover the five eth.cl.* events. The new lifecycle test's records pass the spec's tools/cl.py and tools/readiness.py checks at d1dad19, normalized and on the wire.
…case none is the standard spelling of no compression and was refused at startup. Header names are case-insensitive and gRPC sends them lowercased, so an Authorization=... header is lowercased instead of refused; two names differing only in case are still a configuration error.
Every increment looked its labelled child up through with_label_values, which takes the vector's read lock on the hook's path. The children of the fixed event and drop-reason set are resolved once, when collection starts, and incremented directly.
A retryable failure (no connection, a timeout, gRPC CANCELLED, DEADLINE_EXCEEDED, RESOURCE_EXHAUSTED or UNAVAILABLE, HTTP 429/502/503/504) dropped its records at once and every group after it. It is now retried twice with doubling backoff, each failed call counted, before the records are dropped. Recorder::shutdown bounded only its caller's wait: the exporter kept draining after it, and what it never sent was not counted. The drain now runs against the shutdown deadline and counts every record it cuts off as a shutdown drop. The gRPC response is read through a size limit instead of being collected whole before the check. Tests drive the exporter against a scripted collector: a context rejected by a partial response is not re-sent and its family still exports, a cl-only recorder announces no pq.context, a failure re-announces only its own family's context, a retryable failure is delivered on retry, and the shutdown deadline's cut-off is counted.
…sage pq.context declared decompression and deduplication after the receipt stamp, while the stamp was taken in triage, after both. The receipt is now stamped where the handler first sees the message, before decompression (as the cl family's is), so decompression is after it, and declared as such; rust-libp2p gossipsub drops duplicate IDs before delivering, so deduplication is declared before. A message whose tracking was evicted from the bounded map got a second first receipt when delivered again. Evicted IDs are remembered in a set of the same bound, and a later delivery of one is an attempt without a receipt (receipt_attempt not_exposed); losing that memory is counted.
Every aggregate the pool did not keep was reported as already_available (already_covered), including one below the retention window and one whose attesters the held aggregate does not include. The pool now says which (PqPoolInsert): below retention is not_inserted/deadline, a held superset is already_available, anything else not_inserted/other. The usable point is stamped before the proof correlation, at the insertion it times.
- The proof correlation keys hashed every 180 KiB proof whole; they now hash its length and first and last 64 bytes. - A PQ aggregate publication copied, decompressed and hashed the message to name its gossip ID on a failed publish; the ID is computed from the uncompressed SSZ the publish path already holds. - LeanVmBackend::aggregate serialized every proof to report its size while the caller serialized it again; the bytes are returned and reused, so committee proofs and final merges are serialized once. Intermediate merge outputs, which nothing else serializes, still are, as the spec's output_proof_bytes needs them.
- A merge's queued point was stamped inside the backend call, after the permit wait and the blocking-pool dispatch it should include; it is now taken where the merge's inputs are fixed, before both. - A merge's success, ready and plan_ready were emitted when the job returned, before an ahead-of-slot result was installed or abandoned. They are now emitted when the result is installed for its consumer; an abandoned one is recorded as discarded_late. - The optional claims counts were rebuilt by sorting every claim for telemetry alone; they are no longer reported. - A proposal's selection was recorded before block assembly, which can drop the attestations and build the block without them; it is now recorded after, with what the block carries.
… result The validator client scheduled the same committee and proposal duties the beacon node did, under the same eth.node.id, and marked its own submitted before HTTP publication: nothing ever closed them, since only the beacon node sees the libp2p publish. The beacon node now owns every duty it publishes, and the validator client emits no duty events (its pq.context says so); a proposal the validator client abandons before handing it over stays unfinished on the beacon node, as the spec allows. A publication gossipsub refused (duplicate, no peers, full queues) left its duty open; a duplicate committee broadcast now closes as suppressed/duplicate_suppressed, any other refusal as failed. prepare_beacon_proposer scheduled proposals for slots already past, which nothing would close; it schedules from the current slot on. A committee seat's collection_closed was stamped before the signature-pool snapshot it describes; it is stamped at the snapshot.
- An aggregate whose vote state was unavailable reported its committee as not_checked; it is missing_state. - hardware_ref asserted unrestricted affinity and max cgroup limits when nothing could be read; those are unknown, max only where a cgroup says so, and native or emulated execution is stated as unknown. - pq.context named functions that do not exist for the validation, usable, backend and proof-verification hooks; it names the real ones and what each interval includes.
…announce every context after a transport failure A flush that was running when shutdown came was never cut off: its call and its retries ignored the drain deadline, so Recorder::shutdown could return before the exporter had accounted for its records, and the process could exit with them uncounted. The deadline is now a watch channel every call and every retry pause races, the call it cuts off counts as a failed export, and shutdown waits a short margin past the deadline for the accounting. A retryable failure is the shared transport's, so it now schedules every family's context for re-announcement (a context a partial response rejected included), not just the context of the family whose request failed. Retry the gRPC codes OTLP lists as retryable (CANCELLED, DEADLINE_EXCEEDED, ABORTED, OUT_OF_RANGE, UNAVAILABLE, DATA_LOSS); RESOURCE_EXHAUSTED is retryable only with a RetryInfo this exporter does not read, so it is no longer retried. A transport error while reading a gRPC response body is retryable too.
…and close every publication
The cl hooks now take their state with try_lock and never wait for it. A hook
that finds it taken records what it lost in a new
pq_measurement_observation_losses_total{event,reason} counter: a refused
receipt raises the loss horizon (kept outside the lock) so a later copy is
withheld rather than reported as a first observation, and an attempt open
when one of its updates was refused is counted lost instead of emitted with
part of its observations. Withheld receipts and capacity refusals are counted
there too, separately from summary evictions.
Pending summaries and stage correlations now share the one 4,096 budget: a
new attempt is refused rather than evicting a correlation, and a correlation
is registered only for an object that actually goes on to the chain actor
(the GossipId says whether the delivery is tracked at all). Correlation loss
(contention, retired past the window, an attempt that closed before its
verdict) is counted. The expiry and retirement queues are compacted, so
resolved attempts and re-withheld keys no longer grow them. Observation
windows read a nondecreasing receiver slot, so a wall clock stepped back
cannot reopen one.
Expiry now runs at every hook (decode, validation, stages, publication), and
shutdown closes overdue summaries as expired before interrupting the rest. A
failed decode closes its attempt as decode_error whatever the gossip verdict
says (an envelope that fails to decode under PQ is ignored for scoring).
decode_finished is stamped at the decode's return, before the block root.
A publication is now opened by the Beacon API at its handoff, before the p2p
actor's mailbox, and travels with the message. One dropped before any result
closes as interrupted (or expired) from its Drop, one past its two-slot
horizon closes as expired at the next opportunity, and the PQ and cl families
read the publish call's boundaries from the same two points, before either
builds a record. The block root is no longer computed on the publish path
for telemetry.
… actual status An envelope's stages now carry the slot its payload names rather than its block's: a rejected envelope keeps the identity its processing record gave it. INVALID with a null latestValidHash is reported as invalid/invalid_object; invalid_block_hash is kept for an INVALID_BLOCK_HASH status, the only evidence the spec accepts for it. A block import that fails after storing the block's post-state (the unrealized-checkpoint computation that ends it) is reported as error/other, the node's own failure, not invalid_object. A held block's later copy without a correlation (a by-root or range answer) no longer replaces the gossip copy's, so its import still names its attempt.
… and proof work honest A committee duty no longer closes on the fate of the first of its vote groups: a committee whose attesters split over two votes proves an aggregate for each, and the duty stays open until each settles. The first accepted broadcast closes it as published; once every proved aggregate is suppressed or fails, it closes as failed if any failed and suppressed otherwise. The seat's own fates (already proved, missed deadline, prover failure) are gathered per committee and close its duty once. A proved aggregate the Beacon API withholds as already covered now settles its duty as suppressed/already_covered (that hook had no caller), one the API refuses when handed back settles it as failed, and a publication that never reaches publish (no fork digest, closed swarm channel) settles or closes its duty as failed. A PQ block production request that fails closes the slot's proposal duty as failed: the validator client asks a node for one block per slot. PQ first receipts are kept for the families' 64-slot window and retired by age, not FIFO tombstones that were themselves evicted: evicting a message early raises a loss horizon until its window ends, during which no unknown message gets a first receipt, and a receipt the state lock refused raises it too. The PQ triage after decompression only fills in the size and can no longer open a receipt the earlier hook missed. Only one eviction is counted per message, plus one processing loss when its attempt was still open. The PQ publish path no longer hashes the whole uncompressed aggregate for telemetry: the payload is moved into the hook and the message ID is computed from it only when publish returns none. The aggregate pool tells Covered from NotBetter (a subset search under its lock) only when telemetry reads it. A prepared merge is recorded as ready only once its send reaches the prepared slot, and as cancelled when its consumer gave it up, instead of ready before the send or discarded_late at a deadline that did not cause it.
…nters as the code now behaves Both contexts now say that rust-libp2p gossipsub's message-ID function decompresses a payload before the receipt hook (eth.cl.context's receipt_after_decompression is yes, pq.context's decompression is before), and that the handler decompresses it again after. The cl hook descriptions follow the code: the handoff in the Beacon API before the p2p actor's mailbox and the closures of a publication that never reaches publish, decode_finished before the block root, the decode_error outcome, the blocks forwarded on a dropped verdict, the import error split, the envelope keeping its own slot and the INVALID mapping. pq.context names the invalid-snappy message-ID domain, gives the validator client's receipt and backend as unknown or not exposed, and declares what stays open: outcomes only the validator client observes, admission recorded at the backend call, and the intermediate merge levels serialized for their byte count. docs/metrics.md documents pq_measurement_observation_losses_total and the retryable codes; docs/beacon_pq.md the duty closures, the receipt window and the exporter's re-announcement and shutdown deadline.
On pq-devnet-1 the remaining groups of a seat past its deadline only mark their committee's fate, so the duty key each loop still built went unused.
… a late decode failure on its result Stage correlations retired only when a new one was registered, which needs an open attempt; once correlations filled the shared budget with no attempt open, no attempt could open again and processing capture stopped for good. They now retire with the observation keys at every receipt. An open publication now holds an entry of the same budget from its handoff until it is dropped (released in Drop, whatever closed it), so publications waiting in the actor's mailbox or the swarm's queue are bounded too; one the budget or the state lock refuses is counted lost. A key withheld again at the same expiry no longer adds a retirement entry compaction cannot remove. An attempt whose decode failed is closed as decode_error even when the horizon or shutdown reaches it before its verdict: the failure is the definitive result visible at that opportunity.
…ose the duty only on settled facts A seat proving a committee installed each aggregate where the Beacon API serves it, but registered it with the duty only after the whole seat finished: a covered answer or a failed publish in between found no entry, or closed the duty while another vote group was still being proved. Each aggregate is now registered before it is exposed; the seat seals each committee duty once its every vote group's fate is known; and the duty closes as failed, missed_deadline or suppressed (in that order) only once it is sealed and every registered aggregate has settled, each settled once by its own entry, consumed by whichever answer comes first. An accepted broadcast still closes it at once as published. A lost bookkeeping step (a registration the registry lock refused or evicted) leaves the duty unfinished rather than closing it on a guess, and a publication settles only the duty of its own aggregator. The signer counts are now the counts of the vote group the outcome is about: the published group's, or the committee's one group's; with several groups and nothing published there are none, so selected can no longer exceed available. Publications that fail before publish settle by the proof's key.
…s proposer's failure, and drop telemetry-only import work The prepared merge's proof is linked to its operation before the send that can wake block production, which reads the link at once; the record still closes as ready only once the send installed the result. A failed PQ production request closes the proposal duty only once its randao_reveal verified it as the slot's proposer's: an early or malformed request no longer ends a duty another request may still fulfil. A held block's later copy without a correlation again replaces the earlier copy's timings and correlation, since the store keeps the later block: its import reports no owner rather than another copy's. An import error is reported as invalid_object without the extra storage read that told a post-commit failure apart. post_pq_envelope gets its doc comment back.
…path work as the code now behaves pq.context states how a committee duty is registered, sealed and closed, which duties a lost step leaves unfinished, that pre-call publication failures emit no record, that the PQ first-receipt window is at least gossipsub's seen_ttl (a later redelivery gets a new receipt), and that the duplicate, no-peers and queue-full results hash the whole aggregate to name the message ID publish does not return. The validator client's context no longer says the beacon node closes every duty. The cl import hook no longer claims to tell a post-commit failure apart, and the loss counter's contention reason is documented as the conservative count it is.
…uty open after any lost registry step The Beacon API is not told which seat asks for an aggregate, and a held proof answers any seat of its committee. So an aggregate the API has handed out is no longer settled as suppressed by a later covered answer, which may be another seat's request or come while its own publication is in flight; a refusal settles it only for the aggregator whose duty proved it; a settlement only touches the revision that registered it; and a seat publishing another seat's aggregate closes its duty as published without signer counts it does not know. A registry step the lock refuses (after a short bounded retry) is now remembered: a duty open at that moment may have lost its publication, so it closes on no outcome but a later accepted publication. The context no longer claims that a signed block refused on POST closes its proposal duty (it stays unfinished), states that one verified production request per slot is assumed, and the loss counter documents publication and stage contention.
…s in-memory timeliness record on_block_speculative writes the block's timeliness record, in memory, right before its last fallible step, the unrealized-checkpoint computation that runs after the store took the block. An import error with that record set is this node's failure and is reported as error/other; any other is a rule the block broke (invalid_object). This needs no storage read.
pq-devnet-2's measurement contract ([ethDreamer/pq-measurement-spec](https://github.com/ethDreamer/pq-measurement-spec)) moved to wire 0.6 (registry 0.12.0). It names an aggregate by the transport that carried it, so the gossipsub and Waggle networks can be compared, and it asks a publication for two more points: where the application let go of the aggregate, and when a peer's queue first took it. - **Versions**: `schema_version` is `eth.telemetry/0.6`, the OTLP scope version `0.12.0`. - **Aggregate references**: `{topic, transport: "gossipsub", gossip_message_id}` everywhere an aggregate is named. A publication that fails before its message ID exists carries `{topic, transport, missing: "not_created"}`. - **`pq.context`**: `gossip_id_algorithm`, `hooks.receipt` and `hooks.publish` are gone. `aggregate_transports.gossipsub` declares the identity rule, the receipt hook, that there are no incomplete receives, and what a successful publish establishes: `acceptance = peer_queue`, since gossipsub's `publish` returns `Ok` only once a recipient's send queue took the message. - **`pq.aggregate_publication`**: carries `handoff`, read where the Beacon API gives the aggregate to the network actor and passed along with it, and `origin_dispatch`. The first queue acceptance happens inside the publish call and is not timed, so it is `not_exposed` on an accepted result and `not_reached` on any other. - `make fmt`, `make lint`, `make test`. - The 45 `pq.*` records `tests/pq_lifecycle.rs` exports pass the spec's `schemas/pq.schema.json` at 0.6 and its reference checker (`check_metadata`, `check_metadata_sequence`), with no unresolved receipt or context. The spec registers no gossipsub identity rule. `GOSSIPSUB_IDENTITY_RULE` is Lighthouse's 0.5 `gossip_id_algorithm` string, byte for byte. Records join across clients only where the rule strings are equal, so every client has to declare the same one. - The Waggle branches get the same wire through #986 and #985, which contain this branch's commit. - #980 edits the same `instrumentation_revision` line, so whichever merges second conflicts there.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Description / Motivation
Everything ethlambda needs for pq-devnet-1 (
notes.ethereum.org/@ethpandaops/pq-devnet-1, target launch 27.11.2026). It relaunches pq-devnet-0 with two changes:leanEthereum/leanVM@351f7ae4) on Nov 26; this branch is on v0.19.0 (commit 15). Proofs from any other revision are not accepted. v0.17.0 is the release that removed theleanvm-sidecarin favour of in-process proving (setup(threads),aggregate,from_bytes).pq4595f0fc, "Stagger aggregators and skip redundant aggregates"). The spec pin is "TBD, at or after4595f0fc".Spec pin: consensus-specs
pqhead,4c296784. Every commit after4595f0fcchanges consensus, so the pin is a real choice. Head is the most likely landing point, and any later pin includes all of these anyway:4595f0fcf8f43aceb5d422b2e03f4185af898d07X_MAX_COMMITTEE_COUNT_PER_SLOTcaps PQ committees099909729bd63ad0,32919f0fxmss_*/stark_*wrappers, reformatting (no behaviour change)4c296784keccak256, notsha2569fa5f2a1Builds on #891 (the #880 port: attest on the block, PTC on the payload, parallel PQ attestation checks), already squash-merged into
pq-devnet-0, so pq-devnet-1 also gets the attestation-latency fixes. This branch was cut before that squash and has since mergedpq-devnet-0back in (8391a4d0). #891's content is identical to the squash, so this PR's diff is only the devnet-1 work below.The PR is three passes. Commits 1–6 are the devnet-1 work itself. Commits 14–16 are launch prep from the devops checklist of Nov 26 (leanVM v0.19.0, publish-on-sign). Commits 7–13 are a review pass over the first six: hardening that matters now that the prover runs inside the node, two fixes to my own first version of the committee cap, less wasted proving, and the image built to run the prover as fast as the host allows.
What Changed
First pass: pq-devnet-1
1.
40193875feat(pq): prove in process with leanVM bindings v0.17.0, drop the sidecar(The pin is v0.19.0 since commit 15; everything else here stands.)
Cargo.toml,Cargo.lock,leanvm-revision):claimsandlean_xmssmove to1e997c99. Their wire formats did not change: claims bytes and leanXMSS key, signature and cache sizes are all the same.leanvm_sidecaris replaced byleanvm_prover = lean_vmwithexperimental_prover, the prover pq-devnet-0's sidecar was built with. It makes the same proofs as the stable prover.cpu_tierswas off in this commit. Commit 12 turns it on for the image.jemalloclinksconflict, and leanVM'sallocatorcrate is not pulled in.crates/common/crypto/src/stark/sidecar.rs→stark/leanvm.rs:(pubkey, message)pairs, the empty proof for no claims, and a refusal of signatures made at another leaf.MAX_RECURSIONS(16) children at a time.lean_vm::aggregate, and verifying throughAggregateProof::from_bytes(..).verify(..).LeanVmConfig { threads, log_inv_rate: 2 }(Lighthouse's default rate), with the rate checked against leanVM's bounds.stark.rs:install_leanvmreplacesinstall_sidecar. With nothing left that can be unreachable,try_verify_aggregates,SidecarUnreachable, the gossipIgnoreReason::ProverUnreachableand itsprover_unreachablelabel are removed. A bad proof is now alwaysREJECT.bin/ethlambda:--networkresolves to a network that schedules PQ, and before anything can verify a proof.--pq-prover-socketis replaced by--pq-prover-threads(default 0, one thread per core).leanvm-revisionat/usr/local/share/ethlambda/leanvm-revision.bin/ethlambda/pq/ethlambda-pqbecomes a shim that execsethlambdaand mapsLEANVM_THREADSto--pq-prover-threads. ethereum-package'spqbranch launchesethlambda-pq beacon …, so it keeps working unchanged.leanvm_revinput goes.2.
f8f43acefeat(pq): staggered aggregators again (4595f0fc)This reverts
e033029d, the revert that took pq-devnet-0 back to2f43bc0f, and merges it with what landed since:AGGREGATION_CUTOFF_BPS/AGGREGATE_DUE_BPS_PQ/AGGREGATOR_DELAY_BPScome back (4000 / 6000 / 500, checked against the spec'sconfigs/mainnet.yaml), along withget_aggregation_cutoff_ms/get_pq_aggregate_due_ms.aggregator_positionagain.aggregate_attestationanswers 404 for an aggregate already covered (should_broadcast_aggregate).rpc/src/beacon/pq_aggregation.rs, merged by hand):b28ae833's genesis fix, rebased on the last seat's cutoff, so a node started before genesis still proves slot 0. It also keeps the guard against resealing a slot.cd849e37cost line is now per seat.908e88dfdoes.DB_VERSION→ 10, not back to 8.Config's layout is 8's again, but a number stands for one history, and a pq-devnet-0 (v9) directory is refused rather than misread.3.
e03f4185feat(pq): VRF leaves commit to revealed secrets (b5d422b2)beb567c9:secret = keccak256("VRF_SECRET" ‖ seed ‖ le64(i))leaf = keccak256("VRF_LEAF" ‖ secret ‖ le64(i))lean_vrfuses the same rule.WrongSeed: both stored formats are re-derived from the seed) and hashed again, so an upgraded directory never proves with an old-rule tree.tooling/pq-devnet/stays deleted (5c2fab24).4.
09990972feat(pq):X_MAX_COMMITTEE_COUNT_PER_SLOT(af898d07)Configfield, mainnet 16 and minimal 4, each equal to its preset'sMAX_COMMITTEES_PER_SLOT_PQ. It replaces that preset value in PQ'sget_committee_count_per_slot.process_attestation. So the cap is selected once per process from the network'sconfig.yaml, next to the preset (network::select_committee_cap, right afterselect_preset/check_constants, on both the built-in and the directory paths), and read throughconfig::x_max_committee_count_per_slot().ShufflingKeyalready carries the cap, so cached shufflings stay correct.first_config_difference), since a new cap reshuffles every PQ committee.5.
9fa5f2a1feat(pq): keccak256 legacy keys (4c296784)compute_legacy_xmss_pubkeyandcompute_legacy_vrf_rootnow hashpubkey ‖ domainwithkeccak256. The RANDAO mix and the aggregation committee seeds stay on SHA-256, as the spec says.ethlambda_crypto::keccak256(sha3'sKeccak256).6.
b8d430bcdocs(pq): pq-devnet-1 pin and docs (+8391a4d0, the merge ofpq-devnet-0)b5d422b2…becomes4c296784bb6ff54cbdcf72ebdda2a1057cce8893in every module doc and in the preset test. No preset file changed between the two.docs/beacon_pq.md:cl_extra_params: [--pq-prover-threads=2]replacingLEANVM_THREADS;docs/cli.md,docs/metrics.md,docs/spec_deviations.mdandCLAUDE.mdfollow.pq-devnet-0's new "published files in use" notes and adds that VRF states published for pq-devnet-0's rule show asloaded=0 hashed=N.Second pass: review of the above
7.
7a9d4318fix(pq): catch leanVM panics, check the prover at startup, test it in CIleanvm::guarded(catch_unwind): a panic in the verifier reads as a proof that does not verify, one in the prover as a proof that was not made, and both logleanVM panicked. leanVM's proving lock tolerates poisoning; verification takes no lock, so it keeps working whatever a panic left behind.LeanVmBackend::setupends by proving and verifying one throwaway signature, and checks the proof does not verify against another claim. A prover that cannot run on the host stops the node at startup instead of silently missing every aggregation duty. Costs about 60 ms here.--pq-prover-threadsthan cores is lowered to the cores with a warning (leanVM would oversubscribe; its own bindings refuse it).#[ignore]for a plaincargo test, which takes 160 s on it unoptimized, andmake test-consensus(so CI) now runs it by name underrelease-fast, where it takes about 1.4 s. It also checks that garbage, truncated and bit-flipped bytes in a proof's place verify against nothing, and that a signature at another leaf than its statement's is refused.LEANVM_REV, the threerevs in the workspace manifest and the rootleanvm-revisionfile equal.8.
16a19515feat(pq):ethlambda pq-prover-check--signaturesclaims (default 128)--roundstimes, and reports each round against that window. No network, no data directory.release-fast: 128 signatures in about 0.28 s, 512 in about 0.86 s, verification about 6 ms, proofs 160–200 KB.9.
dd187f98fix(pq): the committee cap's absent and too-large casesTwo things commit 4 got wrong:
config.yamlpredates the key (every pq-devnet-0 one) would warn at each start about a value its file never set. An absent key now takes the preset'sMAX_COMMITTEES_PER_SLOT_PQ, which the spec's configs equal, and the value is written into the config, so the data directory and/eth/v1/config/spechold what the node runs on.get_committee_count_per_slothas it.Config'sDefaultimpl, which commit 4 had accidentally attached to the cap's static.10.
3e56b1d5perf(pq): a later seat does not re-prove what an earlier one provedinsert_provenwould not keep andshould_broadcast_aggregaterules out anyway.PqSignaturePool::is_provendetects it; the seat's cost line gainsalready_proven. The held aggregate still answers the later seat's request.11.
ffbfc20afix(validator): PQ seats publish side by side12.
3d6d0f1dperf(pq): the image's prover is built with leanVM's CPU tiersleanvm-cpu-tiers(off by default, so an ordinary build does not compile the extra copies). A tier only gets its instructions under leanVM'sscripts/tier-rustcasRUSTC_WRAPPER; the Dockerfile fetches it at the pinned revision and sets it beforecargo chef cook. Every other crate keeps the baseline in.cargo/config.toml.FEATURESis nowleanvm-cpu-tiers. The shadow variant passes its ownFEATURES, so it is unaffected.Cargo.lockgains the 42 tier crates.13.
22d16f45docsdocs/beacon_pq.md,docs/cli.md(newpq-prover-checksection) andCLAUDE.mdfollow.dirty_decay_ms:-1), not of the node, whose jemalloc returns them like any freed memory. The note now says so, and thatMALLOC_CONF=dirty_decay_ms:-1makes the same trade for the whole node. Not measured.Third pass: launch prep (Nov 26)
14.
787d5aa8merge ofpq-devnet-0ba522d44(start the gloas and PQ payload build a third of a slot ahead): taken as is.a3732f4b(a pool of verifying connections to the sidecar, so gossip validation and block production's proof check stop waiting for each other): there is no sidecar here. In process, leanVM verifies on the calling thread under no lock, which is that change's whole effect already. Its file stays deleted.15.
6039075echore(pq): leanVM bindings v0.19.0 (351f7ae4)revs,leanvm-revisionandLEANVM_REVmove together (the pin-consistency test holds them equal).setupnow picks the prover's CPU tier, so a build that leaves some of the CPU unused says so at startup, not at the first proof.MAX_CACHED_BOTTOM_TREESis renamedDEFAULT_BOTTOM_TREE_CACHE_SIZEand is 8, not 4. Only a comment named it here.PROTOCOL_VERSION(1), bumped on every STARK-breaking change. The prover's startup line andpq-prover-checknow report it.xmss_cache_url's 14696-byte records still load.scripts/tier-rustcis unchanged and exists at the new pin.16.
065f80e5feat(validator): publish each PQ attestation as soon as it is signedpq::sign_eachhands each signature over the moment it exists (still one leaf-record flush for the batch).AttestationService::publish_pq_as_signedpublishes it with whatever else was signed by then, each request on its own, so none waits for a slower key or for an earlier request's answer.Correctness / Behavior Guarantees
ForkName::Pq.REJECT. TheIGNOREfor "prover unreachable" existed only because a separate process could be down.pq-devnet-1use keccak256 (spec head,4c296784); Lodestar's and Grandine'spq-devnet-1still use sha256. The devnet's spec commit is "TBD". It only matters when a BLS-keyed deposit is processed after genesis, but then the two groups would disagree on the new validator's key. If the devnet pins before4c296784, commit 5 is the one to revert.DB_VERSION10. pq-devnet-0 directories (v9) are refused, so pq-devnet-1 starts fresh, which a relaunch does anyway.b5d422b2's VRF rule and4c296784's keccak legacy keys.Tests Added / Run
stark::leanvm::tests::leanvm_proofs_merge_and_verify(ignored by default, real leanVM): two committee proofs made in process and merged; the merged proof verifies against the concatenated statements and fails against a subset, the wrong order, or a truncated proof. Run and passing.CommitteeBits.keccak256(pubkey ‖ domain)and no longer equal the SHA-256 ones.cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warnings--lib, rpc, validator, p2p, and theethlambdabinary: all passingPqSignaturePool::is_proven: proven once the held aggregate has every signer, not after a new vote, not for another vote's group.pq-prover-check: the 2.4 s window from mainnet's timing.pq::sign_eachanswers every request once, at its position, with the bytes the batch signer makes; an unsignable request is an error at its own position only.pqversion, and the third costs only itself.065f80e5):make lint: pass.make test(test-consensus+test-node): pass, 4,171 tests, none failing. It includes the end-to-end leanVM prover test on v0.19.0.ethlambda pq-prover-check --signatures 128on v0.19.0: 270–276 ms per round,protocol_version=1.ethpandaops/ethlambda:pq-devnet-1-065f80e, built by ethPandaOps from this branch's head):ethlambda/v1.0.0-pq-devnet-1-065f80eand carries leanVM351f7ae4.pq-prover-checkinside it on arm64: self-check passes, 128 signatures prove in 0.7–1.0 s with every core busy elsewhere (window 2.4 s),protocol_version=1.LEANVM_TIER=armsha3forced: proves fine, so the CPU-tier build (wrapper +leanvm-cpu-tiers, with fat LTO) is in the image and runs.pqbranch):ethlambda pq-keysfor the new VRF rule and served to the genesis generator and the validator clients, since the package's published files are still pq-devnet-0's.leanXMSS keys: 0 from cache, 32 fetched, 0 derived. Validator clients: leanXMSScached=16 built=0 refused=0from ethPandaOps' published cache (so that file loads under v0.19.0), VRFloaded=16 hashed=0.acceptonly, for blocks, payload envelopes, aggregates (leanVM proofs checked by the other node), attestations, PTC votes and proposer preferences..github/tests/pq-devnet-1.yaml). It cannot pass for any new-rule client until ethPandaOps publishes genesis VRF roots and.vrffiles forb5d422b2; the published ones were checked to be the old rule's.pq-prover-checkon an x86-64 host, where the AVX-512 / GFNI tiers would be used.Related Issues / PRs
notes.ethereum.org/@ethpandaops/pq-devnet-1pqat4c296784; the staggered aggregators are4595f0fc.✅ Verification Checklist
cargo fmt --all --check: cleanmake linton the final tree (065f80e5): cleanmake teston the final tree: passing065f80e5)pq-prover-checkinside the published image (arm64)pq-prover-checkon an x86-64 host