Skip to content

Commit 7427cae

Browse files
committed
Merge PR #151: Improve helm commands and network migration
2 parents a144ed3 + 54bc95f commit 7427cae

File tree

7 files changed

+115
-37
lines changed

7 files changed

+115
-37
lines changed

charts/dv-pod/QUICKSTART.md

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Each operator deploys their node:
2020
```bash
2121
helm upgrade --install my-dv-pod charts/dv-pod/ \
2222
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
23-
--set chainId=1 \
23+
--set network=mainnet \
2424
--namespace=dv-pod \
2525
--timeout=10m --create-namespace
2626
```
@@ -122,7 +122,7 @@ Expected output: `["charon-enr-private-key", "enr"]`
122122
helm upgrade --install my-dv-pod charts/dv-pod/ \
123123
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
124124
--set charon.dkgSidecar.targetConfigHash=0xYOUR_CONFIG_HASH \
125-
--set chainId=1 \
125+
--set network=mainnet \
126126
--set 'charon.beaconNodeEndpoints[0]=http://YOUR_BEACON_NODE:5052' \
127127
--set charon.enr.existingSecret.name=charon-enr-private-key \
128128
--namespace=dv-pod \
@@ -156,16 +156,13 @@ kubectl exec -n dv-pod my-dv-pod-dv-pod-0 -- ls -la /charon-data/cluster-lock.js
156156

157157
```bash
158158
# Mainnet (default)
159-
--set chainId=1
159+
--set network=mainnet
160160

161161
# Sepolia testnet
162-
--set chainId=11155111
162+
--set network=sepolia
163163

164164
# Hoodi testnet
165-
--set chainId=560048
166-
167-
# Gnosis Chain
168-
--set chainId=100
165+
--set network=hoodi
169166
```
170167

171168
### Custom DKG Sidecar Image
@@ -198,8 +195,7 @@ kubectl exec -n dv-pod my-dv-pod-dv-pod-0 -- ls -la /charon-data/cluster-lock.js
198195
--set validatorClient.type=teku
199196

200197
# Prysm
201-
--set validatorClient.type=prysm \
202-
--set validatorClient.config.prysm.acceptTermsOfUse=true
198+
--set validatorClient.type=prysm
203199

204200
# Lodestar
205201
--set validatorClient.type=lodestar
@@ -293,6 +289,73 @@ kubectl port-forward -n dv-pod my-dv-pod-dv-pod-0 3620:3620
293289

294290
---
295291

292+
## Challenge & Testing Environments
293+
294+
For testing, development, or challenge environments, you may need to override the default API endpoint or use a specific DKG sidecar version.
295+
296+
### Override API Endpoint
297+
298+
To point to a different Obol API (e.g., dev, staging, or local):
299+
300+
```bash
301+
# Using development API
302+
helm upgrade --install my-dv-pod charts/dv-pod/ \
303+
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
304+
--set charon.dkgSidecar.apiEndpoint=https://obol-api-nonprod-dev.dev.obol.tech \
305+
--set network=hoodi \
306+
--namespace=dv-pod \
307+
--timeout=10m --create-namespace
308+
309+
# Using local API for development
310+
helm upgrade --install my-dv-pod charts/dv-pod/ \
311+
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
312+
--set charon.dkgSidecar.apiEndpoint=http://localhost:3000 \
313+
--set network=hoodi \
314+
--namespace=dv-pod \
315+
--timeout=10m --create-namespace
316+
```
317+
318+
### Use Specific DKG Sidecar Commit
319+
320+
To test with a specific DKG sidecar commit or branch:
321+
322+
```bash
323+
# Using a specific commit SHA
324+
helm upgrade --install my-dv-pod charts/dv-pod/ \
325+
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
326+
--set charon.dkgSidecar.image.tag=90a1656 \
327+
--set charon.dkgSidecar.image.pullPolicy=Always \
328+
--set network=hoodi \
329+
--namespace=dv-pod \
330+
--timeout=10m --create-namespace
331+
332+
### Complete Challenge Example
333+
334+
Full example combining custom API endpoint, specific DKG sidecar commit, and hoodi testnet:
335+
336+
```bash
337+
helm upgrade --install challenge-dv-pod charts/dv-pod/ \
338+
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS \
339+
--set network=hoodi \
340+
--set 'charon.fallbackBeaconNodeEndpoints[0]=https://ethereum-hoodi-beacon-api.publicnode.com' \
341+
--set charon.dkgSidecar.apiEndpoint=https://obol-api-nonprod-dev.dev.obol.tech \
342+
--set charon.dkgSidecar.image.tag=90a1656 \
343+
--set charon.dkgSidecar.image.pullPolicy=Always \
344+
--set validatorClient.type=prysm \
345+
--set centralMonitoring.enabled=true \
346+
--set-string centralMonitoring.token='YOUR_MONITORING_TOKEN' \
347+
--namespace=dv-pod \
348+
--timeout=10m --create-namespace
349+
```
350+
351+
**Key Parameters for Challenges:**
352+
- `network=hoodi` - Use Hoodi testnet for testing
353+
- `charon.dkgSidecar.apiEndpoint` - Point to dev/staging API
354+
- `charon.dkgSidecar.image.tag` - Specific commit SHA or branch name
355+
- `charon.dkgSidecar.image.pullPolicy=Always` - Force pull latest image
356+
357+
---
358+
296359
## Next Steps
297360

298361
After successful DKG:

charts/dv-pod/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ kubectl create secret generic validator-keys \
6666
kubectl create configmap cluster-lock --from-file=cluster/node0/cluster-lock.json
6767

6868
# Install the chart, referencing your ConfigMap and Secrets
69-
helm install my-dv-pod obol/dv-pod \
69+
helm upgrade --install my-dv-pod obol/dv-pod \
7070
--set configMaps.clusterLock=cluster-lock \
7171
--set validatorClient.keystores.secretName=validator-keys
7272
```
@@ -102,7 +102,7 @@ kubectl create configmap cluster-lock \
102102
--from-file=.charon/cluster-lock.json
103103

