Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .claude/skills/hive/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ description: |
Negative triggers: Do NOT activate for spinning up a local devnet to RUN it rather than
test it (use the leanQuickstart skill). Do NOT activate for consensus container shapes /
fork choice / state transition (use the leanSpec skill). Do NOT activate for aggregation
/ zkVM / proof internals (use the leanMultisig skill). Do NOT activate for the metric
/ zkVM / proof internals (use the leanVM skill). Do NOT activate for the metric
contract — names/types/buckets/labels — (use the leanMetrics skill). Do NOT activate for
pure docs-site (mdBook) work. Do NOT activate when working outside the Verity project.
---
Expand Down Expand Up @@ -150,7 +150,7 @@ Paths are relative to the hive repo root, read at `master`.
## 7. Relationship to the other skills & Verity

- **leanQuickstart** (separate skill) = spin up and **run** a local lean devnet.
- **leanSpec** / **leanMultisig** / **leanMetrics** (separate skills) = protocol &
- **leanSpec** / **leanVM** / **leanMetrics** (separate skills) = protocol &
container shapes / aggregation & zkVM / the metric contract.
- **hive** (this skill) = the **test harness** that exercises clients (build + `--sim` +
`--client`), especially the `lean` simulator.
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/leanMetrics/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: |
any work exposing or monitoring consensus-client metrics in Verity.
Negative triggers: Do NOT activate for consensus container shapes / fork choice /
state transition behavior (use the leanSpec skill). Do NOT activate for aggregation /
zkVM / proof internals (use the leanMultisig skill). Do NOT activate for pure docs-site
zkVM / proof internals (use the leanVM skill). Do NOT activate for pure docs-site
(mdBook) work. Do NOT activate when working outside the Verity project.
---

Expand Down Expand Up @@ -126,10 +126,10 @@ authoritative for the contract.
3. For coverage/status questions, read the per-client status column (✅/📝/□).
4. In your output, cite the **`metrics.md` section + the `main` commit SHA** you checked.

## 5. Relationship to leanSpec & leanMultisig & Verity
## 5. Relationship to leanSpec & leanVM & Verity

- **leanSpec** (separate skill) = consensus protocol & container shapes (Python).
- **leanMultisig** (separate skill) = aggregation + zkVM (Rust).
- **leanVM** (separate skill) = aggregation + zkVM (Rust).
- **leanMetrics** (this skill) = the observability **metric contract** (Prometheus
names/types/buckets/labels) + Grafana dashboards.
- Verity's `verity-metrics` crate implements leanMetrics; **ethlambda** and **Ream** are
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/leanQuickstart/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description: |
and any work spinning up or running a local lean multi-client devnet for Verity.
Negative triggers: Do NOT activate for consensus container shapes / fork choice /
state transition (use the leanSpec skill). Do NOT activate for aggregation / zkVM /
proof internals (use the leanMultisig skill). Do NOT activate for the metric
proof internals (use the leanVM skill). Do NOT activate for the metric
contract — names/types/buckets/labels — (use the leanMetrics skill); this skill
only covers RUNNING the bundled Prometheus/Grafana stack. Do NOT activate for pure
docs-site (mdBook) work. Do NOT activate when working outside the Verity project.
Expand Down Expand Up @@ -114,10 +114,10 @@ Paths are relative to the lean-quickstart repo root, read at `main`.
`metrics/docker-compose-metrics.yaml` if you want the Prometheus/Grafana stack.
4. In your output, cite the **file/script + the `main` commit SHA** you checked.

## 5. Relationship to leanSpec, leanMultisig, leanMetrics & Verity
## 5. Relationship to leanSpec, leanVM, leanMetrics & Verity

- **leanSpec** (separate skill) = consensus protocol & container shapes (the chain rules).
- **leanMultisig** (separate skill) = aggregation + zkVM proof internals.
- **leanVM** (separate skill) = aggregation + zkVM proof internals.
- **leanMetrics** (separate skill) = the observability **metric contract** (names/types/
buckets/labels). This skill only covers **running** the bundled Prometheus/Grafana
stack, not what the metrics are.
Expand Down
4 changes: 2 additions & 2 deletions .claude/skills/leanSpec/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: |
test vectors. Maps a topic to the authoritative leanSpec path for any protocol element.
Triggers: "leanSpec", "leanSpecを確認", "仕様を確認", "Verityの仕様", "prime", "verity context",
"where is the spec for", "container shape", "コンテナの形", "3SF", "fork choice",
"state transition", "XMSS", "leanMultisig", "devnet spec", and starting any Verity
"state transition", "XMSS", "leanVM", "devnet spec", and starting any Verity
implementation or review work.
Negative triggers: Do NOT activate for pure docs-site work (mdBook page authoring or
build/serve). Do NOT activate when working outside the Verity project.
Expand Down Expand Up @@ -84,7 +84,7 @@ Paths are relative to the leanSpec repo root, read at `origin/main`.
| Genesis / validator / chain config | `src/lean_spec/subspecs/{genesis,validator,chain}/`, `forks/lstar/containers/config.py` |
| API | `src/lean_spec/subspecs/api/` |
| Conformance test vectors | `tests/consensus/devnet/{state_transition,fc,ssz,networking,sync,verify_signatures}/` |
| leanMultisig (aggregation / zkVM) | **not** in leanSpec — use the dedicated `leanMultisig` skill (`github.com/leanEthereum/leanMultisig`) |
| leanVM (aggregation / zkVM) | **not** in leanSpec — use the dedicated `leanVM` skill (`github.com/leanEthereum/leanVM`) |
| ethlambda (Rust *design* reference, not spec) | external `github.com/lambdaclass/ethlambda` |

