Skip to content

Commit

Permalink
[geth] pre-release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VladStarr committed Sep 26, 2023
1 parent f4c111b commit 0b35483
Show file tree
Hide file tree
Showing 23 changed files with 775 additions and 611 deletions.
33 changes: 15 additions & 18 deletions dysnix/geth/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apiVersion: v2
appVersion: v1.11.4
description: Official Go implementation of the Ethereum protocol
home: https://geth.ethereum.org
icon: https://geth.ethereum.org/static/images/ethereum.png
keywords:
- geth
- cryptocurrency
- blockchain
maintainers:
- email: daniel@dysnix.com
name: daniel-yavorovich
- email: av@dysnix.com
name: voron
- email: vd@dysnix.com
name: vladstarr
name: geth
description: Go-ethereum blockchain node Helm Chart

version: 1.0.0
appVersion: v1.13.1

keywords:
- geth
- cryptocurrency
- blockchain

sources:
- https://github.com/dysnix/charts
- https://github.com/ethereum/go-ethereum
version: 0.5.0
- https://github.com/dysnix/charts

maintainers:
- name: VladStarr
email: vlad.derigin@dysnix.com
84 changes: 0 additions & 84 deletions dysnix/geth/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions dysnix/geth/templates/NOTES.txt

This file was deleted.

116 changes: 116 additions & 0 deletions dysnix/geth/templates/_config.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{{- with .Values.config.eth -}}
[Eth]
SyncMode = {{ .syncMode | quote }}
EthDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]
SnapDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]
NoPruning = {{ eq .gcMode "archive" | ternary true false }}
NoPrefetch = false
TxLookupLimit = {{ int .txLookupLimit }}
TransactionHistory = {{ int .transactionHistory }}
StateHistory = {{ int .stateHistory }}
StateScheme = {{ .stateScheme | quote }}
LightPeers = 100
DatabaseCache = 512
DatabaseFreezer = ""
TrieCleanCache = 154
TrieDirtyCache = 256
TrieTimeout = 3600000000000
SnapshotCache = 102
Preimages = {{ .preimages }}
FilterLogCacheSize = 32
EnablePreimageRecording = false
RPCGasCap = 50000000
RPCEVMTimeout = 5000000000
RPCTxFeeCap = 1e+00
{{- end }}

[Eth.Miner]
GasFloor = 0
GasCeil = 30000000
GasPrice = 1000000000
Recommit = 2000000000
NewPayloadTimeout = 2000000000

[Eth.TxPool]
Locals = []
NoLocals = false
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 1
PriceBump = 10
AccountSlots = 16
GlobalSlots = 5120
AccountQueue = 64
GlobalQueue = 1024
Lifetime = 10800000000000

[Eth.BlobPool]
Datadir = "blobpool"
Datacap = 10737418240
PriceBump = 100

[Eth.GPO]
Blocks = 20
Percentile = 60
MaxHeaderHistory = 1024
MaxBlockHistory = 1024
MaxPrice = 500000000000
IgnorePrice = 2

{{- with .Values.config.node }}
[Node]
DataDir = "/root/.ethereum"
IPCPath = {{ .ipc.enabled | ternary .ipc.path "" | quote }}
HTTPHost = {{ .http.enabled | ternary "0.0.0.0" "" | quote }}
HTTPPort = {{ .http.port }}
HTTPVirtualHosts = {{ include "geth.tomlList" .http.vhosts }}
HTTPModules = {{ include "geth.tomlList" .http.modules }}
HTTPCors = {{ include "geth.tomlList" .http.cors }}
AuthAddr = "0.0.0.0"
AuthPort = {{ .authrpc.port }}
AuthVirtualHosts = {{ include "geth.tomlList" .authrpc.vhosts }}
WSHost = {{ .ws.enabled | ternary "0.0.0.0" "" | quote }}
WSPort = {{ .ws.port }}
WSModules = {{ include "geth.tomlList" .ws.modules }}
WSOrigins = {{ include "geth.tomlList" .ws.origins }}
GraphQLVirtualHosts = ["localhost"]
BatchRequestLimit = 1000
BatchResponseMaxSize = 25000000
JWTSecret = "/secrets/jwt.hex"
{{- end }}

{{- with .Values.config.node.p2p }}
[Node.P2P]
MaxPeers = {{ int .maxPeers }}
NoDiscovery = {{ .noDiscovery }}
DiscoveryV4 = true
BootstrapNodes = {{ include "geth.tomlList" .bootstrapNodes }}
BootstrapNodesV5 = {{ include "geth.tomlList" .bootstrapNodesV5 }}
StaticNodes = {{ include "geth.tomlList" .staticNodes }}
TrustedNodes = {{ include "geth.tomlList" .trustedNodes }}
ListenAddr = ":{{ .port }}"
DiscAddr = ""
EnableMsgEvents = false
{{- end }}

[Node.HTTPTimeouts]
ReadTimeout = 30000000000
ReadHeaderTimeout = 30000000000
WriteTimeout = 30000000000
IdleTimeout = 120000000000