104104
# Install the chart
105-
helm install my-dv-pod obol/dv-pod \
105+
helm upgrade --install my-dv-pod obol/dv-pod \
106106
--set configMaps.clusterLock=cluster-lock \
107107
--set validatorClient.keystores.secretName=validator-keys
108108
```
@@ -119,7 +119,7 @@ If you don't have pre-existing artifacts, the chart can automatically:
119119

120120
Simply deploy the chart with your operator address:
121121
```sh
122-
helm install my-dv-pod obol/dv-pod \
122+
helm upgrade --install my-dv-pod obol/dv-pod \
123123
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS
124124
```
125125

@@ -168,13 +168,13 @@ validatorClient:
168168
- --suggested-fee-recipient=0xYOUR_FEE_RECIPIENT_ADDRESS
169169
```
170170
171-
With a `helm install` command for pre-existing artifacts.
171+
With a `helm upgrade --install` command for pre-existing artifacts.
172172

173173
```sh
174-
helm install my-dv-pod obol/dv-pod \
174+
helm upgrade --install my-dv-pod obol/dv-pod \
175175
--set configMaps.clusterLock=cluster-lock \
176176
--set validatorClient.keystores.secretName=validator-keys \
177-
--set validatorClient.type=prysm --set validatorClient.config.prysm.acceptTermsOfUse=true
177+
--set validatorClient.type=prysm
178178
```
179179