## 4. How to use (implementing / reviewing / answering)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,80 +1,85 @@
---
name: leanMultisig
name: leanVM
description: |
Ground every question about post-quantum signature aggregation and the zkVM in
leanMultisig — the authoritative spec and Rust reference implementation
(github.com/leanEthereum/leanMultisig), always read from the latest remote main.
leanVM — the authoritative spec and Rust reference implementation
(github.com/leanEthereum/leanVM), always read from the latest remote main.
Verity's verity-crypto crate depends on it directly. Use before implementing,
reviewing, or answering anything about XMSS aggregation, Type-1/Type-2 proofs, the
prover/verifier, the zkVM, the zkDSL, or WHIR.
Triggers: "leanMultisig", "lean_multisig", "leanMultisigを確認", "署名集約", "aggregation",
Triggers: "leanVM", "lean_vm", "leanVMを確認", "leanMultisig", "lean_multisig" (the
repo's former name — old references still mean this skill), "署名集約", "aggregation",
"Type-1 proof", "Type-2 proof", "zkVM", "zkDSL", "WHIR", "prover", "verifier",
"verity-crypto", and any work touching signature aggregation or proof generation in Verity.
Negative triggers: Do NOT activate for consensus container shapes / fork choice / state
transition (use the leanSpec skill). Do NOT activate for pure docs-site work. Do NOT
activate when working outside the Verity project.
---

# leanMultisig — source of truth for aggregation & the zkVM
# leanVM — source of truth for aggregation & the zkVM

leanMultisig (`github.com/leanEthereum/leanMultisig`) is a minimal zkVM targeting
> Renamed upstream from **leanMultisig** to **leanVM** (2026-08-14; the old GitHub URL
> redirects). Older Verity docs, memories, and upstream discussions may still use the old
> name — they refer to this same repository.

leanVM (`github.com/leanEthereum/leanVM`) is a minimal zkVM targeting
aggregation of hash-based (Generalized-XMSS) signatures. It is the **authoritative spec
and Rust reference implementation** for everything aggregation/zkVM-related in Verity.
Verity's `verity-crypto` crate depends on it directly (as a pinned git dependency).

## 0. Core principle

- The behavior of signature aggregation, Type-1/Type-2 proofs, the prover/verifier, the
zkVM and its zkDSL is defined by **leanMultisig** (its Rust crates + design docs). When
zkVM and its zkDSL is defined by **leanVM** (its Rust crates + design docs). When
in doubt, read the source.
- Division of authority with the leanSpec skill: **leanSpec** defines the *consensus
containers* that carry proofs (`TypeOneMultiSignature`, `SignedBlock.proof` =
`ByteList512KiB`, the verify entry points). **leanMultisig** defines how those proofs
`ByteList512KiB`, the verify entry points). **leanVM** defines how those proofs
are *produced and verified*. For container shapes → leanSpec; for proof internals →
here.

## 1. Always read leanMultisig from the remote `main` (no local path assumptions)
## 1. Always read leanVM from the remote `main` (no local path assumptions)

leanMultisig moves fast. Read the latest `main` of the canonical upstream directly from
leanVM moves fast. Read the latest `main` of the canonical upstream directly from
the remote — this works for every developer and in CI, with no dependency on anyone's
local clone path.

Repo: `github.com/leanEthereum/leanMultisig` (canonical; do **not** use a personal fork).
Repo: `github.com/leanEthereum/leanVM` (canonical; do **not** use a personal fork).