{{- with .Values.config.metrics }}
[Metrics]
Enabled = {{ .enabled }}
EnabledExpensive = {{ .expensive }}
HTTP = "0.0.0.0"
Port = {{ .port }}
InfluxDBEndpoint = "http://localhost:8086"
InfluxDBDatabase = "geth"
InfluxDBUsername = "test"
InfluxDBPassword = "test"
InfluxDBTags = "host=localhost"
InfluxDBToken = "test"
InfluxDBBucket = "geth"
InfluxDBOrganization = "geth"
{{- end }}
80 changes: 36 additions & 44 deletions dysnix/geth/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,56 +32,48 @@ Create chart name and version as used by the chart label.
{{- end -}}

{{/*
Geth statefullset annotations
Common labels
*/}}
{{- define "geth.statefulset.annotations" -}}
{{- if .Values.persistence.snapshotValue -}}
snapshot: {{ .Values.persistence.snapshotValue }}
{{- end -}}
{{- end -}}
{{- define "geth.labels" -}}
helm.sh/chart: {{ include "geth.chart" . }}
app.kubernetes.io/name: {{ include "geth.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Geth args
Selector labels
*/}}
{{- define "geth.args" -}}

{{- $customArgs := list -}}
{{- $args := list "--maxpeers" .Values.maxPeers "--cache" .Values.cache -}}
{{- $args = concat $args (list "--syncmode" .Values.syncMode "--pprof" "--pprof.addr=0.0.0.0") -}}
{{- $args = concat $args (list "--pprof.port=6060" "--metrics" "--http" "--http.api" .Values.http.api) -}}
{{- $args = concat $args (list "--http.addr" "0.0.0.0" "--http.port" .Values.http.port "--http.vhosts" .Values.http.vhosts) -}}
{{- $args = concat $args (list "--http.corsdomain" "*" "--ws" "--ws.addr" "0.0.0.0" "--ws.port" .Values.ws.port) -}}
{{- $args = concat $args (list "--ws.api" .Values.ws.api "--ws.origins" .Values.ws.origins) -}}
{{- $args = concat $args (list "--port" .Values.p2p.port "--discovery.port" .Values.p2p.discoveryPort) -}}
{{- if .Values.authrpc.enabled }}
{{- $args = concat $args (list "--authrpc.addr=0.0.0.0" "--authrpc.port" .Values.authrpc.port ) -}}
{{- $args = concat $args (list "--authrpc.vhosts" .Values.authrpc.vhosts ) -}}
{{- $args = concat $args (list "--authrpc.jwtsecret" .Values.authrpc.jwtpath ) -}}
{{- end -}}
{{- if .Values.p2p.nat }}
{{- $args = concat $args (list "--nat" .Values.p2p.nat ) -}}
{{- define "geth.selectorLabels" -}}
app.kubernetes.io/name: {{ include "geth.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.podLabels }}
{{ toYaml . | indent 0 }}
{{- end }}
{{- if .Values.maxPendPeers }}
{{- $args = concat $args (list "--maxpendpeers" .Values.maxPendPeers) -}}
{{- end }}

{{- range $testnet := list "ropsten" "rinkeby" "goerli" -}}
{{- if eq ($testnet | get $.Values | toString) "true" -}}
{{- $args = prepend $args ($testnet | printf "--%s") -}}
{{- end -}}
{{- end -}}

{{- range $k, $v := .Values.customArgs -}}
{{- $customArgs = concat $customArgs (list ($k | printf "--%s") $v) -}}
{{- end -}}

{{- $mode := "snapshot" | get .Values | toString -}}
{{- if eq $mode "true" -}}
{{- $args = append $args "--snapshot" -}}
{{- else if eq $mode "false" -}}
{{- $args = append $args "--snapshot=false" -}}
{{- end -}}

{{- concat $args $customArgs | compact | toStrings | toYaml -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "geth.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "geth.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Toml list generation
*/}}
{{- define "geth.tomlList" -}}
{{- print "[" }}
{{- range $idx, $element := . }}
{{- if $idx }}, {{ end }}
{{- $element | quote }}
{{- end -}}
{{ print "]" -}}
{{- end }}
9 changes: 9 additions & 0 deletions dysnix/geth/templates/configmap-scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "geth.fullname" . }}-scripts
labels:
{{- include "geth.labels" . | nindent 4 }}
data:
check-readiness.sh: |-
{{- include (print $.Template.BasePath "/scripts/_check-readiness.tpl") . | nindent 4 }}
9 changes: 9 additions & 0 deletions dysnix/geth/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "geth.fullname" . }}-config
labels:
{{- include "geth.labels" . | nindent 4 }}
data:
config.toml: |-
{{- include (print $.Template.BasePath "/_config.tpl") . | nindent 4 }}
26 changes: 0 additions & 26 deletions dysnix/geth/templates/hpa.yaml

This file was deleted.

Loading

0 comments on commit 0b35483

Please sign in to comment.