180180
> [!NOTE]
@@ -197,7 +197,7 @@ kubectl create secret generic validator-keys \
197197
--from-file=keystore-1.txt
198198
199199
# Deploy the chart with the keystore secret
200-
helm install my-dv-pod obol/dv-pod \
200+
helm upgrade --install my-dv-pod obol/dv-pod \
201201
--set validatorClient.keystores.secretName=validator-keys \
202202
--set configMaps.clusterLock=my-cluster-lock
203203
```
@@ -225,11 +225,11 @@ The ENR (Ethereum Node Record) secret **MUST** be created in the same namespace
225225
```bash
226226
# Wrong approach - secret and chart in different namespaces
227227
kubectl create secret generic charon-enr-private-key -n dv-pod --from-literal=...
228-
helm install my-dv-pod obol/dv-pod # Installs in default namespace - ENR will be regenerated!
228+
helm upgrade --install my-dv-pod obol/dv-pod # Installs in default namespace - ENR will be regenerated!
229229
230230
# Correct approach - both in same namespace
231231
kubectl create secret generic charon-enr-private-key -n dv-pod --from-literal=...
232-
helm install my-dv-pod obol/dv-pod -n dv-pod # Both in dv-pod namespace
232+
helm upgrade --install my-dv-pod obol/dv-pod -n dv-pod # Both in dv-pod namespace
233233
```
234234

235235
## Advanced Usage
@@ -276,7 +276,7 @@ In this case, you have two options:
276276

277277
2. Install the chart with the lockHash value:
278278
```sh
279-
helm install my-dv-pod obol/dv-pod \
279+
helm upgrade --install my-dv-pod obol/dv-pod \
280280
--set charon.lockHash=$LOCK_HASH \
281281
--set charon.operatorAddress=<YOUR_OPERATOR_ADDRESS>
282282
```
@@ -292,7 +292,7 @@ In this case, you have two options:
292292

293293
2. Install the chart referencing the ConfigMap:
294294
```sh
295-
helm install my-dv-pod obol/dv-pod \
295+
helm upgrade --install my-dv-pod obol/dv-pod \
296296
--set configMaps.lockHash=cluster-lock-hash \
297297
--set charon.operatorAddress=<YOUR_OPERATOR_ADDRESS>
298298
```
@@ -344,7 +344,7 @@ The command removes all the Kubernetes components associated with the chart and
344344
| charon.enr.privateKey | string | `""` | Provide the ENR private key directly (hex format, e.g., 0x...). If set, 'generate' and 'existingSecret' are ignored. |
345345
| charon.enrJob.enabled | bool | `true` | Enable or disable the Kubernetes Job that generates/manages the ENR. Note: This is typically not needed as the job automatically detects existing secrets. The job will check if the ENR secret already exists and skip generation if found. Only set to false for advanced use cases where you need to completely disable the job. |
346346
| charon.executionClientRpcEndpoint | string | `""` | Optional: Execution client RPC endpoint URL (e.g., your Ethereum execution client) Note: Charon currently only supports a single execution endpoint This is only needed if an operator in the cluster uses a smart contract wallet for an operator signature. If that does not apply to this cluster, this field can be left unset. |
347-
| charon.fallbackBeaconNodeEndpoints | list | `["https://ethereum-beacon-api.publicnode.com"]` | Fallback beacon node endpoints (optional) These will be used if the primary beaconNodeEndpoints are unavailable |
347+
| charon.fallbackBeaconNodeEndpoints | list | `["https://ethereum-beacon-api.publicnode.com"]` | Fallback beacon node endpoints (optional) These will be used if the primary beaconNodeEndpoints are unavailable If not specified, intelligent defaults based on network will be used: - mainnet: https://ethereum-beacon-api.publicnode.com - sepolia: https://ethereum-sepolia-beacon-api.publicnode.com - hoodi: https://ethereum-hoodi-beacon-api.publicnode.com |
348348
| charon.featureSet | string | `"stable"` | Minimum feature set to enable by default: alpha, beta, or stable. Warning: modify at own risk. (default "stable") |
349349
| charon.featureSetDisable | string | `""` | Comma-separated list of features to disable, overriding the default minimum feature set. |
350350
| charon.featureSetEnable | string | `""` | Comma-separated list of features to enable, overriding the default minimum feature set. |

charts/dv-pod/README.md.gotmpl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ kubectl create secret generic validator-keys \
6767
kubectl create configmap cluster-lock --from-file=cluster/node0/cluster-lock.json
6868
6969
# Install the chart, referencing your ConfigMap and Secrets
70-
helm install my-dv-pod obol/dv-pod \
70+
helm upgrade --install my-dv-pod obol/dv-pod \
7171
--set configMaps.clusterLock=cluster-lock \
7272
--set validatorClient.keystores.secretName=validator-keys
7373
```
@@ -103,7 +103,7 @@ kubectl create configmap cluster-lock \
103103
--from-file=.charon/cluster-lock.json
104104
105105
# Install the chart
106-
helm install my-dv-pod obol/dv-pod \
106+
helm upgrade --install my-dv-pod obol/dv-pod \
107107
--set configMaps.clusterLock=cluster-lock \
108108
--set validatorClient.keystores.secretName=validator-keys
109109
```
@@ -121,7 +121,7 @@ If you don't have pre-existing artifacts, the chart can automatically:
121121

122122
Simply deploy the chart with your operator address:
123123
```sh
124-
helm install my-dv-pod obol/dv-pod \
124+
helm upgrade --install my-dv-pod obol/dv-pod \
125125
--set charon.operatorAddress=0xYOUR_OPERATOR_ADDRESS
126126
```
127127

@@ -170,13 +170,13 @@ validatorClient:
170170
- --suggested-fee-recipient=0xYOUR_FEE_RECIPIENT_ADDRESS
171171
```
172172

173-
With a `helm install` command for pre-existing artifacts.
173+
With a `helm upgrade --install` command for pre-existing artifacts.
174174

175175
```sh
176-
helm install my-dv-pod obol/dv-pod \
176+
helm upgrade --install my-dv-pod obol/dv-pod \
177177
--set configMaps.clusterLock=cluster-lock \
178178
--set validatorClient.keystores.secretName=validator-keys \
179-
--set validatorClient.type=prysm --set validatorClient.config.prysm.acceptTermsOfUse=true
179+
--set validatorClient.type=prysm
180180
```
181181