```bash
# Latest main commit — cite this SHA in your output:
gh api repos/leanEthereum/leanMultisig/commits/main --jq '.sha'
gh api repos/leanEthereum/leanVM/commits/main --jq '.sha'

# Read a file at main:
gh api "repos/leanEthereum/leanMultisig/contents/crates/xmss/xmss.md?ref=main" --jq '.content' | base64 -d
gh api "repos/leanEthereum/leanVM/contents/crates/xmss/xmss.md?ref=main" --jq '.content' | base64 -d
# raw fallback (no gh):
curl -s https://raw.githubusercontent.com/leanEthereum/leanMultisig/main/crates/xmss/xmss.md
curl -s https://raw.githubusercontent.com/leanEthereum/leanVM/main/crates/xmss/xmss.md

# List a directory at main:
gh api "repos/leanEthereum/leanMultisig/contents/crates?ref=main" --jq '.[].name'
gh api "repos/leanEthereum/leanVM/contents/crates?ref=main" --jq '.[].name'
# Full tree:
gh api "repos/leanEthereum/leanMultisig/git/trees/main?recursive=1" --jq '.tree[].path'
gh api "repos/leanEthereum/leanVM/git/trees/main?recursive=1" --jq '.tree[].path'
```

No `gh`/`curl`? Use WebFetch on `https://github.com/leanEthereum/leanMultisig/blob/main/<path>`.
No `gh`/`curl`? Use WebFetch on `https://github.com/leanEthereum/leanVM/blob/main/<path>`.

If you happen to have a local clone, you *may* use it for fast navigation/grep — but
`git fetch origin` first and read `origin/main` (clones drift onto feature branches and
forks). Never assume a specific clone path.

## 2. How Verity consumes it

- `verity-crypto` depends on leanMultisig as a **pinned git dependency** in `Cargo.toml`.
- `verity-crypto` depends on leanVM as a **pinned git dependency** in `Cargo.toml`.
The pinned commit is what Verity builds against; the latest `main` is the source of
truth for understanding/spec questions. When bumping the pin, re-read `main`.
- The proving stack is expensive; the prover context is set up once at startup. Verity
produces Type-1 proofs only when acting as an aggregator; every node verifies.

## 3. Topic → authoritative location map

Paths are relative to the leanMultisig repo root, read at `main`.
Paths are relative to the leanVM repo root, read at `main`.

| Topic | leanMultisig (authoritative) |
| Topic | leanVM (authoritative) |
|---|---|
| XMSS signature scheme | `crates/xmss/` (+ `crates/xmss/xmss.md`) |
| Aggregation: Type-1 / Type-2 proofs | `crates/rec_aggregation/` (+ `crates/rec_aggregation/TYPE1_TYPE2_LAYOUT.md`) |
Expand All @@ -90,14 +95,14 @@ Paths are relative to the leanMultisig repo root, read at `main`.

## 4. How to use (implementing / reviewing / answering)

1. Read the **authoritative leanMultisig path at `main`** for the topic first.
1. Read the **authoritative leanVM path at `main`** for the topic first.
2. For the consensus containers carrying proofs, defer to the **leanSpec** skill.
3. In your output, cite the **leanMultisig path + the `main` commit SHA** you checked.
3. In your output, cite the **leanVM path + the `main` commit SHA** you checked.

## 5. Relationship to leanSpec & Verity

- **leanSpec** (separate skill) = consensus protocol spec & container shapes (Python).
- **leanMultisig** (this skill) = aggregation + zkVM (Rust); produces/verifies the proofs
- **leanVM** (this skill) = aggregation + zkVM (Rust); produces/verifies the proofs
that fill leanSpec's containers.
- Verity (Rust) wires both together: `verity-types` (leanSpec shapes) +
`verity-crypto` (leanMultisig + Generalized-XMSS). The client is pre-implementation today.
`verity-crypto` (leanVM + Generalized-XMSS). The client is pre-implementation today.
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Docs

on:
push:
branches: [main]
# develop = DEV (build only); main = PRD (build + deploy).
branches: [develop, main]
paths:
- "docs/**"
- ".github/workflows/docs.yml"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Quality

on:
push:
branches: [main]
# develop = DEV; main = PRD. Lint runs on both.
branches: [develop, main]
pull_request:
workflow_dispatch:
schedule:
Expand Down Expand Up @@ -45,7 +46,7 @@ jobs:
- name: Check links
uses: lycheeverse/lychee-action@v2
with:
args: "--no-progress docs/src README.md ARCHITECTURE.md DOMAIN_MODEL.md"
args: "--no-progress docs/src README.md ARCHITECTURE.md DOMAIN_MODEL.md STORAGE.md"
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Rust

on:
push:
branches: [main]
# develop = DEV; main = PRD. Checks run on both; nothing here deploys.
branches: [develop, main]
paths:
- "crates/**"
- "Cargo.toml"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Secret Scan

on:
push:
branches: [main]
# develop = DEV; main = PRD. The scan runs on both.
branches: [develop, main]
pull_request:
workflow_dispatch:

Expand Down
Loading
Loading