Skip to content

Commit 6e16e79

Browse files
feat(ethereum): add lighthouse as CL, remove goerli support (#1255)
1 parent a896ec8 commit 6e16e79

File tree

11 files changed

+343
-65
lines changed

11 files changed

+343
-65
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ This *Namespace* provides a suitable stack to operate Ethereum mainnet, göerli,
180180

181181
- [erigon](https://github.com/ledgerwatch/erigon)<br>
182182
Erigon is an implementation of Ethereum (execution client with light client for consensus layer), on the efficiency frontier.
183+
- [lighthouse](https://github.com/sigp/lighthouse)<br>
184+
An open-source Ethereum consensus client, written in Rust and maintained by Sigma Prime.
183185
- [nimbus](https://github.com/status-im/nimbus-eth2)<br>
184186
Nimbus-eth2 is an extremely efficient consensus layer (eth2) client implementation.
185187
- [proxyd](https://github.com/ethereum-optimism/optimism/tree/develop/proxyd)<br>

ethereum/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This *Namespace* provides a suitable stack to operate Ethereum mainnet, göerli,
99
## Releases
1010
- [erigon](https://github.com/ledgerwatch/erigon)<br>
1111
Erigon is an implementation of Ethereum (execution client with light client for consensus layer), on the efficiency frontier.
12+
- [lighthouse](https://github.com/sigp/lighthouse)<br>
13+
An open-source Ethereum consensus client, written in Rust and maintained by Sigma Prime.
1214
- [nimbus](https://github.com/status-im/nimbus-eth2)<br>
1315
Nimbus-eth2 is an extremely efficient consensus layer (eth2) client implementation.
1416
- [proxyd](https://github.com/ethereum-optimism/optimism/tree/develop/proxyd)<br>
@@ -117,10 +119,18 @@ erigon.labels | object | | Adds helmfile labels to this release |
117119
erigon.mergeValues | boolean | true | Merges passed values with namespace's defaults if true, overrides if false |
118120
erigon.resourceLabels | object | | Adds labels to resources on this release |
119121
erigon.values | (object *or* list of objects) | | Pass values to the release helm chart |
120-
features | list of strings | [nimbus, proxyd] | *enum of:&nbsp;&nbsp;(nimbus \| proxyd)* |
122+
features | list of strings | [proxyd] | *enum of:&nbsp;&nbsp;(nimbus \| lighthouse \| proxyd)* |
121123
flavor | string | | |
122124
kubeVersion | string | | Specifies the kubernetes API version, useful in helm templating environment |
123125
labels | object | | Adds helmfile labels to releases on this namespace |
126+
lighthouse | object | | |
127+
lighthouse.annotations | object | | Add annotations to resources on this release |
128+
lighthouse.chartUrl | string | | Override this release's chart URL (i.e: an absolute like /path/to/chart.tgz or /path/to/chart_dir. Or a remote like git::https://github.com/bitnami/charts.git@bitnami/apache?ref=main) |
129+
lighthouse.chartVersion | string | | Specify a specific chart version to use for this release |
130+
lighthouse.labels | object | | Adds helmfile labels to this release |
131+
lighthouse.mergeValues | boolean | true | Merges passed values with namespace's defaults if true, overrides if false |
132+
lighthouse.resourceLabels | object | | Adds labels to resources on this release |
133+
lighthouse.values | (object *or* list of objects) | | Pass values to the release helm chart |
124134
nimbus | object | | |
125135
nimbus.annotations | object | | Add annotations to resources on this release |
126136
nimbus.chartUrl | string | | Override this release's chart URL (i.e: an absolute like /path/to/chart.tgz or /path/to/chart_dir. Or a remote like git::https://github.com/bitnami/charts.git@bitnami/apache?ref=main) |
@@ -141,6 +151,7 @@ resourceLabels | object | | Adds labels to release resources on this namespace
141151
scaling | object | | ethereum scaling interface |
142152
scaling.deployments | integer | 1 | number of independent stateful sets to deploy |
143153
scaling.erigon | object | | |
154+
scaling.lighthouse | object | | |
144155
scaling.nimbus | object | | |
145156
scaling.startP2PPort | integer | | A beggining port for the range to use in P2P NodePorts |
146157
targetNamespace | string | eth-mainnet | the default is eth-<flavor> |

ethereum/helmfile.yaml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#namespace defaults
2-
{{ $_ := set .Values "_namespaceDefaults" ( `{"common":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}}},"flavor":"mainnet","mainnet":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-mainnet"},"goerli":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-goerli"},"holesky":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-holesky"},"sepolia":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-sepolia"}}` | fromJson ) }}
2+
{{ $_ := set .Values "_namespaceDefaults" ( `{"common":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}}},"flavor":"mainnet","mainnet":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-mainnet"},"holesky":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-holesky"},"sepolia":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-sepolia"}}` | fromJson ) }}
33
#set default flavor when missing
44
{{ if not ( hasKey .Values "flavor" ) }}
55
{{ $_ := set .Values "flavor" "mainnet" }}
@@ -188,6 +188,21 @@ templates:
188188
version: "0.6.1"
189189
{{- end }}
190190

191+
lighthouse:
192+
{{- if ( .Values | get "lighthouse" dict | get "chartUrl" false ) }}
193+
chart: {{ .Values | get "lighthouse" | get "chartUrl" }}
194+
{{- else }}
195+
chart: "graphops/lighthouse"
196+
{{- end }}
197+
inherit:
198+
- template: "defaults"
199+
{{- if ( .Values | get "lighthouse" dict | get "chartVersion" false ) }}
200+
version: {{ .Values | get "lighthouse" | get "chartVersion" }}
201+
{{- end }}
202+
{{- if (not (or ( .Values | get "lighthouse" dict | get "chartVersion" false ) ( .Values | get "lighthouse" dict | get "chartUrl" false ) )) }}
203+
version: "0.6.0"
204+
{{- end }}
205+
191206
proxyd:
192207
{{- if ( .Values | get "proxyd" dict | get "chartUrl" false ) }}
193208
chart: {{ .Values | get "proxyd" | get "chartUrl" }}
@@ -296,6 +311,53 @@ releases:
296311
{{- tpl $_tplReleaseValues (dict "Values" $.Values "canonicalRelease" $canonicalRelease "release" $release) | indent 4 -}}
297312
{{- end -}}
298313
{{- end -}}
314+
{{ if has "lighthouse" ( .Values | get "features" list ) }}
315+
{{- $canonicalRelease := "lighthouse" }}
316+
{{- range $index := until (.Values.scaling | get $canonicalRelease dict | get "deployments" .Values.scaling.deployments) }}
317+
{{- $deploymentIndex := (add . 1) }}
318+
{{- $release := (printf "%s%v" "lighthouse-" $deploymentIndex) }}
319+
{{- $_templatedValue_0 := $canonicalRelease }}
320+
{{- $_templatedValue_1 := $release }}
321+
{{- $_templatedValue_2 := $deploymentIndex }}
322+
{{- $_releaseResourceLabels := dict
323+
`app.launchpad.graphops.xyz/layer` `consensus`
324+
`app.launchpad.graphops.xyz/component` $_templatedValue_0
325+
`app.launchpad.graphops.xyz/release` $_templatedValue_1
326+
`app.launchpad.graphops.xyz/scalingIndex` $_templatedValue_2
327+
}}
328+
{{- $_releaseResourceLabels = mergeOverwrite $_commonLabels $_commonResourceLabels $_releaseResourceLabels }}
329+
- name: "{{ $release }}"
330+
inherit:
331+
- template: "{{ $canonicalRelease }}"
332+
labels:
333+
app.launchpad.graphops.xyz/layer: consensus
334+
app.launchpad.graphops.xyz/release: '{{ $release }}'
335+
app.launchpad.graphops.xyz/component: '{{ $canonicalRelease }}'
336+
app.launchpad.graphops.xyz/scalingIndex: '{{ $deploymentIndex }}'
337+
338+
{{- range $key,$value := ( $.Values | get $canonicalRelease dict | get "labels" dict ) }}
339+
{{ $key }}: {{ $value }}
340+
{{- $_ := set $_releaseResourceLabels $key $value }}
341+
{{- end }}
342+
{{- if (ne $release $canonicalRelease) }}
343+
{{- range $key,$value := ( $.Values | get $release dict | get "labels" dict ) }}
344+
{{ $key }}: {{ $value }}
345+
{{- $_ := set $_releaseResourceLabels $key $value }}
346+
{{- end }}
347+
{{- end }}
348+
{{- range $key,$value := ( $.Values | get $canonicalRelease dict | get "resourceLabels" dict ) }}
349+
{{- $_ := set $_releaseResourceLabels $key $value }}
350+
{{- end }}
351+
{{- if (ne $release $canonicalRelease) }}
352+
{{- range $key,$value := ( $.Values | get $release dict | get "resourceLabels" dict ) }}
353+
{{- $_ := set $_releaseResourceLabels $key $value }}
354+
{{- end }}
355+
{{- end }}
356+
{{- tpl $_tplTransforms (dict "Values" $.Values "release" $release "canonicalRelease" $canonicalRelease "resourceLabels" $_releaseResourceLabels ) | indent 4 -}}
357+
values:
358+
{{- tpl $_tplReleaseValues (dict "Values" $.Values "canonicalRelease" $canonicalRelease "release" $release) | indent 4 -}}
359+
{{- end -}}
360+
{{- end -}}
299361
{{ if has "proxyd" ( .Values | get "features" list ) }}
300362
{{- $canonicalRelease := "proxyd" }}
301363
{{- $release := "proxyd" }}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
lighthouse:
2+
{{ $scalingIndex := splitList "-" .Release.Name | last }}
3+
executionClientUrl: http://erigon-{{ $scalingIndex }}-stateful-node:8551
4+
jwt: {}
5+
# Generate me with: openssl rand -hex 32
6+
# Must match EL client jwt
7+
# fromLiteral: "XXX_CHANGEME_XXX"
8+
# Instead specifying the JWT in plain text using fromLiteral, you can also reference an existing Kubernetes Secret
9+
# existingSecret:
10+
# name: eth-goerli-jwt
11+
# key: jwt
12+
13+
# -- [PersistentVolumeClaimSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#persistentvolumeclaimspec-v1-core) for storage
14+
volumeClaimSpec:
15+
storageClassName: openebs-rawfile-localpv # change me if desired
16+
resources:
17+
requests:
18+
storage: 3Ti
19+
20+
affinityPresets:
21+
antiAffinityByHostname: false
22+
affinity:
23+
podAffinity:
24+
preferredDuringSchedulingIgnoredDuringExecution:
25+
- weight: 90 # try to schedule on same node as execution node if possible
26+
podAffinityTerm:
27+
topologyKey: "kubernetes.io/hostname"
28+
labelSelector:
29+
matchExpressions:
30+
- key: app.launchpad.graphops.xyz/component # release name
31+
operator: In
32+
values:
33+
- erigon
34+
- key: app.launchpad.graphops.xyz/scalingIndex
35+
operator: In
36+
values:
37+
- "{{ $scalingIndex }}"
38+
podAntiAffinity:
39+
preferredDuringSchedulingIgnoredDuringExecution:
40+
- weight: 25 # try to avoid scheduling with execution nodes for other chains
41+
podAffinityTerm:
42+
topologyKey: "kubernetes.io/hostname"
43+
namespaceSelector: {}
44+
labelSelector:
45+
matchExpressions:
46+
- key: app.launchpad.graphops.xyz/type
47+
operator: In
48+
values:
49+
- blockchain
50+
- key: app.launchpad.graphops.xyz/chain
51+
operator: NotIn
52+
values:
53+
- ethereum
54+
- key: app.launchpad.graphops.xyz/layer
55+
operator: In
56+
values:
57+
- execution
58+
- weight: 25 # try to avoid scheduling with execution nodes for other networks
59+
podAffinityTerm:
60+
topologyKey: "kubernetes.io/hostname"
61+
namespaceSelector: {}
62+
labelSelector:
63+
matchExpressions:
64+
- key: app.launchpad.graphops.xyz/type
65+
operator: In
66+
values:
67+
- blockchain
68+
- key: app.launchpad.graphops.xyz/chain
69+
operator: In
70+
values:
71+
- ethereum
72+
- key: app.launchpad.graphops.xyz/network
73+
operator: NotIn
74+
values:
75+
- "{{ .Values.flavor }}"
76+
- key: app.launchpad.graphops.xyz/layer
77+
operator: In
78+
values:
79+
- execution
80+
- weight: 10 # try to avoid scheduling with other consensus nodes for other chains
81+
podAffinityTerm:
82+
topologyKey: "kubernetes.io/hostname"
83+
namespaceSelector: {}
84+
labelSelector:
85+
matchExpressions:
86+
- key: app.launchpad.graphops.xyz/type
87+
operator: In
88+
values:
89+
- blockchain
90+
- key: app.launchpad.graphops.xyz/layer
91+
operator: In
92+
values:
93+
- consensus
94+
- key: app.launchpad.graphops.xyz/chain
95+
operator: NotIn
96+
values:
97+
- ethereum
98+
- weight: 10 # try to avoid scheduling with other consensus nodes for other networks
99+
podAffinityTerm:
100+
topologyKey: "kubernetes.io/hostname"
101+
namespaceSelector: {}
102+
labelSelector:
103+
matchExpressions:
104+
- key: app.launchpad.graphops.xyz/type
105+
operator: In
106+
values:
107+
- blockchain
108+
- key: app.launchpad.graphops.xyz/layer
109+
operator: In
110+
values:
111+
- consensus
112+
- key: app.launchpad.graphops.xyz/chain
113+
operator: In
114+
values:
115+
- ethereum
116+
- key: app.launchpad.graphops.xyz/network
117+
operator: NotIn
118+
values:
119+
- "{{ .Values.flavor }}"
120+
121+
{{- if (hasKey .Values.scaling "p2pStartPort") }}
122+
p2pHostPort:
123+
enabled: true
124+
port: {{ add (mul (sub $scalingIndex 1) 3) .Values.scaling.p2pStartPort 1 }}
125+
{{- end }}
126+
127+
prometheus:
128+
serviceMonitors:
129+
enabled: true
130+
131+
grafana:
132+
dashboards: true

ethereum/values/_common/nimbus.yaml.gotmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
nimbus:
22
{{ $scalingIndex := splitList "-" .Release.Name | last }}
33
executionClientUrl: http://erigon-{{ $scalingIndex }}-stateful-node:8551
4-
jwt:
4+
jwt: {}
55
# Generate me with: openssl rand -hex 32
66
# Must match EL client jwt
7-
fromLiteral: "XXX_CHANGEME_XXX"
7+
# fromLiteral: "XXX_CHANGEME_XXX"
88
# Instead specifying the JWT in plain text using fromLiteral, you can also reference an existing Kubernetes Secret
99
# existingSecret:
1010
# name: eth-goerli-jwt

ethereum/values/goerli/erigon.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

ethereum/values/goerli/nimbus.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
lighthouse:
2+
extraArgs:
3+
- --network=mainnet

0 commit comments

Comments
 (0)