182182
> [!NOTE]
@@ -199,7 +199,7 @@ kubectl create secret generic validator-keys \
199199
--from-file=keystore-1.txt
200200
201201
# Deploy the chart with the keystore secret
202-
helm install my-dv-pod obol/dv-pod \
202+
helm upgrade --install my-dv-pod obol/dv-pod \
203203
--set validatorClient.keystores.secretName=validator-keys \
204204
--set configMaps.clusterLock=my-cluster-lock
205205
```
@@ -227,11 +227,11 @@ The ENR (Ethereum Node Record) secret **MUST** be created in the same namespace
227227
```bash
228228
# Wrong approach - secret and chart in different namespaces
229229
kubectl create secret generic charon-enr-private-key -n dv-pod --from-literal=...
230-
helm install my-dv-pod obol/dv-pod # Installs in default namespace - ENR will be regenerated!
230+
helm upgrade --install my-dv-pod obol/dv-pod # Installs in default namespace - ENR will be regenerated!
231231
232232
# Correct approach - both in same namespace
233233
kubectl create secret generic charon-enr-private-key -n dv-pod --from-literal=...
234-
helm install my-dv-pod obol/dv-pod -n dv-pod # Both in dv-pod namespace
234+
helm upgrade --install my-dv-pod obol/dv-pod -n dv-pod # Both in dv-pod namespace
235235
```
236236

237237
## Advanced Usage
@@ -278,7 +278,7 @@ In this case, you have two options:
278278

279279
2. Install the chart with the lockHash value:
280280
```sh
281-
helm install my-dv-pod obol/dv-pod \
281+
helm upgrade --install my-dv-pod obol/dv-pod \
282282
--set charon.lockHash=$LOCK_HASH \
283283
--set charon.operatorAddress=<YOUR_OPERATOR_ADDRESS>
284284
```
@@ -294,7 +294,7 @@ In this case, you have two options:
294294

295295
2. Install the chart referencing the ConfigMap:
296296
```sh
297-
helm install my-dv-pod obol/dv-pod \
297+
helm upgrade --install my-dv-pod obol/dv-pod \
298298
--set configMaps.lockHash=cluster-lock-hash \
299299
--set charon.operatorAddress=<YOUR_OPERATOR_ADDRESS>
300300
```

charts/dv-pod/templates/_helpers.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,20 @@ Create comma-separated list of primary beacon node endpoints
141141

142142
{{/*
143143
Create comma-separated list of fallback beacon node endpoints
144+
Returns user-specified endpoints or intelligent defaults based on network
144145
*/}}
145146
{{- define "dv-pod.fallbackBeaconNodeEndpoints" -}}
146147
{{- if .Values.charon.fallbackBeaconNodeEndpoints -}}
147148
{{- join "," .Values.charon.fallbackBeaconNodeEndpoints -}}
149+
{{- else -}}
150+
{{- $network := .Values.network -}}
151+
{{- if eq $network "mainnet" -}}
152+
https://ethereum-beacon-api.publicnode.com
153+
{{- else if eq $network "sepolia" -}}
154+
https://ethereum-sepolia-beacon-api.publicnode.com
155+
{{- else if eq $network "hoodi" -}}
156+
https://ethereum-hoodi-beacon-api.publicnode.com
157+
{{- end -}}
148158
{{- end -}}
149159
{{- end -}}
150160

charts/dv-pod/templates/statefulset.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,9 @@ spec:
517517
{{- if and .Values.charon.beaconNodeHeaders (not .Values.charon.beaconNodeHeadersSecretName) }}
518518
--beacon-node-headers={{ .Values.charon.beaconNodeHeaders | quote }}
519519
{{- end }}
520-
{{- if .Values.charon.fallbackBeaconNodeEndpoints }}
521-
--fallback-beacon-node-endpoints={{ include "dv-pod.fallbackBeaconNodeEndpoints" . }}
520+
{{- $fallbackEndpoints := include "dv-pod.fallbackBeaconNodeEndpoints" . }}
521+
{{- if $fallbackEndpoints }}
522+
--fallback-beacon-node-endpoints={{ $fallbackEndpoints }}
522523
{{- end }}
523524
{{- if .Values.charon.lockFile }}
524525
--lock-file={{ .Values.charon.lockFile }}

charts/dv-pod/values-examples/with-target-config-hash.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ charon:
4242
retryDelayFactor: 2
4343

4444
# Other standard configurations
45-
chainId: "11155111" # Sepolia
45+
network: sepolia

charts/dv-pod/values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ charon:
4646

4747
# -- Fallback beacon node endpoints (optional)
4848
# These will be used if the primary beaconNodeEndpoints are unavailable
49+
# If not specified, intelligent defaults based on network will be used:
50+
# - mainnet: https://ethereum-beacon-api.publicnode.com
51+
# - sepolia: https://ethereum-sepolia-beacon-api.publicnode.com
52+
# - hoodi: https://ethereum-hoodi-beacon-api.publicnode.com
4953
fallbackBeaconNodeEndpoints:
50-
# Example:
54+
# Example for custom fallback endpoints:
5155
- "https://ethereum-beacon-api.publicnode.com"
5256
# - "http://backup-beacon-2:5052"
5357

0 commit comments

Comments
 (0)