Skip to content

Commit ac54e58

Browse files
committed
docs(dv-pod): improve Helm commands and migrate to network parameter
This commit includes several documentation and usability improvements: 1. Migrate from chainId to network parameter (breaking change) - Replace all chainId references with network parameter in docs - Update QUICKSTART.md examples: chainId=1 → network=mainnet - Update values-examples to use network instead of chainId - Templates already supported network-based helpers 2. Update all Helm commands to use 'helm upgrade --install' - Updated 8+ instances in README.md - Provides idempotent commands for both install and upgrade scenarios - Better user experience and less confusion 3. Add Challenge & Testing documentation - New comprehensive section in QUICKSTART.md - Examples for overriding API endpoints (dev/staging) - Examples for using specific DKG sidecar commits/branches - Complete challenge example with all parameters - Helpful for testing and development workflows 4. Implement intelligent fallback beacon node endpoints - Auto-select publicnode.com endpoints based on network - mainnet → ethereum-beacon-api.publicnode.com - sepolia → ethereum-sepolia-beacon-api.publicnode.com - hoodi → ethereum-hoodi-beacon-api.publicnode.com - Pods can now start without manual fallback configuration - Users can still override with custom endpoints Files modified: - charts/dv-pod/QUICKSTART.md - charts/dv-pod/README.md - charts/dv-pod/README.md.gotmpl - charts/dv-pod/templates/_helpers.tpl - charts/dv-pod/templates/statefulset.yaml - charts/dv-pod/values-examples/with-target-config-hash.yaml - charts/dv-pod/values.yaml BREAKING CHANGE: Users must now use --set network=mainnet instead of --set chainId=1
1 parent 47e7703 commit ac54e58

File tree

7 files changed

+104
-26
lines changed

7 files changed

+104
-26
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: 11 additions & 11 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
```

charts/dv-pod/README.md.gotmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ With a `helm install` command for pre-existing artifacts.
176176
helm 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]

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)