Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
24a9e5a
feat(validator): attest once the slot's block is in, not always at th…
pablodeymo Nov 25, 2026
45d07cd
perf(rpc): check a submitted PQ attestation batch in parallel, off th…
pablodeymo Nov 25, 2026
aad0dc9
Revert "feat(validator): attest once the slot's block is in, not alwa…
pablodeymo Nov 25, 2026
a5eb14e
feat(validator): attest when the slot's block arrives, vote PTC when …
MegaRedHand Nov 24, 2026
38762c3
fix(validator): count open event streams with a guard, warn once on s…
MegaRedHand Nov 25, 2026
403fc7a
fix(validator): bound early requests by the duty's deadline, end the …
MegaRedHand Nov 25, 2026
f4c679c
docs(pq): attest and vote PTC on head_monitor's events, not head_events
pablodeymo Nov 25, 2026
4019387
feat(pq): prove in process with leanVM bindings v0.17.0, drop the sid…
pablodeymo Nov 25, 2026
f8f43ac
feat(pq): staggered aggregators again, as consensus-specs pq 4595f0fc…
pablodeymo Nov 25, 2026
e03f418
feat(pq): VRF leaves commit to revealed secrets, as consensus-specs p…
pablodeymo Nov 25, 2026
0999097
feat(pq): X_MAX_COMMITTEE_COUNT_PER_SLOT caps PQ committees, as conse…
pablodeymo Nov 25, 2026
9fa5f2a
feat(pq): legacy XMSS keys and VRF roots are keccak256, as consensus-…
pablodeymo Nov 25, 2026
b8d430b
docs(pq): pq-devnet-1, consensus-specs pq at 4c296784 and leanVM bind…
pablodeymo Nov 25, 2026
8391a4d
Merge remote-tracking branch 'origin/pq-devnet-0' into pq-devnet-1
pablodeymo Nov 25, 2026
7a9d431
fix(pq): catch leanVM panics, check the prover at startup, test it in CI
pablodeymo Nov 25, 2026
16a1951
feat(pq): ethlambda pq-prover-check, what leanVM's prover does on thi…
pablodeymo Nov 25, 2026
dd187f9
fix(pq): an absent X_MAX_COMMITTEE_COUNT_PER_SLOT is the preset's, on…
pablodeymo Nov 25, 2026
3e56b1d
perf(pq): a later seat does not prove again what an earlier one proved
pablodeymo Nov 25, 2026
ffbfc20
fix(validator): PQ aggregator seats publish side by side, not in turn
pablodeymo Nov 25, 2026
3d6d0f1
perf(pq): build the image's prover with leanVM's CPU tiers
pablodeymo Nov 25, 2026
22d16f4
docs(pq): the prover's guard, self-check, tiers and cost; the cap's r…
pablodeymo Nov 25, 2026
787d5aa
Merge remote-tracking branch 'origin/pq-devnet-0' into pq-devnet-1
pablodeymo Nov 26, 2026
6039075
chore(pq): leanVM bindings v0.19.0 (351f7ae4), the release pq-devnet-…
pablodeymo Nov 26, 2026
065f80e
feat(validator): publish each PQ attestation as soon as it is signed
pablodeymo Nov 26, 2026
5dd37e8
Merge remote-tracking branch 'origin/pq-devnet-0' into pq-devnet-1
MegaRedHand Nov 27, 2026
25302a5
Merge remote-tracking branch 'origin/pq-devnet-0' into pq-devnet-1
MegaRedHand Nov 27, 2026
8a64c3c
feat: follow GAS_LIMIT_SCHEDULE on pq-devnet-1 (validator default + P…
pablodeymo Nov 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
tags:
description: "Docker image tags, comma-separated (e.g., devnet5,devnet5-fix)"
required: true
leanvm_rev:
description: "leanVM commit, tag or branch to build the PQ prover sidecar from (blank: the one in leanvm-revision)"
required: false
default: ""

permissions:
contents: read
Expand Down Expand Up @@ -112,11 +108,9 @@ jobs:
with:
context: .
file: ./Dockerfile
# An empty LEANVM_REV builds the sidecar from leanvm-revision.
build-args: |
GIT_COMMIT=${{ github.sha }}
GIT_BRANCH=${{ github.ref_name }}
LEANVM_REV=${{ inputs.leanvm_rev }}
${{ matrix.variant.build_args }}
push: true
tags: ${{ steps.prep.outputs.tags }}
Expand Down
93 changes: 64 additions & 29 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ make test # All tests + forkchoice spec tests
`make test` is `test-consensus` plus `test-node`, two halves CI runs as separate
jobs because together they no longer fit a runner's disk. `CONSENSUS_CRATES` in
the Makefile names the first; `test-node` is the workspace minus it. Run one half
directly when iterating on it.
directly when iterating on it. `test-consensus` also runs the PQ fork's
end-to-end leanVM prover test by name (`leanvm_proofs_merge_and_verify`, ignored
by a plain `cargo test`, which spends minutes on it unoptimized).

### Docs-only changes skip CI

Expand Down Expand Up @@ -300,18 +302,30 @@ actual_slot = finalized_slot + 1 + relative_index
signatures, a port of leanVM `4af2cddd`'s Rust implementation pinned by
consensus-specs' and leanVM's known answers), and proves many signatures at
once through `ethlambda_crypto::stark`: the specification's reference (the
signatures concatenated) by default, or real leanVM proofs from a
`leanvm-sidecar` process (leanVM `c5ee9d239`, bindings v0.15.0, the
release pq-devnet-0 runs for its signer, prover, verifier and sidecar),
which is what the PQ devnet runs. The node only connects to a sidecar
(`--pq-prover-socket`); as for Lighthouse, something else starts it: the
image's `ethlambda-pq` supervisor (`bin/ethlambda/pq/`), run as
`ethlambda-pq beacon <flags>`. The image builds `leanvm-sidecar` from the
revision in the root `leanvm-revision` file (or `--build-arg LEANVM_REV`),
so which prover a devnet runs is chosen outside the node; the node's client
only refuses a sidecar with another protocol version or verifier tag.
The two encodings do not verify each other's proofs. Never pass one
scheme's key to the other
signatures concatenated), or real leanVM proofs made in process
(`stark::leanvm`, leanVM `351f7ae4`, bindings v0.19.0, the one release
pq-devnet-1 runs for signer, prover and verifier; `lean_vm` with its
experimental prover). `run_node` installs leanVM as soon
as `--network` resolves to a network that schedules PQ, on
`--pq-prover-threads` threads (0: one per core, never more than the
cores); the reference is then only what the spec tests run. Setup ends
with a self-check (one signature proved and verified) that fails startup,
and every call into leanVM is wrapped in `leanvm::guarded`, since a panic
there would otherwise unwind into the chain actor importing a block: it
reads as a proof that does not verify, or was not made. The image builds
the prover with leanVM's CPU tiers (`leanvm-cpu-tiers` feature plus
leanVM's `scripts/tier-rustc` as `RUSTC_WRAPPER`, fetched by the
Dockerfile at the pinned revision), picked at run time; a plain `cargo
build` has no tiers and proves on `.cargo/config.toml`'s baseline.
`ethlambda pq-prover-check` measures the prover on a host against a
seat's 2.4 s proving window. v0.17.0 removed pq-devnet-0's
`leanvm-sidecar`, so the image builds none, and `ethlambda-pq`
(`bin/ethlambda/pq/`) is now a shim that execs `ethlambda`, kept for
launchers that still call it. A proof from another leanVM revision does not
verify, and nothing on the wire says why; the root `leanvm-revision` file
names the pin (a test holds it equal to the manifest's `rev`s, and the
Dockerfile reads it). The two encodings do not verify each other's proofs.
Never pass one scheme's key to the other
- Wire sizes: `PUBLIC_KEY_SIZE` (`common/types/src/state.rs`) and `SIGNATURE_SIZE`
(`common/types/src/attestation.rs`), static-asserted against leanVM's scheme
constants in `common/crypto/src/signature.rs`
Expand Down Expand Up @@ -540,7 +554,15 @@ the next fork the node cannot follow: the first refuses such an anchor with
`UnsupportedFork`, the second warns once per scheduled fork for which
`ForkName::is_followed` answers no (the one place that says which forks the
node follows). The ignored-keys warning only ever names heze's keys and
`GAS_LIMIT_SCHEDULE`/`INCLUSION_LIST_DUE_BPS`.
`INCLUSION_LIST_DUE_BPS`. `GAS_LIMIT_SCHEDULE` (EIP-8261) is a `Config` field
served on `/eth/v1/config/spec` and stored in a `Metadata` row of its own
(`config_gas_limit_schedule`), not in `Metadata["config"]`'s encoding, where it
takes zero bytes. That is the pattern for every `Config` key added after
`DB_VERSION` 10 (`CONFIG_ROWS` in `store.rs`): no version bump, and a directory
that predates the key resumes, with a beacon resume adding the config file's
value (`Store::fill_missing_config_keys`) instead of failing. `ConfigFile::parse`
refuses a schedule with an entry before `GLOAS_FORK_EPOCH`, two at one epoch,
or more than 32 entries.
PlatΓ₯berget (the Glamsterdam testnet) is already past its `GLOAS_FORK_EPOCH`,
so its checkpoint anchor is a gloas state: it is accepted, starts with no
payload known (head EMPTY), and its first FULL child is held until the anchor's
Expand Down Expand Up @@ -879,8 +901,11 @@ transitions are in `ethlambda-types`, per the section above. Nothing above
validation, deneb's and fulu's data availability, and gloas's payload-aware
suites.
- **EIP-8483 and PQ** (consensus-specs' `pq` branch feature forks, pinned at
`2f43bc0f`, the pq-devnet-0 spec; branch `pq-devnet-0-b5d422b2` follows
`b5d422b2`) are `ForkName::Eip8483` and `ForkName::Pq` after gloas, selectors
`4c296784`, pq-devnet-1's spec: staggered aggregators of `4595f0fc`, VRF
secrets of `b5d422b2`, `X_MAX_COMMITTEE_COUNT_PER_SLOT` of `af898d07` (one
per process, selected with the preset: absent it is the preset's
`MAX_COMMITTEES_PER_SLOT_PQ`, above that it is refused at startup),
keccak256 legacy keys of `4c296784`) are `ForkName::Eip8483` and `ForkName::Pq` after gloas, selectors
8 and 9, implemented in the state transition and fork choice
(`stf/{eip8483,pq}.rs`, `stf/epoch/pq.rs`, `helpers/pq.rs`, `upgrade_to_*`)
and PQ's gossip rules (`gossip/pq.rs`, `p2p/src/beacon/pq.rs`: a PQ digest's
Expand All @@ -895,10 +920,12 @@ transitions are in `ethlambda-types`, per the section above. Nothing above
`pq` branch, see `docs/beacon_pq.md`, "Running a devnet"),
with its own validators: the validator client derives each
validator's leanXMSS key and VRF seed from its BLS key
(`ethlambda_crypto::pq_keys`) and attests, aggregates, casts PTC votes and
proposes, each signature
at its leaf. The VRF tree (`ethlambda_crypto::vrf`, Keccak-256 over all
`2^31` leaves, each `keccak256(vrf_seed || le64(slot))`) takes minutes of
(`ethlambda_crypto::pq_keys`) and attests (each vote published as soon as
it is signed, `pq::sign_each`, not once the batch is), aggregates (staggered by its seat
in the aggregation committee, each seat on its own; the node skips a seat's
proof when an earlier seat of its own already proved every vote collected),
casts PTC votes and proposes, each signature at its leaf. The VRF tree (`ethlambda_crypto::vrf`, Keccak-256 over all
`2^31` leaves, each committing to its slot's secret) takes about 100 s of
every core per key, so a background thread hashes it after startup (in a
rayon pool of its own: on the global one it starves every leanXMSS
signature until done) and stores its upper nodes in
Expand All @@ -916,8 +943,8 @@ transitions are in `ethlambda-types`, per the section above. Nothing above
client survives a restart. The beacon node builds PQ blocks through `POST
/eth/v1/validator/pq_blocks/{slot}` (`rpc/src/beacon/pq_proposal.rs`,
`pq_block_production.rs`), packing attestations from the validated
aggregates in `Store::pq_aggregate_pool` with their proofs merged on the
sidecar under a deadline (one unmerged attestation when it misses), and
aggregates in `Store::pq_aggregate_pool` with their proofs merged by
leanVM under a deadline (one unmerged attestation when it misses), and
proves its aggregators' committees ahead (`rpc/src/beacon/pq_aggregation.rs`,
`Store::pq_signature_pool`). Blobs travel as in gloas: the node keeps the
blobs of the payload it built and the envelope endpoint publishes their
Expand Down Expand Up @@ -1014,7 +1041,14 @@ transitions are in `ethlambda-types`, per the section above. Nothing above
client do), unconditionally, re-sending each kept one once an epoch (a node
holds them in memory only), and `produceBlockV4` carries the boost factor and
`--builder-min-bid`. `--gas-limit` sets the target gas limit the preferences
carry, which the node's own gloas payload is built toward.
carry, which the node's own gloas payload is built toward; without it, the
one the beacon node's `GAS_LIMIT_SCHEDULE` names for the proposal's epoch,
else 60M (`gas_limit_schedule`: every node's `/eth/v1/config/spec` is read
at startup and again every epoch, the first non-empty schedule in
`--beacon-nodes` order is handed to `ProposerSettings`, one held is kept
while no node serves one, and a missing one is warned about while gloas is
scheduled and `--gas-limit` unset; an unusable schedule reads as empty, with
a warning).
It keeps EIP-3076 minimal-watermark slashing protection in
`--validators-dir/slashing_protection.json` (`crate::slashing_protection`),
durable before every block (blinded ones included) and attestation signature;
Expand Down Expand Up @@ -1223,12 +1257,13 @@ behavior.
in-memory map stays as a write-through cache in front of the table. Pruned
on finalization to the same horizon as `LiveChain` (the finalized block's
own slot, keeping that block's own entry).
- `DB_VERSION` is 9: `Config` lost PQ's aggregation timing keys
(`AGGREGATION_CUTOFF_BPS`, `AGGREGATE_DUE_BPS_PQ`, `AGGREGATOR_DELAY_BPS`,
consensus-specs `4595f0fc`) with the move back to `2f43bc0f`, so a version
8 directory's stored config decodes into the wrong fields. (8 added the
EIP-8483 and PQ fork versions and epochs,
`UNREGISTERED_VALIDATOR_WITHDRAWABILITY_DELAY` and
- `DB_VERSION` is 10 (pq-devnet-1): `Config` has PQ's aggregation timing
(`AGGREGATION_CUTOFF_BPS`, `AGGREGATE_DUE_BPS_PQ`, `AGGREGATOR_DELAY_BPS`)
again and `X_MAX_COMMITTEE_COUNT_PER_SLOT`, so a pq-devnet-0 (version 9,
without the timing keys) directory's stored config decodes into the wrong
fields. (9 dropped the timing keys for pq-devnet-0's `2f43bc0f`; 8 gave
`Config` the EIP-8483 and PQ fork versions and epochs,
`UNREGISTERED_VALIDATOR_WITHDRAWABILITY_DELAY`, the timing keys and
`ATTESTATION_SUBNET_COUNT_PQ`; 7 moved `States`
and `StateDiffs` from root keys to slot||root keys, the block's slot looked
up from `BlockHeaders` by readers, so `Store::prune_finalized_states` can
Expand Down
Loading
Loading