client-cmds/nlean: switch to --annotated-validators#166
Open
GrapeBaBa wants to merge 1 commit intoblockblaz:mainfrom
Open
client-cmds/nlean: switch to --annotated-validators#166GrapeBaBa wants to merge 1 commit intoblockblaz:mainfrom
GrapeBaBa wants to merge 1 commit intoblockblaz:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the quickstart tooling for devnet4-era inputs by switching nlean to consume the shared annotated_validators.yaml, extending hash-sig handling for dual-key manifests, and improving multi-subnet and Ansible deployment ergonomics (inventory, prepare behavior, and network labeling).
Changes:
- Switch nlean (binary + Docker) from
--validator-configto--annotated-validators, and from--networkto--fork-digest. - Add devnet4 dual-key hash-sig manifest support (generator + env parsing) and propagate committee count into
config.yaml. - Improve
--subnetsbehavior (expanded config naming, shared-host templates) and Ansible prepare inventory deduplication.
Reviewed changes
Copilot reviewed 40 out of 41 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| spin-node.sh | Require --network for Ansible, rename subnet-expanded output, refine aggregator selection logic. |
| run-ansible.sh | Add prepare-specific deduped inventory support; pass absolute validator-config path to Ansible. |
| parse-vc.sh | Add dual-key hash-sig key export variables and legacy fallback. |
| parse-env.sh | Remove defaulting of networkName (now handled in spin-node.sh). |
| local-devnet/genesis/validator-config.yaml | Set attestation_committee_count and update comment. |
| generate-subnet-config.py | Add shared-host mode and modernize validation/expansion logic. |
| generate-genesis.sh | Update hash-sig-cli image to devnet4; support dual-key manifests; write committee count to config; generate dual-key GENESIS_VALIDATORS format. |
| generate-ansible-inventory.sh | Generate additional hosts-prepare.yml with one host per unique IP. |
| docs/adding-a-new-client.md | Document devnet4 changes for config and annotated validators; update key file naming. |
| client-cmds/zeam-cmd.sh | Bump Docker image tag to devnet4 and adjust comment. |
| client-cmds/ream-cmd.sh | Bump Docker image tag to latest-devnet4. |
| client-cmds/qlean-cmd.sh | Bump Docker image tags to devnet-4; add dual-key-aware hash-sig JSON path selection. |
| client-cmds/peam-cmd.sh | Bump Docker image tag to devnet4 and keep override logic working. |
| client-cmds/nlean-cmd.sh | Switch to --annotated-validators and --fork-digest; bump image to devnet4. |
| client-cmds/grandine-cmd.sh | Bump Docker image tag to devnet-4. |
| client-cmds/gean-cmd.sh | Bump Docker image tag to devnet4. |
| client-cmds/ethlambda-cmd.sh | Bump Docker image tag to devnet4. |
| ansible/roles/zeam/tasks/main.yml | Update zeam fallback image default. |
| ansible/roles/zeam/defaults/main.yml | Update zeam default image and related comment. |
| ansible/roles/ream/tasks/main.yml | Update ream fallback image default. |
| ansible/roles/ream/defaults/main.yml | Update ream default image. |
| ansible/roles/qlean/tasks/main.yml | Update qlean fallback image default. |
| ansible/roles/qlean/defaults/main.yml | Update qlean default image. |
| ansible/roles/peam/tasks/main.yml | Update peam fallback image default. |
| ansible/roles/peam/defaults/main.yml | Update peam default image. |
| ansible/roles/nlean/tasks/main.yml | Update nlean fallback image default. |
| ansible/roles/nlean/defaults/main.yml | Update nlean default image. |
| ansible/roles/grandine/tasks/main.yml | Update grandine fallback image default. |
| ansible/roles/grandine/defaults/main.yml | Update grandine default image. |
| ansible/roles/genesis/tasks/main.yml | Add ATTESTATION_COMMITTEE_COUNT to generated config.yaml. |
| ansible/roles/gean/tasks/main.yml | Update gean fallback image default. |
| ansible/roles/gean/defaults/main.yml | Update gean default image. |
| ansible/roles/ethlambda/tasks/main.yml | Update ethlambda fallback image default. |
| ansible/roles/ethlambda/defaults/main.yml | Update ethlambda default image. |
| ansible/playbooks/prepare.yml | Document prepare inventory deduplication; update expanded-config filename reference. |
| ansible-devnet/genesis/validator-config.yaml | Update example topology to multi-subnet style and set committee count. |
| ansible-devnet/genesis/validator-config-expanded.yaml | Add reference expanded config example file. |
| ansible-devnet/genesis/test-validator-config.yaml | Add shared-host-style test template for subnet expansion. |
| TESTING_DEVNET3.md | Clarify committee count behavior and documentation. |
| README.md | Update docs for prepare allowed flags, subnets behavior/modes, devnet4 dual-key outputs, and config formats. |
| .gitignore | Ignore prepare inventory file and additional generated directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
37
to
46
| - name: Generate config.yaml | ||
| copy: | ||
| content: | | ||
| # Genesis Settings | ||
| GENESIS_TIME: {{ genesis_time }} | ||
| # Chain Settings | ||
| ATTESTATION_COMMITTEE_COUNT: 1 | ||
| # Validator Settings | ||
| VALIDATOR_COUNT: {{ total_validators }} | ||
| dest: "{{ genesis_dir }}/config.yaml" |
Comment on lines
23
to
27
| - name: Set docker image and deployment mode from client-cmd.sh | ||
| set_fact: | ||
| nlean_docker_image: "{{ nlean_docker_image_raw.stdout | trim | default('ghcr.io/nleaneth/nlean:latest') }}" | ||
| nlean_docker_image: "{{ nlean_docker_image_raw.stdout | trim | default('ghcr.io/nleaneth/nlean:devnet4') }}" | ||
| deployment_mode: "{{ nlean_deployment_mode_raw.stdout | trim | default('docker') }}" | ||
|
|
Comment on lines
25
to
28
| - name: Set docker image and deployment mode from client-cmd.sh | ||
| set_fact: | ||
| qlean_docker_image: "{{ qlean_docker_image_raw.stdout | trim | default('qdrvm/qlean-mini:latest') }}" | ||
| qlean_docker_image: "{{ qlean_docker_image_raw.stdout | trim | default('qdrvm/qlean-mini:devnet-4-amd64') }}" | ||
| deployment_mode: "{{ qlean_deployment_mode_raw.stdout | trim | default('docker') }}" |
Comment on lines
+97
to
+104
| # devnet4+: separate proposer + attester keys (hash-sig-cli); legacy: single pk/sk per index | ||
| _proposer_pk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_proposer_key_pk.json" | ||
| _proposer_sk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_proposer_key_sk.json" | ||
| _attester_pk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_attester_key_pk.json" | ||
| _attester_sk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_attester_key_sk.json" | ||
| _legacy_pk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_pk.json" | ||
| _legacy_sk="$configDir/hash-sig-keys/validator_${hashSigKeyIndex}_sk.json" | ||
|
|
Comment on lines
+215
to
+218
| | `genesis.json` | Genesis state (JSON) | | ||
| | `genesis.ssz` | Genesis state (SSZ) | | ||
| | `hash-sig-keys/validator_N_sk.ssz` | Post-quantum secret key for validator N | | ||
| | `hash-sig-keys/validator_N_pk.ssz` | Post-quantum public key for validator N | | ||
| | `hash-sig-keys/validator_N_attester_key_{sk,pk}.ssz` | Post-quantum attester secret/public key for validator N | | ||
| | `hash-sig-keys/validator_N_proposer_key_{sk,pk}.ssz` | Post-quantum proposer secret/public key for validator N | |
nlean v0.3.6-devnet4 accepts the shared annotated_validators.yaml topology file that ethlambda / gean / grandine / lantern already use. generate-genesis.sh already writes annotated_validators.yaml, so pointing nlean at that file keeps all lean clients on a single input format. --node-key continues to carry the libp2p secp256k1 identity (same pattern as gean/ethlambda/grandine/lantern).
d8d1713 to
71f9d24
Compare
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.
Summary
--annotated-validatorsCLI flag that consumes the sharedannotated_validators.yamlalready produced bygenerate-genesis.shclient-cmds/nlean-cmd.sh(both binary + docker entry paths) off the nlean-specificvalidator-config.yamland onto the same topology input used by ethlambda / gean / grandine / lantern--node-keycontinues to supply the libp2p secp256k1 identity (matches the pattern already in gean-cmd.sh / ethlambda-cmd.sh / grandine-cmd.sh / lantern-cmd.sh)Test plan
NETWORK_DIR=local-devnet-nlean ./spin-node.sh --node allboots nlean and produces/accepts blocksNETWORK_DIR=local-devnet-interop ./spin-node.sh --node nlean_0interops with zeam