From ec88a409c691b688dbde8ba6f79dfb730e5b7a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 23 Dec 2025 14:32:13 -0300 Subject: [PATCH 01/18] chore: add ethlambda to local devnet validator config --- local-devnet/genesis/validator-config.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/local-devnet/genesis/validator-config.yaml b/local-devnet/genesis/validator-config.yaml index d41cce7..536db17 100644 --- a/local-devnet/genesis/validator-config.yaml +++ b/local-devnet/genesis/validator-config.yaml @@ -48,7 +48,7 @@ validators: quic: 9004 metricsPort: 8084 count: 1 - + - name: "lighthouse_0" # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 # peer id 16Uiu2HAm7TYVs6qvDKnrovd9m4vvRikc4HPXm1WyLumKSe5fHxBv @@ -59,3 +59,15 @@ validators: quic: 9005 metricsPort: 8085 count: 1 + + # TODO: generate a new keypair for this + - name: "ethlambda_0" + # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 + # peer id 16Uiu2HAm7TYVs6qvDKnrovd9m4vvRikc4HPXm1WyLumKSe5fHxBv + privkey: "4fd22cf461fbeae4947a3fdaef8d533fc7fd1ef1ce4cd98e993210c18234df3f" + # verify /ip4/127.0.0.1/udp/9004/quic-v1/p2p/16Uiu2HAm7TYVs6qvDKnrovd9m4vvRikc4HPXm1WyLumKSe5fHxBv + enrFields: + ip: "127.0.0.1" + quic: 9006 + metricsPort: 8086 + count: 1 From 647b72812bbdf66b07bdb70b4a5d87142a7c1309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 23 Dec 2025 15:03:08 -0300 Subject: [PATCH 02/18] chore: add ethlambda to client-cmds --- client-cmds/ethlambda-cmd.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 client-cmds/ethlambda-cmd.sh diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh new file mode 100644 index 0000000..0bb913d --- /dev/null +++ b/client-cmds/ethlambda-cmd.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +#-----------------------ethlambda setup---------------------- + +binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" + +# Command when running as binary +node_binary="$binary_path" + +# Command when running as docker container +# TODO: fill in docker command +node_docker="--------------" + +node_setup="binary" From b90b2f06204ba93fc86385e58f64be36eb1fb9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 23 Dec 2025 18:41:34 -0300 Subject: [PATCH 03/18] chore: add genesis json flag --- client-cmds/ethlambda-cmd.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 0bb913d..35ad3de 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -5,7 +5,9 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary -node_binary="$binary_path" +node_binary="$binary_path \ + --custom-genesis-json-file \"$configDir/genesis.json\" \ +" # Command when running as docker container # TODO: fill in docker command From 5fa7d2e1fb0bbae475ffe1827f5fd00a9548d3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 5 Jan 2026 18:09:03 -0300 Subject: [PATCH 04/18] chore: add bootnodes-file option --- client-cmds/ethlambda-cmd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 35ad3de..922d0ae 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -7,6 +7,7 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary node_binary="$binary_path \ --custom-genesis-json-file \"$configDir/genesis.json\" \ + --bootnodes-file \"$configDir/nodes.yaml\" " # Command when running as docker container From 24c752a19bba2839e5f4f98cf762aba1f7b35876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 5 Jan 2026 18:20:43 -0300 Subject: [PATCH 05/18] chore: change to validators-file --- client-cmds/ethlambda-cmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 922d0ae..aee5031 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -7,7 +7,7 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary node_binary="$binary_path \ --custom-genesis-json-file \"$configDir/genesis.json\" \ - --bootnodes-file \"$configDir/nodes.yaml\" + --validators-file \"$configDir/nodes.yaml\" " # Command when running as docker container From 5727523539bba1d1a28ec1884532d299cb63f7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:16:18 -0300 Subject: [PATCH 06/18] feat: add gossipsub-port flag --- client-cmds/ethlambda-cmd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index aee5031..8903062 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -7,7 +7,8 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary node_binary="$binary_path \ --custom-genesis-json-file \"$configDir/genesis.json\" \ - --validators-file \"$configDir/nodes.yaml\" + --validators-file \"$configDir/nodes.yaml\" \ + --gossipsub-port $quicPort " # Command when running as docker container From adf2db9ddd38168f5b917b1eb726fba294cb9558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:16:34 -0300 Subject: [PATCH 07/18] feat: generate new privkey for validator --- local-devnet/genesis/validator-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local-devnet/genesis/validator-config.yaml b/local-devnet/genesis/validator-config.yaml index 536db17..5846565 100644 --- a/local-devnet/genesis/validator-config.yaml +++ b/local-devnet/genesis/validator-config.yaml @@ -63,9 +63,9 @@ validators: # TODO: generate a new keypair for this - name: "ethlambda_0" # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 - # peer id 16Uiu2HAm7TYVs6qvDKnrovd9m4vvRikc4HPXm1WyLumKSe5fHxBv - privkey: "4fd22cf461fbeae4947a3fdaef8d533fc7fd1ef1ce4cd98e993210c18234df3f" - # verify /ip4/127.0.0.1/udp/9004/quic-v1/p2p/16Uiu2HAm7TYVs6qvDKnrovd9m4vvRikc4HPXm1WyLumKSe5fHxBv + # peer id 16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 + privkey: "299550529a79bc2dce003747c52fb0639465c893e00b0440ac66144d625e066a" + # verify /ip4/127.0.0.1/udp/9006/quic-v1/p2p/16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 enrFields: ip: "127.0.0.1" quic: 9006 From c4c1275489ced7d4caae934bda17d7ff5e6901f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:16:46 -0300 Subject: [PATCH 08/18] fix: apply blockblaz/lean-quickstart#78 --- client-cmds/ream-cmd.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/client-cmds/ream-cmd.sh b/client-cmds/ream-cmd.sh index 2b01f61..0c5105d 100644 --- a/client-cmds/ream-cmd.sh +++ b/client-cmds/ream-cmd.sh @@ -1,11 +1,6 @@ #!/bin/bash #-----------------------ream setup---------------------- -devnet_flag="" -if [ -n "$devnet" ]; then - devnet_flag="--devnet $devnet" -fi - # Metrics enabled by default metrics_flag="--metrics" @@ -14,7 +9,6 @@ node_binary="$scriptDir/../ream/target/release/ream --data-dir $dataDir/$item \ lean_node \ --network $configDir/config.yaml \ --validator-registry-path $configDir/validators.yaml \ - $devnet_flag \ --bootnodes $configDir/nodes.yaml \ --node-id $item --node-key $configDir/$privKeyPath \ --socket-port $quicPort \ @@ -27,7 +21,6 @@ node_docker="ghcr.io/reamlabs/ream:latest --data-dir /data \ lean_node \ --network /config/config.yaml \ --validator-registry-path /config/validators.yaml \ - $devnet_flag \ --bootnodes /config/nodes.yaml \ --node-id $item --node-key /config/$privKeyPath \ --socket-port $quicPort \ From 526dcb6658fcab539755dd402cc0dd470960520c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:17:28 -0300 Subject: [PATCH 09/18] chore: remove stale TODO --- local-devnet/genesis/validator-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/local-devnet/genesis/validator-config.yaml b/local-devnet/genesis/validator-config.yaml index 5846565..0b7c875 100644 --- a/local-devnet/genesis/validator-config.yaml +++ b/local-devnet/genesis/validator-config.yaml @@ -60,7 +60,6 @@ validators: metricsPort: 8085 count: 1 - # TODO: generate a new keypair for this - name: "ethlambda_0" # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 # peer id 16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 From a1da7a69c5ae1bf9841fafceb6deb293ea8e9cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:34:18 -0300 Subject: [PATCH 10/18] Revert "fix: apply blockblaz/lean-quickstart#78" This reverts commit c4c1275489ced7d4caae934bda17d7ff5e6901f4. --- client-cmds/ream-cmd.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client-cmds/ream-cmd.sh b/client-cmds/ream-cmd.sh index 0c5105d..2b01f61 100644 --- a/client-cmds/ream-cmd.sh +++ b/client-cmds/ream-cmd.sh @@ -1,6 +1,11 @@ #!/bin/bash #-----------------------ream setup---------------------- +devnet_flag="" +if [ -n "$devnet" ]; then + devnet_flag="--devnet $devnet" +fi + # Metrics enabled by default metrics_flag="--metrics" @@ -9,6 +14,7 @@ node_binary="$scriptDir/../ream/target/release/ream --data-dir $dataDir/$item \ lean_node \ --network $configDir/config.yaml \ --validator-registry-path $configDir/validators.yaml \ + $devnet_flag \ --bootnodes $configDir/nodes.yaml \ --node-id $item --node-key $configDir/$privKeyPath \ --socket-port $quicPort \ @@ -21,6 +27,7 @@ node_docker="ghcr.io/reamlabs/ream:latest --data-dir /data \ lean_node \ --network /config/config.yaml \ --validator-registry-path /config/validators.yaml \ + $devnet_flag \ --bootnodes /config/nodes.yaml \ --node-id $item --node-key /config/$privKeyPath \ --socket-port $quicPort \ From 4ddbb3e303ac510966d2ce238ca99d28245e1e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Thu, 8 Jan 2026 17:40:46 -0300 Subject: [PATCH 11/18] chore: update flag for network config dir --- client-cmds/ethlambda-cmd.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 8903062..3e3aa3b 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -6,8 +6,7 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary node_binary="$binary_path \ - --custom-genesis-json-file \"$configDir/genesis.json\" \ - --validators-file \"$configDir/nodes.yaml\" \ + --custom-network-config-dir $configDir \ --gossipsub-port $quicPort " From e25b368389a63818f349bdcc84a9ab9ad12e7bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:53:29 -0300 Subject: [PATCH 12/18] feat: add new flags --- client-cmds/ethlambda-cmd.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 3e3aa3b..4401d36 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -7,8 +7,10 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" # Command when running as binary node_binary="$binary_path \ --custom-network-config-dir $configDir \ - --gossipsub-port $quicPort -" + --gossipsub-port $quicPort \ + --node-key $configDir/$item.key \ + --metrics-address 0.0.0.0 \ + --metrics-port $metricsPort" # Command when running as docker container # TODO: fill in docker command From 6510e678865457fd0a4e21227f4dae68e7870e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Wed, 14 Jan 2026 20:54:50 -0300 Subject: [PATCH 13/18] chore: change ports to avoid collision with grandine --- local-devnet/genesis/validator-config.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/local-devnet/genesis/validator-config.yaml b/local-devnet/genesis/validator-config.yaml index 80bd518..7f99d48 100644 --- a/local-devnet/genesis/validator-config.yaml +++ b/local-devnet/genesis/validator-config.yaml @@ -60,21 +60,21 @@ validators: metricsPort: 8085 count: 1 - - name: "ethlambda_0" - # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 - # peer id 16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 - privkey: "299550529a79bc2dce003747c52fb0639465c893e00b0440ac66144d625e066a" - # verify /ip4/127.0.0.1/udp/9006/quic-v1/p2p/16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 + - name: "grandine_0" + privkey: "64a7f5ab53907966374ca23af36392910af682eec82c12e3abbb6c2ccdf39a72" enrFields: ip: "127.0.0.1" quic: 9006 metricsPort: 8086 count: 1 - - name: "grandine_0" - privkey: "64a7f5ab53907966374ca23af36392910af682eec82c12e3abbb6c2ccdf39a72" + - name: "ethlambda_0" + # node id a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2 + # peer id 16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 + privkey: "299550529a79bc2dce003747c52fb0639465c893e00b0440ac66144d625e066a" + # verify /ip4/127.0.0.1/udp/9007/quic-v1/p2p/16Uiu2HAmPV5jU62WtmDkCEmfq1jzbBDkGbHNsDN78gJyvmv2TuC5 enrFields: ip: "127.0.0.1" - quic: 9006 - metricsPort: 8086 - count: 1 \ No newline at end of file + quic: 9007 + metricsPort: 8087 + count: 1 From a516fe41e57df44a56156c1072a392659cd29afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:20:02 -0300 Subject: [PATCH 14/18] feat: add docker command --- client-cmds/ethlambda-cmd.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 4401d36..e0c80d6 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -8,12 +8,18 @@ binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" node_binary="$binary_path \ --custom-network-config-dir $configDir \ --gossipsub-port $quicPort \ + --node-id $item \ --node-key $configDir/$item.key \ --metrics-address 0.0.0.0 \ --metrics-port $metricsPort" # Command when running as docker container -# TODO: fill in docker command -node_docker="--------------" +node_docker="ethlambda:latest \ + --custom-network-config-dir /config \ + --gossipsub-port $quicPort \ + --node-id $item \ + --node-key /config/$item.key \ + --metrics-address 0.0.0.0 \ + --metrics-port $metricsPort" -node_setup="binary" +node_setup="docker" From 04b8b62222ba78c1c40983a908fbe356dcdcb6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 19 Jan 2026 11:49:40 -0300 Subject: [PATCH 15/18] chore: update image name and binary path --- client-cmds/ethlambda-cmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index e0c80d6..6ad8f83 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -2,7 +2,7 @@ #-----------------------ethlambda setup---------------------- -binary_path="/Users/mega/lean_consensus/ethlambda/target/debug/ethlambda" +binary_path="$scriptDir/../ethlambda/target/release/ethlambda" # Command when running as binary node_binary="$binary_path \ @@ -14,7 +14,7 @@ node_binary="$binary_path \ --metrics-port $metricsPort" # Command when running as docker container -node_docker="ethlambda:latest \ +node_docker="ghcr.io/lambdaclass/ethlambda:latest \ --custom-network-config-dir /config \ --gossipsub-port $quicPort \ --node-id $item \ From 8169cbe40e4a13e68c243a70446abf0ef1c8da07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 19 Jan 2026 16:36:47 -0300 Subject: [PATCH 16/18] feat: add ansible changes --- ansible-devnet/genesis/validator-config.yaml | 8 ++ ansible/playbooks/deploy-single-node.yml | 12 ++- ansible/roles/ethlambda/defaults/main.yml | 7 ++ ansible/roles/ethlambda/tasks/main.yml | 100 +++++++++++++++++++ generate-ansible-inventory.sh | 4 +- run-ansible.sh | 2 +- 6 files changed, 129 insertions(+), 4 deletions(-) create mode 100644 ansible/roles/ethlambda/defaults/main.yml create mode 100644 ansible/roles/ethlambda/tasks/main.yml diff --git a/ansible-devnet/genesis/validator-config.yaml b/ansible-devnet/genesis/validator-config.yaml index d6c9dd2..4d7405c 100644 --- a/ansible-devnet/genesis/validator-config.yaml +++ b/ansible-devnet/genesis/validator-config.yaml @@ -66,4 +66,12 @@ validators: ip: "46.62.163.74" quic: 9001 metricsPort: 8081 + count: 1 + + - name: "ethlambda_0" + privkey: "299550529a79bc2dce003747c52fb0639465c893e00b0440ac66144d625e066a" + enrFields: + ip: "TBD" + quic: 9001 + metricsPort: 8081 count: 1 \ No newline at end of file diff --git a/ansible/playbooks/deploy-single-node.yml b/ansible/playbooks/deploy-single-node.yml index 39a7285..116a3e5 100644 --- a/ansible/playbooks/deploy-single-node.yml +++ b/ansible/playbooks/deploy-single-node.yml @@ -76,7 +76,15 @@ - grandine - deploy +- name: Deploy Ethlambda node + include_role: + name: ethlambda + when: client_type == "ethlambda" + tags: + - ethlambda + - deploy + - name: Fail if unknown client type fail: - msg: "Unknown client type '{{ client_type }}' for node '{{ node_name }}'. Expected: zeam, ream, qlean, lantern, lighthouse or grandine" - when: client_type not in ["zeam", "ream", "qlean", "lantern", "lighthouse", "grandine"] + msg: "Unknown client type '{{ client_type }}' for node '{{ node_name }}'. Expected: zeam, ream, qlean, lantern, lighthouse, grandine or ethlambda" + when: client_type not in ["zeam", "ream", "qlean", "lantern", "lighthouse", "grandine", "ethlambda"] diff --git a/ansible/roles/ethlambda/defaults/main.yml b/ansible/roles/ethlambda/defaults/main.yml new file mode 100644 index 0000000..fc8589d --- /dev/null +++ b/ansible/roles/ethlambda/defaults/main.yml @@ -0,0 +1,7 @@ +--- +# Default variables for ethlambda role +# Note: These are fallback defaults. Actual values are extracted from client-cmds/ethlambda-cmd.sh +# in the tasks/main.yml file. These defaults are used if extraction fails. + +ethlambda_docker_image: "ghcr.io/lambdaclass/ethlambda:latest" +deployment_mode: docker # docker or binary diff --git a/ansible/roles/ethlambda/tasks/main.yml b/ansible/roles/ethlambda/tasks/main.yml new file mode 100644 index 0000000..9b5b88c --- /dev/null +++ b/ansible/roles/ethlambda/tasks/main.yml @@ -0,0 +1,100 @@ +--- +# Ethlambda role: Deploy and manage Ethlambda nodes +# Converts client-cmds/ethlambda-cmd.sh logic to Ansible tasks + +- name: Extract docker image from client-cmd.sh + shell: | + # Extract the first word (docker image) from node_docker line + # playbook_dir points to ansible/playbooks, go up two levels to reach project root + project_root="$(cd '{{ playbook_dir }}/../..' && pwd)" + grep -E '^node_docker=' "$project_root/client-cmds/ethlambda-cmd.sh" | head -1 | sed -E 's/.*node_docker="([^ "]+).*/\1/' + register: ethlambda_docker_image_raw + changed_when: false + delegate_to: localhost + run_once: true + +- name: Extract deployment mode from client-cmd.sh + shell: | + # Extract the value from node_setup line + # playbook_dir points to ansible/playbooks, go up two levels to reach project root + project_root="$(cd '{{ playbook_dir }}/../..' && pwd)" + grep -E '^node_setup=' "$project_root/client-cmds/ethlambda-cmd.sh" | head -1 | sed -E 's/.*node_setup="([^"]+)".*/\1/' + register: ethlambda_deployment_mode_raw + changed_when: false + delegate_to: localhost + run_once: true + +- name: Set docker image and deployment mode from client-cmd.sh + set_fact: + ethlambda_docker_image: "{{ ethlambda_docker_image_raw.stdout | trim | default('ghcr.io/lambdaclass/ethlambda:latest') }}" + deployment_mode: "{{ ethlambda_deployment_mode_raw.stdout | trim | default('docker') }}" + +- name: Extract node configuration from validator-config.yaml + shell: | + yq eval ".validators[] | select(.name == \"{{ node_name }}\") | .{{ item }}" "{{ genesis_dir }}/validator-config.yaml" + register: ethlambda_node_config + changed_when: false + loop: + - enrFields.quic + - privkey + when: node_name is defined + +- name: Set node ports + set_fact: + ethlambda_quic_port: "{{ ethlambda_node_config.results[0].stdout }}" + ethlambda_metrics_port: "{{ ethlambda_node_config.results[1].stdout | default('8081') }}" + when: ethlambda_node_config is defined + +- name: Ensure node key file exists + stat: + path: "{{ genesis_dir }}/{{ node_name }}.key" + register: node_key_stat + +- name: Debug node key file check + debug: + msg: "Checking for key file at {{ genesis_dir }}/{{ node_name }}.key - exists: {{ node_key_stat.stat.exists | default('undefined') }}" + +- name: Fail if node key file is missing + fail: + msg: "Node key file {{ node_name }}.key not found in {{ genesis_dir }}" + when: not (node_key_stat.stat.exists | default(false)) + +- name: Clean node data directory + file: + path: "{{ data_dir }}/{{ node_name }}" + state: absent + when: clean_data | default(false) | bool + +- name: Create node data directory + file: + path: "{{ data_dir }}/{{ node_name }}" + state: directory + mode: '0755' + +- name: Deploy Ethlambda node using Docker + block: + - name: Stop existing Ethlambda container (if any) + command: docker rm -f {{ node_name }} + register: ethlambda_stop + failed_when: false + changed_when: ethlambda_stop.rc == 0 + + - name: Start Ethlambda container + command: >- + docker run -d + --pull=always + --name {{ node_name }} + --restart unless-stopped + --network host + -v {{ genesis_dir }}:/config:ro + -v {{ data_dir }}/{{ node_name }}:/data + {{ ethlambda_docker_image }} + --custom-network-config-dir /config + --gossipsub-port {{ ethlambda_quic_port }} + --node-id {{ node_name }} + --node-key /config/{{ node_name }}.key + --metrics-address 0.0.0.0 + --metrics-port {{ ethlambda_metrics_port }} + register: ethlambda_container + changed_when: ethlambda_container.rc == 0 + when: deployment_mode == 'docker' diff --git a/generate-ansible-inventory.sh b/generate-ansible-inventory.sh index c8bd385..e36044e 100755 --- a/generate-ansible-inventory.sh +++ b/generate-ansible-inventory.sh @@ -58,6 +58,8 @@ all: hosts: {} grandine_nodes: hosts: {} + ethlambda_nodes: + hosts: {} EOF # Extract node information from validator-config.yaml @@ -65,7 +67,7 @@ nodes=($(yq eval '.validators[].name' "$VALIDATOR_CONFIG")) # Process each node and generate inventory entries for node_name in "${nodes[@]}"; do - # Extract client type (zeam, ream, qlean, lantern, lighthouse, grandine) + # Extract client type (zeam, ream, qlean, lantern, lighthouse, grandine, ethlambda) IFS='_' read -r -a elements <<< "$node_name" client_type="${elements[0]}" group_name="${client_type}_nodes" diff --git a/run-ansible.sh b/run-ansible.sh index a613417..5f4eabd 100755 --- a/run-ansible.sh +++ b/run-ansible.sh @@ -58,7 +58,7 @@ fi # Update inventory with SSH key file and user if provided if command -v yq &> /dev/null; then # Get all remote host groups (zeam_nodes, ream_nodes, qlean_nodes, lantern_nodes, lighthouse_nodes) - for group in zeam_nodes ream_nodes qlean_nodes lantern_nodes lighthouse_nodes grandine_nodes; do + for group in zeam_nodes ream_nodes qlean_nodes lantern_nodes lighthouse_nodes grandine_nodes ethlambda_nodes; do # Get all hosts in this group hosts=$(yq eval ".all.children.$group.hosts | keys | .[]" "$INVENTORY_FILE" 2>/dev/null || echo "") for host in $hosts; do From 680867a26751b63f1507501f0af366b5a0906715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:00:59 -0300 Subject: [PATCH 17/18] fix: use metricsPort instead of privkey --- ansible/roles/ethlambda/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/ethlambda/tasks/main.yml b/ansible/roles/ethlambda/tasks/main.yml index 9b5b88c..3c063fa 100644 --- a/ansible/roles/ethlambda/tasks/main.yml +++ b/ansible/roles/ethlambda/tasks/main.yml @@ -36,13 +36,13 @@ changed_when: false loop: - enrFields.quic - - privkey + - metricsPort when: node_name is defined - name: Set node ports set_fact: ethlambda_quic_port: "{{ ethlambda_node_config.results[0].stdout }}" - ethlambda_metrics_port: "{{ ethlambda_node_config.results[1].stdout | default('8081') }}" + ethlambda_metrics_port: "{{ ethlambda_node_config.results[1].stdout }}" when: ethlambda_node_config is defined - name: Ensure node key file exists @@ -69,7 +69,7 @@ file: path: "{{ data_dir }}/{{ node_name }}" state: directory - mode: '0755' + mode: "0755" - name: Deploy Ethlambda node using Docker block: From fb7af24ac820a5c28944258004ac220582f4cbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 20 Jan 2026 18:18:27 -0300 Subject: [PATCH 18/18] chore: change docker image tag to "devnet1" --- ansible/roles/ethlambda/defaults/main.yml | 2 +- ansible/roles/ethlambda/tasks/main.yml | 2 +- client-cmds/ethlambda-cmd.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/roles/ethlambda/defaults/main.yml b/ansible/roles/ethlambda/defaults/main.yml index fc8589d..0305c15 100644 --- a/ansible/roles/ethlambda/defaults/main.yml +++ b/ansible/roles/ethlambda/defaults/main.yml @@ -3,5 +3,5 @@ # Note: These are fallback defaults. Actual values are extracted from client-cmds/ethlambda-cmd.sh # in the tasks/main.yml file. These defaults are used if extraction fails. -ethlambda_docker_image: "ghcr.io/lambdaclass/ethlambda:latest" +ethlambda_docker_image: "ghcr.io/lambdaclass/ethlambda:devnet1" deployment_mode: docker # docker or binary diff --git a/ansible/roles/ethlambda/tasks/main.yml b/ansible/roles/ethlambda/tasks/main.yml index 3c063fa..cae6b0b 100644 --- a/ansible/roles/ethlambda/tasks/main.yml +++ b/ansible/roles/ethlambda/tasks/main.yml @@ -26,7 +26,7 @@ - name: Set docker image and deployment mode from client-cmd.sh set_fact: - ethlambda_docker_image: "{{ ethlambda_docker_image_raw.stdout | trim | default('ghcr.io/lambdaclass/ethlambda:latest') }}" + ethlambda_docker_image: "{{ ethlambda_docker_image_raw.stdout | trim | default('ghcr.io/lambdaclass/ethlambda:devnet1') }}" deployment_mode: "{{ ethlambda_deployment_mode_raw.stdout | trim | default('docker') }}" - name: Extract node configuration from validator-config.yaml diff --git a/client-cmds/ethlambda-cmd.sh b/client-cmds/ethlambda-cmd.sh index 6ad8f83..a639bf5 100644 --- a/client-cmds/ethlambda-cmd.sh +++ b/client-cmds/ethlambda-cmd.sh @@ -14,7 +14,7 @@ node_binary="$binary_path \ --metrics-port $metricsPort" # Command when running as docker container -node_docker="ghcr.io/lambdaclass/ethlambda:latest \ +node_docker="ghcr.io/lambdaclass/ethlambda:devnet1 \ --custom-network-config-dir /config \ --gossipsub-port $quicPort \ --node-id $item \