Skip to content

Commit be3ab2f

Browse files
feat(deps)!: release erigon v3 (#509)
This is a breaking change and will require a re-sync, the good news is initial syncs are faster. Erigon v3 also defaults to using internal CL when available (Caplin), and that's recommended. Erigon v2 is officially discontinued and is not supported for Pectra, so everyone is advised to upgrade ahead of time (Pectra upgrade is scheduled for end of April) | datasource | package | from | to | | ---------- | ----------------- | ------- | ------ | | docker | erigontech/erigon | v2.61.3 | v3.0.0 | --------- Co-authored-by: graphops-renovate[bot] <135047802+graphops-renovate[bot]@users.noreply.github.com> Co-authored-by: Carlos Jorge <carlos@graphops.xyz>
1 parent 584ab3d commit be3ab2f

24 files changed

+157
-6310
lines changed

charts/erigon/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.10.14
18+
version: 0.11.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
2424
# renovate: image=erigontech/erigon
25-
appVersion: "v2.61.3"
25+
appVersion: "v3.0.0"

charts/erigon/README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Deploy and scale [Erigon](https://github.com/ledgerwatch/erigon) inside Kubernetes with ease
44

5-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.10.14](https://img.shields.io/badge/Version-0.10.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.61.3](https://img.shields.io/badge/AppVersion-v2.61.3-informational?style=flat-square)
5+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0](https://img.shields.io/badge/AppVersion-v3.0.0-informational?style=flat-square)
66

77
## Features
88

@@ -160,6 +160,16 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
160160
| serviceAccount.name | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | string | `""` |
161161
| statefulNode.affinity | | object | `{}` |
162162
| statefulNode.affinityPresets.antiAffinityByHostname | Configure anti-affinity rules to prevent multiple Erigon instances on the same host | bool | `true` |
163+
| statefulNode.beaconApi | Beacon API configuration for erigon3 | object | `{"addr":"0.0.0.0","api":"beacon,builder,config,debug,events,node,lighthouse","blobsArchive":true,"blobsNoPruning":true,"blocksArchive":true,"corsAllowMethods":"*","corsAllowOrigins":"*","enabled":true,"port":5555}` |
164+
| statefulNode.beaconApi.addr | Beacon API address to bind to | string | `"0.0.0.0"` |
165+
| statefulNode.beaconApi.api | Comma-separated list of API namespaces to enable | string | `"beacon,builder,config,debug,events,node,lighthouse"` |
166+
| statefulNode.beaconApi.blobsArchive | Enable blobs archive | bool | `true` |
167+
| statefulNode.beaconApi.blobsNoPruning | Disable blobs pruning | bool | `true` |
168+
| statefulNode.beaconApi.blocksArchive | Enable blocks archive | bool | `true` |
169+
| statefulNode.beaconApi.corsAllowMethods | CORS allow methods | string | `"*"` |
170+
| statefulNode.beaconApi.corsAllowOrigins | CORS allow origins | string | `"*"` |
171+
| statefulNode.beaconApi.enabled | Enable Beacon API | bool | `true` |
172+
| statefulNode.beaconApi.port | Beacon API port to expose | int | `5555` |
163173
| statefulNode.datadir | The path to the Erigon data directory | string | `"/storage"` |
164174
| statefulNode.extraArgs | Additional CLI arguments to pass to `erigon` | list | `[]` |
165175
| statefulNode.extraContainers | Additional containers to inject to this graph node group - an array of Container objects | list | `[]` |
@@ -176,15 +186,15 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
176186
| statefulNode.p2pNodePort.initContainer.image.pullPolicy | Container pull policy | string | `"IfNotPresent"` |
177187
| statefulNode.p2pNodePort.initContainer.image.repository | Container image to fetch nodeport information | string | `"lachlanevenson/k8s-kubectl"` |
178188
| statefulNode.p2pNodePort.initContainer.image.tag | Container tag | string | `"v1.25.4"` |
179-
| statefulNode.p2pNodePort.port | NodePort to be used. Must be unique. | int | `31000` |
189+
| statefulNode.p2pNodePort.port | Start NodePort to be used in a range (2 ports for protocol versions 68 and 67). Must be unique. | int | `31000` |
180190
| statefulNode.podAnnotations | Annotations for the `Pod` | object | `{}` |
181191
| statefulNode.podSecurityContext | Pod-wide security context | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` |
192+
| statefulNode.pruneMode | Sets the pruning mode to use (archive, validator, full) | string | `"archive"` |
182193
| statefulNode.readinessProbe | Sets a readinessProbe configuration for the container | object | `{}` |
183194
| statefulNode.resources | | object | `{}` |
184-
| statefulNode.restoreSnapshot.enabled | Enable initialising Erigon state from a remote snapshot | bool | `false` |
185-
| statefulNode.restoreSnapshot.snapshotUrl | URL for snapshot to download and extract to restore state | string | `""` |
186195
| statefulNode.rollingUpdatePartition | When using a RollingUpdate update strategy in the StatefulSet, sets a partition index to only update PODs with that index or higher | int | `0` |
187196
| statefulNode.service.ports.grpc-erigon | Service Port to expose Erigon GRPC interface on | int | `9090` |
197+
| statefulNode.service.ports.http-beaconapi | Service Port to expose Beacon API interface on | int | `5555` |
188198
| statefulNode.service.ports.http-engineapi | Service Port to expose engineAPI interface on | int | `8551` |
189199
| statefulNode.service.ports.http-jsonrpc | Service Port to expose JSON-RPC interface on | int | `8545` |
190200
| statefulNode.service.ports.http-metrics | Service Port to expose Prometheus metrics on | int | `6060` |

charts/erigon3/README.md renamed to charts/erigon/README.md.orig

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Erigon3 Helm Chart
1+
# Erigon Helm Chart
22

3-
Deploy and scale [Erigon3](https://github.com/ledgerwatch/erigon) inside Kubernetes with ease
3+
Deploy and scale [Erigon](https://github.com/ledgerwatch/erigon) inside Kubernetes with ease
44

5-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.0.1-canary.1](https://img.shields.io/badge/Version-0.0.1--canary.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v3.0.0](https://img.shields.io/badge/AppVersion-v3.0.0-informational?style=flat-square)
5+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.10.10](https://img.shields.io/badge/Version-0.10.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.60.10](https://img.shields.io/badge/AppVersion-v2.60.10-informational?style=flat-square)
66

77
## Features
88

@@ -13,15 +13,14 @@ Deploy and scale [Erigon3](https://github.com/ledgerwatch/erigon) inside Kuberne
1313
- Support for `ServiceMonitor`s to configure Prometheus to scrape metrics ([prometheus-operator](https://github.com/prometheus-operator/prometheus-operator))
1414
- Support for configuring Grafana dashboards for Erigon ([grafana](https://github.com/grafana/helm-charts/tree/main/charts/grafana))
1515
- Support for exposing a NodePort to enable inbound P2P dials for better peering
16-
- Support for Beacon API with configurable options for blocks and blobs archiving
1716

1817
## Quickstart
1918

2019
To install the chart with the release name `my-release`:
2120

2221
```console
2322
$ helm repo add graphops http://graphops.github.io/launchpad-charts
24-
$ helm install my-release graphops/erigon3
23+
$ helm install my-release graphops/erigon
2524
```
2625

2726
Once the release is installed, Erigon will begin syncing. You can use `kubectl logs` to monitor the sync status. See the Values section to install Prometheus `ServiceMonitor`s and a Grafana dashboard.
@@ -89,6 +88,24 @@ statefulNode:
8988
port: 31000 # Must be globally unique and available on the host
9089
```
9190

91+
## Restoring chaindata from a snapshot
92+
93+
You can specify a snapshot URL that will be used to restore Erigon's `chaindata` state. When enabled, an init container will perform a streaming extraction of the snapshot into storage. The snapshot should be a gzipped tarball of `chaindata`.
94+
95+
Example:
96+
```yaml
97+
# values.yaml
98+
99+
statefulNode:
100+
restoreSnapshot:
101+
enable: true
102+
snapshotUrl: https://matic-blockchain-snapshots.s3-accelerate.amazonaws.com/matic-mainnet/erigon-archive-snapshot-2022-07-15.tar.gz
103+
```
104+
105+
Once Erigon's state has been restored, the snapshot URL will be saved to storage at `/from_snapshot`. Any time the Erigon Pod starts, as long as the snapshot configuration has not changed, Erigon will boot with the existing state. If you modify the snapshot configuration, the init container will remove existing chaindata and restore state again.
106+
107+
You can monitor progress by following the logs of the `stateful-node-init` container: `kubectl logs --since 1m -f release-name-stateful-node-0 -c stateful-node-init`
108+
92109
## Upgrading
93110

94111
We recommend that you pin the version of the Chart that you deploy. You can use the `--version` flag with `helm install` and `helm upgrade` to specify a chart version constraint.
@@ -130,7 +147,7 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
130147
| rpcdaemon.extraLabels | Extra labels to attach to the Pod for matching against | object | `{}` |
131148
| rpcdaemon.nodeSelector | | object | `{}` |
132149
| rpcdaemon.podAnnotations | Annotations for the `Pod` | object | `{}` |
133-
| rpcdaemon.podSecurityContext | Pod-wide security context | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` |
150+
| rpcdaemon.podSecurityContext | Pod-wide security context | object | `{"fsGroup":101337,"runAsGroup":101337,"runAsNonRoot":true,"runAsUser":101337}` |
134151
| rpcdaemon.replicaCount | Number of replicas to run | int | `2` |
135152
| rpcdaemon.resources.limits | | object | `{}` |
136153
| rpcdaemon.resources.requests | Requests must be specified if you are using autoscaling | object | `{"cpu":"500m","memory":"4Gi"}` |
@@ -143,17 +160,6 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
143160
| serviceAccount.name | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | string | `""` |
144161
| statefulNode.affinity | | object | `{}` |
145162
| statefulNode.affinityPresets.antiAffinityByHostname | Configure anti-affinity rules to prevent multiple Erigon instances on the same host | bool | `true` |
146-
| statefulNode.beaconApi | Beacon API configuration for erigon3 | object | `{"addr":"0.0.0.0","api":"beacon,builder,config,debug,events,node,lighthouse","blobsArchive":true,"blobsNoPruning":true,"blocksArchive":true,"corsAllowMethods":"*","corsAllowOrigins":"*","enabled":false,"port":5555}` |
147-
| statefulNode.beaconApi.addr | Beacon API address to bind to | string | `"0.0.0.0"` |
148-
| statefulNode.beaconApi.api | Comma-separated list of API namespaces to enable | string | `"beacon,builder,config,debug,events,node,lighthouse"` |
149-
| statefulNode.beaconApi.blobsArchive | Enable blobs archive | bool | `true` |
150-
| statefulNode.beaconApi.blobsNoPruning | Disable blobs pruning | bool | `true` |
151-
| statefulNode.beaconApi.blocksArchive | Enable blocks archive | bool | `true` |
152-
| statefulNode.beaconApi.corsAllowMethods | CORS allow methods | string | `"*"` |
153-
| statefulNode.beaconApi.corsAllowOrigins | CORS allow origins | string | `"*"` |
154-
| statefulNode.beaconApi.enabled | Enable Beacon API | bool | `false` |
155-
| statefulNode.beaconApi.port | Beacon API port to expose | int | `5555` |
156-
| statefulNode.datadir | The path to the Erigon data directory | string | `"/storage"` |
157163
| statefulNode.extraArgs | Additional CLI arguments to pass to `erigon` | list | `[]` |
158164
| statefulNode.extraContainers | Additional containers to inject to this graph node group - an array of Container objects | list | `[]` |
159165
| statefulNode.extraInitContainers | Additional init containers to inject to this graph node group - an array of Container objects | list | `[]` |
@@ -171,20 +177,25 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
171177
| statefulNode.p2pNodePort.initContainer.image.tag | Container tag | string | `"v1.25.4"` |
172178
| statefulNode.p2pNodePort.port | NodePort to be used. Must be unique. | int | `31000` |
173179
| statefulNode.podAnnotations | Annotations for the `Pod` | object | `{}` |
174-
| statefulNode.podSecurityContext | Pod-wide security context | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` |
175-
| statefulNode.pruneMode | Sets the pruning mode to use (archive, validator, full) | string | `"archive"` |
180+
| statefulNode.podSecurityContext | Pod-wide security context | object | `{"fsGroup":101337,"runAsGroup":101337,"runAsNonRoot":true,"runAsUser":101337}` |
176181
| statefulNode.readinessProbe | Sets a readinessProbe configuration for the container | object | `{}` |
177182
| statefulNode.resources | | object | `{}` |
183+
| statefulNode.restoreSnapshot.enabled | Enable initialising Erigon state from a remote snapshot | bool | `false` |
184+
| statefulNode.restoreSnapshot.snapshotUrl | URL for snapshot to download and extract to restore state | string | `""` |
178185
| statefulNode.rollingUpdatePartition | When using a RollingUpdate update strategy in the StatefulSet, sets a partition index to only update PODs with that index or higher | int | `0` |
179186
| statefulNode.service.ports.grpc-erigon | Service Port to expose Erigon GRPC interface on | int | `9090` |
180-
| statefulNode.service.ports.http-beaconapi | Service Port to expose Beacon API interface on | int | `5555` |
181187
| statefulNode.service.ports.http-engineapi | Service Port to expose engineAPI interface on | int | `8551` |
182188
| statefulNode.service.ports.http-jsonrpc | Service Port to expose JSON-RPC interface on | int | `8545` |
183189
| statefulNode.service.ports.http-metrics | Service Port to expose Prometheus metrics on | int | `6060` |
184190
| statefulNode.service.ports.ws-rpc | Service Port to expose WS-RPC interface on | int | `8546` |
191+
<<<<<<< HEAD
185192
| statefulNode.service.publishNotReadyAddresses.headless | Toggle publishing not ready addresses for headless service | bool | `false` |
186193
| statefulNode.service.publishNotReadyAddresses.p2p | Toggle publishing not ready addresses for p2p service | bool | `false` |
187194
| statefulNode.service.topologyAwareRouting.enabled | Toggle for topology aware routing | bool | `false` |
195+
=======
196+
| statefulNode.service.publishNotReadyAddresses | Toggle publishing not ready addresses for headless and p2p services | object | `{"headless":false,"p2p":false}` |
197+
| statefulNode.service.topologyAwareRouting | Toggle for topology aware routing | object | `{"enabled":false}` |
198+
>>>>>>> b9a8fe9 (feat: add publishNotReadyAddresses toggle)
188199
| statefulNode.service.type | | string | `"ClusterIP"` |
189200
| statefulNode.startupProbe | Sets a startupProbe configuration for the container | object | `{}` |
190201
| statefulNode.terminationGracePeriodSeconds | Amount of time to wait before force-killing the Erigon process | int | `60` |

charts/erigon/templates/stateful-node/service.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,26 @@ spec:
6767
externalTrafficPolicy: Local
6868
publishNotReadyAddresses: {{ default false $values.service.publishNotReadyAddresses.p2p }}
6969
ports:
70-
- name: tcp-p2p
70+
- name: tcp-p2p-68
7171
port: {{ include "erigon.p2pPort" $values }}
7272
protocol: TCP
73-
targetPort: tcp-p2p
73+
targetPort: tcp-p2p-68
7474
nodePort: {{ $port }}
75-
- name: udp-p2p
75+
- name: udp-p2p-68
7676
port: {{ include "erigon.p2pPort" $values }}
7777
protocol: UDP
78-
targetPort: udp-p2p
78+
targetPort: udp-p2p-68
7979
nodePort: {{ $port }}
80+
- name: tcp-p2p-67
81+
port: {{ add (include "erigon.p2pPort" $values) 1 }}
82+
protocol: TCP
83+
targetPort: tcp-p2p-67
84+
nodePort: {{ add $port 1 }}
85+
- name: udp-p2p-67
86+
port: {{ add (include "erigon.p2pPort" $values) 1 }}
87+
protocol: UDP
88+
targetPort: udp-p2p-67
89+
nodePort: {{ add $port 1 }}
8090
selector:
8191
{{- include "erigon.selectorLabels" . | nindent 4 }}
8292
statefulset.kubernetes.io/pod-name: "{{ include "erigon.fullname" $ }}-{{ $componentName }}-0"
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
{{- $values := $.Values.statefulNode }}
22
{{- $componentName := "stateful-node" }}
3-
{{- $componentLabel := include "erigon3.componentLabelFor" $componentName }}
3+
{{- $componentLabel := include "erigon.componentLabelFor" $componentName }}
44
apiVersion: v1
55
kind: Service
66
metadata:
7-
name: {{ include "erigon3.fullname" . }}-{{ $componentName }}-headless
7+
name: {{ include "erigon.fullname" . }}-{{ $componentName }}-headless
88
labels:
9-
{{- include "erigon3.labels" . | nindent 4 }}
9+
{{- include "erigon.labels" . | nindent 4 }}
1010
{{- $componentLabel | nindent 4 }}
1111
spec:
1212
clusterIP: None # Headless service
13+
<<<<<<< HEAD
14+
# Allow the P2P Service to forward traffic even if the POD is not Ready
15+
# Usefull for ReadinessProbes that require synced state
16+
publishNotReadyAddresses: true
17+
=======
1318
publishNotReadyAddresses: {{ default false $values.service.publishNotReadyAddresses.headless }}
19+
>>>>>>> b9a8fe9 (feat: add publishNotReadyAddresses toggle)
1420
ports:
1521
{{- range $portName, $portNumber := $values.service.ports }}
1622
- port: {{ $portNumber }} # the port we expose on the Service, user configurable
@@ -19,7 +25,7 @@ spec:
1925
name: {{ $portName }}
2026
{{- end }}
2127
selector:
22-
{{- include "erigon3.selectorLabels" . | nindent 4 }}
28+
{{- include "erigon.selectorLabels" . | nindent 4 }}
2329
{{- $componentLabel | nindent 4 }}
2430
---
2531
apiVersion: v1
@@ -33,9 +39,9 @@ metadata:
3339
service.kubernetes.io/topology-aware-hints: "auto"
3440
{{- end }}
3541
{{- end }}
36-
name: {{ include "erigon3.fullname" . }}-{{ $componentName }}
42+
name: {{ include "erigon.fullname" . }}-{{ $componentName }}
3743
labels:
38-
{{- include "erigon3.labels" . | nindent 4 }}
44+
{{- include "erigon.labels" . | nindent 4 }}
3945
{{- $componentLabel | nindent 4 }}
4046
serviceMonitorTarget: "true" # Additional label to prevent matching the headless service above
4147
spec:
@@ -48,36 +54,36 @@ spec:
4854
name: {{ $portName }}
4955
{{- end }}
5056
selector:
51-
{{- include "erigon3.selectorLabels" . | nindent 4 }}
57+
{{- include "erigon.selectorLabels" . | nindent 4 }}
5258
{{- $componentLabel | nindent 4 }}
5359
{{- if $values.p2pNodePort.enabled }}
5460
{{- $port := $values.p2pNodePort.port }}
5561
---
5662
apiVersion: v1
5763
kind: Service
5864
metadata:
59-
name: {{ include "erigon3.fullname" . }}-{{ $componentName }}-p2p-0
65+
name: {{ include "erigon.fullname" . }}-{{ $componentName }}-p2p-0
6066
labels:
61-
{{- include "erigon3.labels" . | nindent 4 }}
67+
{{- include "erigon.labels" . | nindent 4 }}
6268
{{- $componentLabel | nindent 4 }}
63-
pod: {{ include "erigon3.fullname" . }}-{{ $componentName }}-0
69+
pod: {{ include "erigon.fullname" . }}-{{ $componentName }}-0
6470
type: p2p # this label is used by the initContainer to select this service
6571
spec:
6672
type: NodePort
6773
externalTrafficPolicy: Local
6874
publishNotReadyAddresses: {{ default false $values.service.publishNotReadyAddresses.p2p }}
6975
ports:
7076
- name: tcp-p2p
71-
port: {{ include "erigon3.p2pPort" $values }}
77+
port: {{ include "erigon.p2pPort" $values }}
7278
protocol: TCP
7379
targetPort: tcp-p2p
7480
nodePort: {{ $port }}
7581
- name: udp-p2p
76-
port: {{ include "erigon3.p2pPort" $values }}
82+
port: {{ include "erigon.p2pPort" $values }}
7783
protocol: UDP
7884
targetPort: udp-p2p
7985
nodePort: {{ $port }}
8086
selector:
81-
{{- include "erigon3.selectorLabels" . | nindent 4 }}
82-
statefulset.kubernetes.io/pod-name: "{{ include "erigon3.fullname" $ }}-{{ $componentName }}-0"
87+
{{- include "erigon.selectorLabels" . | nindent 4 }}
88+
statefulset.kubernetes.io/pod-name: "{{ include "erigon.fullname" $ }}-{{ $componentName }}-0"
8389
{{- end }}

0 commit comments

Comments
 (0)