client-cmds/nlean: switch to --custom-network-config-dir#166
Conversation
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.
| - 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" |
| - 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') }}" | ||
|
|
| - 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') }}" |
| # 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" | ||
|
|
| | `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 | |
d8d1713 to
71f9d24
Compare
nlean v0.3.10-devnet4 accepts a single --custom-network-config-dir flag that mirrors the shape ethlambda / gean / zeam already take — one path under which config.yaml, nodes.yaml, annotated_validators.yaml, hash-sig-keys/ and <node>.key are auto-discovered. Drops the bespoke --validator-config + --annotated-validators + --hash-sig-key-dir + --network combo in favour of the shared convention. --node-key continues to supply the libp2p secp256k1 identity (same pattern as gean/ethlambda/grandine/lantern).
71f9d24 to
6253f64
Compare
There was a problem hiding this comment.
Pull request overview
Updates the nlean client launch script to align with the “custom network config directory” pattern used by other clients, moving away from nlean-specific config inputs and relying on the shared genesis/topology directory produced by generate-genesis.sh.
Changes:
- Switch nlean binary invocation to use
--custom-network-config-dirinstead of--validator-config. - Switch nlean docker invocation to use
--custom-network-config-dirinstead of--validator-config. - Remove
--network(and other nlean-specific config flags) from both execution paths.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| node_binary="$binary_path \ | ||
| --validator-config $configDir/validator-config.yaml \ | ||
| --custom-network-config-dir $configDir \ | ||
| --node $item \ | ||
| --data-dir $dataDir/$item \ |
| --custom-network-config-dir $configDir \ | ||
| --node $item \ | ||
| --data-dir $dataDir/$item \ | ||
| --network $nlean_network_name \ | ||
| --node-key $configDir/$node_private_key_path \ |
Summary
nlean v0.3.10-devnet4 adds support for
--custom-network-config-dir— the single-flag convention that ethlambda / gean / zeam already follow. One path under which the binary auto-discoversconfig.yaml,nodes.yaml,annotated_validators.yaml,hash-sig-keys/, and<node>.key.This PR switches
client-cmds/nlean-cmd.shto the shared flag, dropping the bespoke--validator-config+--annotated-validators+--hash-sig-key-dir+--networkcombo.Locally verified with a 2nlean + 2ethlambda devnet (both using
--custom-network-config-dir) — reached finalization inside ~50 slots.Test plan
NETWORK_DIR=local-devnet-nlean ./spin-node.sh --node allboots nlean and produces/accepts blocks