From 76693c1871235614c2fa6b0beef3773f63821014 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Tue, 23 Jul 2024 18:02:53 +0000 Subject: [PATCH] Changes from astriaorg/astria@df1c2067571c8a5c7fc15f34fc2aca9bf205b3e0 --- charts/composer/Chart.yaml | 32 ++ charts/composer/templates/_helpers.tpl | 26 ++ charts/composer/templates/configmap.yaml | 46 ++ charts/composer/templates/deployment.yaml | 60 +++ .../templates/secretproviderclass.yaml | 13 + charts/composer/templates/service.yaml | 29 ++ charts/composer/templates/servicemonitor.yaml | 27 ++ charts/composer/values.yaml | 75 ++++ charts/deploy.just | 35 +- charts/evm-bridge-withdrawer/Chart.yaml | 2 +- .../templates/configmaps.yaml | 20 +- charts/evm-bridge-withdrawer/values.yaml | 10 +- charts/evm-faucet/Chart.yaml | 33 ++ charts/evm-faucet/templates/_helper.tpl | 40 ++ charts/evm-faucet/templates/configmap.yaml | 14 + .../templates/deployment.yaml} | 32 +- charts/evm-faucet/templates/ingress.yaml | 66 +++ .../templates/secretproviderclass.yaml | 18 + charts/evm-faucet/templates/service.yaml | 13 + charts/evm-faucet/values.yaml | 59 +++ charts/evm-rollup/Chart.yaml | 2 +- .../files/genesis/geth-genesis.json | 48 +- charts/evm-rollup/files/scripts/init-geth.sh | 8 +- charts/evm-rollup/templates/_helpers.tpl | 36 +- charts/evm-rollup/templates/configmap.yaml | 261 +---------- charts/evm-rollup/templates/ingress.yaml | 6 +- .../evm-rollup/templates/prometheusrule.yaml | 16 +- .../templates/secretproviderclass.yaml | 30 -- charts/evm-rollup/templates/service.yaml | 45 +- .../evm-rollup/templates/servicemonitor.yaml | 24 +- charts/evm-rollup/templates/statefulsets.yaml | 221 ++-------- charts/evm-rollup/values.yaml | 416 ++++++++---------- charts/evm-stack/Chart.lock | 21 + charts/evm-stack/Chart.yaml | 56 +++ charts/evm-stack/values.yaml | 88 ++++ charts/sequencer-relayer/Chart.yaml | 2 +- .../templates/configmaps.yaml | 16 +- charts/sequencer-relayer/values.yaml | 21 +- charts/sequencer/Chart.lock | 6 +- charts/sequencer/Chart.yaml | 4 +- dev/bridgetester.just | 13 +- .../bridgetesterutility.Dockerfile | 2 +- dev/values/rollup/dev.yaml | 351 ++++++++++----- dev/values/rollup/ibc-bridge-test.yaml | 7 +- 44 files changed, 1362 insertions(+), 988 deletions(-) create mode 100644 charts/composer/Chart.yaml create mode 100644 charts/composer/templates/_helpers.tpl create mode 100644 charts/composer/templates/configmap.yaml create mode 100644 charts/composer/templates/deployment.yaml create mode 100644 charts/composer/templates/secretproviderclass.yaml create mode 100644 charts/composer/templates/service.yaml create mode 100644 charts/composer/templates/servicemonitor.yaml create mode 100644 charts/composer/values.yaml create mode 100644 charts/evm-faucet/Chart.yaml create mode 100644 charts/evm-faucet/templates/_helper.tpl create mode 100644 charts/evm-faucet/templates/configmap.yaml rename charts/{evm-rollup/templates/deployments.yaml => evm-faucet/templates/deployment.yaml} (59%) create mode 100644 charts/evm-faucet/templates/ingress.yaml create mode 100644 charts/evm-faucet/templates/secretproviderclass.yaml create mode 100644 charts/evm-faucet/templates/service.yaml create mode 100644 charts/evm-faucet/values.yaml delete mode 100644 charts/evm-rollup/templates/secretproviderclass.yaml create mode 100644 charts/evm-stack/Chart.lock create mode 100644 charts/evm-stack/Chart.yaml create mode 100644 charts/evm-stack/values.yaml diff --git a/charts/composer/Chart.yaml b/charts/composer/Chart.yaml new file mode 100644 index 0000000..1f90dd1 --- /dev/null +++ b/charts/composer/Chart.yaml @@ -0,0 +1,32 @@ +apiVersion: v2 +name: composer +description: Astria composer helm chart + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.1.0" + +maintainers: + - name: wafflesvonmaple + url: astria.org + - name: quasystaty1 + url: astria.org + - name: joroshiba + url: astria.org diff --git a/charts/composer/templates/_helpers.tpl b/charts/composer/templates/_helpers.tpl new file mode 100644 index 0000000..5d11460 --- /dev/null +++ b/charts/composer/templates/_helpers.tpl @@ -0,0 +1,26 @@ +{{/* +Namepsace to deploy elements into. +*/}} +{{- define "composer.namespace" -}} +{{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Single entry of rollup names +*/}} +{{- define "composer.rollupDefinition" }} +{{ .name }}::{{ .wsRpc }} +{{- end}} + +{{/* +Rollup config string +*/}} +{{- define "composer.rollups" }} +{{- range $index, $element := .Values.config.rollups }} +{{- if $index }},{{- end }}{{- tpl (include "composer.rollupDefinition" $element) $ }} +{{- end }} +{{- end }} + +{{- define "composer.image" -}} +{{ .Values.images.composer.repo }}:{{ if .Values.global.dev }}{{ .Values.images.composer.devTag }}{{ else }}{{ .Values.images.composer.tag }}{{ end }} +{{- end }} diff --git a/charts/composer/templates/configmap.yaml b/charts/composer/templates/configmap.yaml new file mode 100644 index 0000000..c22e97a --- /dev/null +++ b/charts/composer/templates/configmap.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: composer-env + namespace: {{ include "composer.namespace" . }} +data: + ASTRIA_COMPOSER_LOG: "astria_composer={{ .Values.config.logLevel }}" + ASTRIA_COMPOSER_API_LISTEN_ADDR: "0.0.0.0:{{ .Values.ports.healthApi }}" + ASTRIA_COMPOSER_GRPC_ADDR: "0.0.0.0:{{ .Values.ports.grpc }}" + ASTRIA_COMPOSER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}" + ASTRIA_COMPOSER_SEQUENCER_URL: "{{ tpl .Values.config.sequencerRpc . }}" + ASTRIA_COMPOSER_ROLLUPS: "{{ include "composer.rollups" . }}" + ASTRIA_COMPOSER_PRIVATE_KEY_FILE: "/var/secrets/{{ .Values.config.privateKey.secret.filename }}" + ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE: "{{ .Values.config.maxBytesPerBundle }}" + ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY: "{{ .Values.config.bundleQueueCapacity }}" + ASTRIA_COMPOSER_MAX_SUBMIT_INTERVAL_MS: "{{ .Values.config.maxSubmitInterval }}" + ASTRIA_COMPOSER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix}}" + ASTRIA_COMPOSER_FEE_ASSET: "{{ .Values.config.sequencerNativeAssetBaseDenomination }}" + ASTRIA_COMPOSER_NO_METRICS: "{{ not .Values.metrics.enabled }}" + ASTRIA_COMPOSER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.metrics }}" + ASTRIA_COMPOSER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" + ASTRIA_COMPOSER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" + NO_COLOR: "{{ .Values.global.useTTY }}" + ASTRIA_COMPOSER_NO_OTEL: "{{ not .Values.otel.enabled }}" + OTEL_EXPORTER_OTLP_ENDPOINT: "{{ tpl .Values.otel.endpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ tpl .Values.otel.tracesEndpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ tpl .Values.otel.tracesTimeout . }}" + OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ tpl .Values.otel.tracesCompression . }}" + OTEL_EXPORTER_OTLP_HEADERS: "{{ tpl .Values.otel.otlpHeaders . }}" + OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ tpl .Values.otel.traceHeaders . }}" + OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}" + {{- if not .Values.global.dev }} + {{- else }} + {{- end }} +--- +{{- if not .Values.secretProvider.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + namespace: {{ include "composer.namespace" . }} + name: sequencer-private-key +data: + {{ .Values.config.privateKey.secret.filename }}: | + {{ .Values.config.privateKey.devContent }} +--- +{{- end }} diff --git a/charts/composer/templates/deployment.yaml b/charts/composer/templates/deployment.yaml new file mode 100644 index 0000000..84dd92e --- /dev/null +++ b/charts/composer/templates/deployment.yaml @@ -0,0 +1,60 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: composer + namespace: {{ include "composer.namespace" . }} + labels: + app: composer +spec: + replicas: {{ .Values.global.replicaCount }} + selector: + matchLabels: + app: composer + template: + metadata: + labels: + app: composer + spec: + containers: + - name: composer + image: {{ include "composer.image" . }} + command: ["/usr/local/bin/astria-composer"] + stdin: {{ .Values.global.useTTY }} + tty: {{ .Values.global.useTTY }} + envFrom: + - configMapRef: + name: composer-env + volumeMounts: + - mountPath: "/var/secrets" + name: sequencer-private-key + startupProbe: + httpGet: + path: /readyz + port: {{ .Values.ports.healthApi }} + readinessProbe: + httpGet: + path: /readyz + port: {{ .Values.ports.healthApi }} + ports: + {{- if .Values.metrics.enabled }} + - containerPort: {{ .Values.ports.metrics }} + name: metrics + {{- end }} + - containerPort: {{ .Values.ports.healthApi }} + name: health-api + - containerPort: {{ .Values.ports.grpc }} + name: grpc + resources: + {{- toYaml .Values.resources | trim | nindent 12 }} + volumes: + - name: sequencer-private-key + {{- if .Values.secretProvider.enabled }} + csi: + driver: secrets-store.csi.k8s.io + readOnly: true + volumeAttributes: + secretProviderClass: sequencer-private-key + {{- else }} + configMap: + name: sequencer-private-key + {{- end }} diff --git a/charts/composer/templates/secretproviderclass.yaml b/charts/composer/templates/secretproviderclass.yaml new file mode 100644 index 0000000..a743479 --- /dev/null +++ b/charts/composer/templates/secretproviderclass.yaml @@ -0,0 +1,13 @@ +--- +{{- if .Values.secretProvider.enabled }} +apiVersion: secrets-store.csi.x-k8s.io/v1 +kind: SecretProviderClass +metadata: + name: sequencer-private-key +spec: + provider: {{ .Values.secretProvider.provider }} + parameters: + {{- $_ := set $ "key" .Values.config.privateKey.secret }} + {{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} +--- +{{- end }} diff --git a/charts/composer/templates/service.yaml b/charts/composer/templates/service.yaml new file mode 100644 index 0000000..cf317f8 --- /dev/null +++ b/charts/composer/templates/service.yaml @@ -0,0 +1,29 @@ +kind: Service +apiVersion: v1 +metadata: + name: composer-service + namespace: {{ include "composer.namespace" . }} +spec: + selector: + app: composer + ports: + - name: grpc + port: {{ .Values.ports.grpc }} + targetPort: grpc +--- +{{- if .Values.metrics.enabled }} +kind: Service +apiVersion: v1 +metadata: + name: metrics + namespace: {{ include "composer.namespace" . }} + labels: + app: composer +spec: + selector: + app: composer + ports: + - name: metrics + port: {{ .Values.ports.metrics }} + targetPort: geth-metr +{{- end }} diff --git a/charts/composer/templates/servicemonitor.yaml b/charts/composer/templates/servicemonitor.yaml new file mode 100644 index 0000000..aa3e4c0 --- /dev/null +++ b/charts/composer/templates/servicemonitor.yaml @@ -0,0 +1,27 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: composer-metrics + labels: + {{- with .Values.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + jobLabel: composer-metrics + namespaceSelector: + matchNames: + - {{ include "composer.namespace" . }} + selector: + matchLabels: + app: composer + endpoints: + - port: metrics + path: / + {{- with .Values.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} +{{- end }} diff --git a/charts/composer/values.yaml b/charts/composer/values.yaml new file mode 100644 index 0000000..c8214b8 --- /dev/null +++ b/charts/composer/values.yaml @@ -0,0 +1,75 @@ +global: + namespaceOverride: "" + replicaCount: 1 + # Whether to use tty readable logging for astria services, when false use json. + useTTY: false + dev: false + +images: + composer: + repo: ghcr.io/astriaorg/composer + tag: "0.8.0" + devTag: latest + +config: + logLevel: "debug" + maxBytesPerBundle: 200000 + bundleQueueCapacity: 40000 + maxSubmitInterval: 2000 + sequencerAddressPrefix: astria + sequencerNativeAssetBaseDenomination: "nria" + sequencerRpc: "" + sequencerChainId: "" + privateKey: + devContent: "" + secret: + filename: "key.hex" + resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest" + rollups: + - name: "astria" + wsRpc: "ws://" + +otel: + enabled: false + serviceName: "composer" + endpoint: "" + tracesEndpoint: "" + tracesCompression: "gzip" + tracesTimeout: "10" + otlpHeaders: "" + traceHeaders: "" + +metrics: + enabled: false + +serviceMonitor: + # set to enable port svc and service monitor + enabled: false + port: 6060 + additionalLabels: + release: kube-prometheus-stack + +# When deploying in a production environment should use a secret provider +# This is configured for use with GCP, need to set own resource names +# and keys +secretProvider: + enabled: false + provider: gcp + parametersTemplate: |- + secrets: | + - resourceName: {{ .key.resourceName }} + fileName: "{{ .key.filename }}" + +resources: + requests: + cpu: 100m + memory: 100Mi + limits: + cpu: 1000m + memory: 1Gi + +# Default service ports +ports: + grpc: 50052 + healthApi: 2450 + metrics: 6060 diff --git a/charts/deploy.just b/charts/deploy.just index e00aaff..6cdbfc9 100644 --- a/charts/deploy.just +++ b/charts/deploy.just @@ -94,21 +94,21 @@ wait-for-sequencer: kubectl wait -n astria-dev-cluster deployment celestia-local --for=condition=Available=True --timeout=600s kubectl rollout status --watch statefulset/sequencer -n astria-dev-cluster --timeout=600s -deploy-rollup: deploy-dev-rollup deploy-bridge-withdrawer wait-for-rollup +deploy-rollup: deploy-dev-rollup wait-for-rollup wait-for-rollup: wait-for-dev-rollup wait-for-bridge-withdrawer -delete-rollup: delete-dev-rollup delete-bridge-withdrawer +delete-rollup: delete-dev-rollup defaultRollupName := "astria" defaultNetworkId := "" defaultPrivateKey := "" defaultSequencerStartBlock := "" deploy-dev-rollup rollupName=defaultRollupName networkId=defaultNetworkId: - helm dependency update charts/evm-rollup > /dev/null + helm dependency update charts/evm-stack > /dev/null helm install \ {{ if rollupName != '' { replace('--set config.rollup.name=# --set celestia-node.config.labelPrefix=#', '#', rollupName) } else { '' } }} \ {{ if networkId != '' { replace('--set config.rollup.networkId=#', '#', networkId) } else { '' } }} \ -f dev/values/rollup/dev.yaml \ - {{rollupName}}-chain-chart ./charts/evm-rollup --namespace astria-dev-cluster + {{rollupName}}-chain-chart ./charts/evm-stack --namespace astria-dev-cluster delete-dev-rollup rollupName=defaultRollupName: @just delete chart {{rollupName}}-chain @@ -156,7 +156,7 @@ deploy-smoke-test tag=defaultTag: @just wait-for-ingress-controller > /dev/null @echo "Deploying local celestia instance..." && just deploy celestia-local > /dev/null @helm dependency update charts/sequencer > /dev/null - @helm dependency update charts/evm-rollup > /dev/null + @helm dependency update charts/evm-stack > /dev/null @echo "Setting up single astria sequencer..." && helm install \ -n astria-validator-single single-sequencer-chart ./charts/sequencer \ -f dev/values/validators/all.yml \ @@ -164,13 +164,11 @@ deploy-smoke-test tag=defaultTag: {{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ --create-namespace > /dev/null @just wait-for-sequencer > /dev/null - @echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-rollup -f dev/values/rollup/dev.yaml \ - {{ if tag != '' { replace('--set images.conductor.devTag=# --set images.composer.devTag=#', '#', tag) } else { '' } }} \ - --set config.blockscout.enabled=false \ - --set config.faucet.enabled=false > /dev/null - @echo "Starting Bridge Withdrawer..." && helm install -n astria-dev-cluster evm-bridge-withdrawer-chart ./charts/evm-bridge-withdrawer \ - -f dev/values/withdrawer/values.yaml \ - {{ if tag != '' { replace('--set images.evmBridgeWithdrawer.devTag=#', '#', tag) } else { '' } }} > /dev/null + @echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-stack -f dev/values/rollup/dev.yaml \ + {{ if tag != '' { replace('--set evm-rollup.images.conductor.devTag=# --set composer.images.composer.devTag=# --set evm-bridge-withdrawer.images.evmBridgeWithdrawer.devTag=#', '#', tag) } else { '' } }} \ + --set blockscout-stack.enabled=false \ + --set postgresql.enabled=false \ + --set evm-faucet.enabled=false > /dev/null @just wait-for-rollup > /dev/null deploy-smoke-cli tag=defaultTag: @@ -178,7 +176,7 @@ deploy-smoke-cli tag=defaultTag: @just wait-for-ingress-controller > /dev/null @echo "Deploying local celestia instance..." && just deploy celestia-local > /dev/null @helm dependency update charts/sequencer > /dev/null - @helm dependency update charts/evm-rollup > /dev/null + @helm dependency update charts/evm-stack > /dev/null @echo "Setting up single astria sequencer..." && helm install \ -n astria-validator-single single-sequencer-chart ./charts/sequencer \ -f dev/values/validators/all.yml \ @@ -186,11 +184,12 @@ deploy-smoke-cli tag=defaultTag: {{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ --create-namespace > /dev/null @just wait-for-sequencer > /dev/null - @echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-rollup -f dev/values/rollup/dev.yaml \ - {{ if tag != '' { replace('--set images.conductor.devTag=# --set images.composer.devTag=#', '#', tag) } else { '' } }} \ - --set config.blockscout.enabled=false \ - --set config.faucet.enabled=false > /dev/null - @just wait-for-dev-rollup > /dev/null + @echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-stack -f dev/values/rollup/dev.yaml \ + {{ if tag != '' { replace('--set evm-rollup.images.conductor.devTag=# --set composer.images.composer.devTag=# --set evm-bridge-withdrawer.images.evmBridgeWithdrawer.devTag=#', '#', tag) } else { '' } }} \ + --set blockscout-stack.enabled=false \ + --set postgresql.enabled=false \ + --set evm-faucet.enabled=false > /dev/null + @just wait-for-rollup > /dev/null evm_destination_address := "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" diff --git a/charts/evm-bridge-withdrawer/Chart.yaml b/charts/evm-bridge-withdrawer/Chart.yaml index 2cb9304..9d0191a 100644 --- a/charts/evm-bridge-withdrawer/Chart.yaml +++ b/charts/evm-bridge-withdrawer/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.3 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/evm-bridge-withdrawer/templates/configmaps.yaml b/charts/evm-bridge-withdrawer/templates/configmaps.yaml index ff5af74..011e92a 100644 --- a/charts/evm-bridge-withdrawer/templates/configmaps.yaml +++ b/charts/evm-bridge-withdrawer/templates/configmaps.yaml @@ -6,32 +6,32 @@ metadata: data: ASTRIA_BRIDGE_WITHDRAWER_LOG: "astria_bridge_withdrawer=debug" ASTRIA_BRIDGE_WITHDRAWER_API_ADDR: "0.0.0.0:{{ .Values.ports.healthAPI }}" - ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_COMETBFT_ENDPOINT: "{{ .Values.config.sequencerCometbftEndpoint }}" - ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_CHAIN_ID: "{{ .Values.config.sequencerChainId }}" + ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_COMETBFT_ENDPOINT: "{{ tpl .Values.config.sequencerCometbftEndpoint . }}" + ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}" ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_KEY_PATH: "/secret/sequencerPrivateKey/{{ .Values.config.sequencerPrivateKey.secret.filename }}" ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix }}" ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_BRIDGE_ADDRESS: "{{ .Values.config.sequencerBridgeAddress }}" ASTRIA_BRIDGE_WITHDRAWER_FEE_ASSET_DENOMINATION: "{{ .Values.config.feeAssetDenom }}" ASTRIA_BRIDGE_WITHDRAWER_ROLLUP_ASSET_DENOMINATION: "{{ .Values.config.rollupAssetDenom }}" ASTRIA_BRIDGE_WITHDRAWER_ETHEREUM_CONTRACT_ADDRESS: "{{ .Values.config.evmContractAddress }}" - ASTRIA_BRIDGE_WITHDRAWER_ETHEREUM_RPC_ENDPOINT: "{{ .Values.config.evmRpcEndpoint }}" + ASTRIA_BRIDGE_WITHDRAWER_ETHEREUM_RPC_ENDPOINT: "{{ tpl .Values.config.evmRpcEndpoint . }}" ASTRIA_BRIDGE_WITHDRAWER_NO_METRICS: "{{ not .Values.metrics.enabled }}" ASTRIA_BRIDGE_WITHDRAWER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.metrics }}" ASTRIA_BRIDGE_WITHDRAWER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" ASTRIA_BRIDGE_WITHDRAWER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" ASTRIA_BRIDGE_WITHDRAWER_NO_OTEL: "{{ not .Values.otel.enabled }}" NO_COLOR: "{{ .Values.global.useTTY }}" - OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.otel.endpoint }}" - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ .Values.otel.tracesEndpoint }}" - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ .Values.otel.tracesTimeout }}" - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ .Values.otel.tracesCompression }}" - OTEL_EXPORTER_OTLP_HEADERS: "{{ .Values.otel.otlpHeaders }}" - OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ .Values.otel.traceHeaders }}" + OTEL_EXPORTER_OTLP_ENDPOINT: "{{ tpl .Values.otel.endpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ tpl .Values.otel.tracesEndpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ tpl .Values.otel.tracesTimeout . }}" + OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ tpl .Values.otel.tracesCompression . }}" + OTEL_EXPORTER_OTLP_HEADERS: "{{ tpl .Values.otel.otlpHeaders . }}" + OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ tpl .Values.otel.traceHeaders . }}" OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}" {{- if not .Values.global.dev }} ASTRIA_BRIDGE_WITHDRAWER_MIN_EXPECTED_FEE_ASSET_BALANCE: "{{ .Values.config.minExpectedFeeAssetBalance }}" {{- else }} - ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_GRPC_ENDPOINT: "{{ .Values.config.sequencerGrpcEndpoint }}" + ASTRIA_BRIDGE_WITHDRAWER_SEQUENCER_GRPC_ENDPOINT: "{{ tpl .Values.config.sequencerGrpcEndpoint . }}" {{- end }} --- {{- if not .Values.secretProvider.enabled }} diff --git a/charts/evm-bridge-withdrawer/values.yaml b/charts/evm-bridge-withdrawer/values.yaml index d774cd3..fe2599f 100644 --- a/charts/evm-bridge-withdrawer/values.yaml +++ b/charts/evm-bridge-withdrawer/values.yaml @@ -40,12 +40,12 @@ metrics: otel: enabled: false serviceName: "astria-evm-withdrawer" - endpoint: - tracesEndpoint: + endpoint: "" + tracesEndpoint: "" tracesCompression: gzip - tracesTimeout: 10 - otlpHeaders: - traceHeaders: + tracesTimeout: "10" + otlpHeaders: "" + traceHeaders: "" serviceMonitor: enabled: false diff --git a/charts/evm-faucet/Chart.yaml b/charts/evm-faucet/Chart.yaml new file mode 100644 index 0000000..efb161a --- /dev/null +++ b/charts/evm-faucet/Chart.yaml @@ -0,0 +1,33 @@ +apiVersion: v2 +name: evm-faucet +description: EVM Faucet for Astria EVM. + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) + +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.1.0" + +maintainers: + - name: wafflesvonmaple + url: astria.org + - name: quasystaty1 + url: astria.org + - name: joroshiba + url: astria.org diff --git a/charts/evm-faucet/templates/_helper.tpl b/charts/evm-faucet/templates/_helper.tpl new file mode 100644 index 0000000..6ac61d9 --- /dev/null +++ b/charts/evm-faucet/templates/_helper.tpl @@ -0,0 +1,40 @@ +{{/* +Namepsace to deploy elements into. +*/}} +{{- define "evmFaucet.namespace" -}} +{{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Return if ingress is stable. +*/}} +{{- define "evmFaucet.ingress.isStable" -}} +{{- eq (include "evmFaucet.ingress.apiVersion" .) "networking.k8s.io/v1" }} +{{- end }} + +{{/* +Return if ingress supports ingressClassName. +*/}} +{{- define "evmFaucet.ingress.supportsIngressClassName" -}} +{{- or (eq (include "evmFaucet.ingress.isStable" .) "true") (and (eq (include "evmFaucet.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- end }} + +{{/* +Return if ingress supports pathType. +*/}} +{{- define "evmFaucet.ingress.supportsPathType" -}} +{{- or (eq (include "evmFaucet.ingress.isStable" .) "true") (and (eq (include "evmFaucet.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- end }} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "evmFaucet.ingress.apiVersion" -}} +{{- if and ($.Capabilities.APIVersions.Has "networking.k8s.io/v1") (semverCompare ">= 1.19-0" .Capabilities.KubeVersion.Version) }} +{{- print "networking.k8s.io/v1" }} +{{- else if $.Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} +{{- print "networking.k8s.io/v1beta1" }} +{{- else }} +{{- print "extensions/v1beta1" }} +{{- end }} +{{- end }} diff --git a/charts/evm-faucet/templates/configmap.yaml b/charts/evm-faucet/templates/configmap.yaml new file mode 100644 index 0000000..abfa303 --- /dev/null +++ b/charts/evm-faucet/templates/configmap.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{tpl .Values.config.rollupName . }}-evm-faucet-env + namespace: {{ include "evmFaucet.namespace" . }} +data: + ETH_FAUCET_PROXYCOUNT: "{{ .Values.config.proxyCount }}" + ETH_FAUCET_PORT: "{{ .Values.ports.faucet }}" + ETH_FAUCET_EVM_PROVIDER_URL: "{{ tpl .Values.config.providerUrl . }}" + ETH_FAUCET_AMOUNT: "{{ .Values.config.amount }}" + {{- if not .Values.secretProvider.enabled }} + ETH_FAUCET_EVM_PRIVATE_KEY: "{{ .Values.config.privateKey.devContent }}" + {{- end }} +--- diff --git a/charts/evm-rollup/templates/deployments.yaml b/charts/evm-faucet/templates/deployment.yaml similarity index 59% rename from charts/evm-rollup/templates/deployments.yaml rename to charts/evm-faucet/templates/deployment.yaml index 7a64b46..f5f3790 100644 --- a/charts/evm-rollup/templates/deployments.yaml +++ b/charts/evm-faucet/templates/deployment.yaml @@ -1,21 +1,20 @@ -{{- if .Values.config.faucet.enabled }} apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Values.config.rollup.name }}-faucet + name: {{tpl .Values.config.rollupName . }}-evm-faucet labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - namespace: {{ include "rollup.namespace" . }} + app: {{tpl .Values.config.rollupName . }}-evm-faucet + namespace: {{ include "evmFaucet.namespace" . }} spec: replicas : {{ .Values.global.replicaCount }} selector: matchLabels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{tpl .Values.config.rollupName . }}-evm-faucet template: metadata: - name: {{ .Values.config.rollup.name }}-faucet + name: {{tpl .Values.config.rollupName . }}-evm-faucet labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{tpl .Values.config.rollupName . }}-evm-faucet spec: containers: - name: faucet @@ -26,22 +25,22 @@ spec: - -wallet.privkey=$(ETH_FAUCET_EVM_PRIVATE_KEY) - -faucet.amount=$(ETH_FAUCET_AMOUNT) - -proxycount=$(ETH_FAUCET_PROXYCOUNT) - image: {{ .Values.images.faucet }} + image: {{ .Values.images.faucet.repo }}:{{ .Values.images.faucet.tag }} envFrom: - configMapRef: - name: {{ .Values.config.rollup.name }}-faucet-env + name: {{tpl .Values.config.rollupName . }}-evm-faucet-env {{- if .Values.secretProvider.enabled }} env: - name: ETH_FAUCET_EVM_PRIVATE_KEY valueFrom: secretKeyRef: - name: faucet-private-key - key: {{ .Values.config.faucet.privateKey.secret.key }} + name: evm-faucet-private-key + key: {{ .Values.privateKey.secret.key }} {{- end }} volumeMounts: - mountPath: /home/faucet - name: {{ .Values.config.rollup.name }}-faucet-home-vol - subPath: {{ .Values.config.rollup.name }}/faucet + name: {{tpl .Values.config.rollupName . }}-evm-faucet-home-vol + subPath: {{tpl .Values.config.rollupName . }}/faucet {{- if .Values.secretProvider.enabled }} - mountPath: /var/secrets name: faucet-private-key @@ -51,14 +50,13 @@ spec: name: faucet volumes: - emptyDir: {} - name: {{ .Values.config.rollup.name }}-faucet-home-vol + name: {{tpl .Values.config.rollupName . }}-evm-faucet-home-vol {{- if .Values.secretProvider.enabled }} - - name: faucet-private-key + - name: evm-faucet-private-key csi: driver: secrets-store.csi.k8s.io readOnly: true volumeAttributes: - secretProviderClass: faucet-private-key + secretProviderClass: evm-faucet-private-key {{- end }} --- -{{- end }} diff --git a/charts/evm-faucet/templates/ingress.yaml b/charts/evm-faucet/templates/ingress.yaml new file mode 100644 index 0000000..f900fab --- /dev/null +++ b/charts/evm-faucet/templates/ingress.yaml @@ -0,0 +1,66 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressApiIsStable := eq (include "evmFaucet.ingress.isStable" .) "true" -}} +{{- $ingressSupportsIngressClassName := eq (include "evmFaucet.ingress.supportsIngressClassName" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "evmFaucet.ingress.supportsPathType" .) "true" -}} + +{{- range $service, $ingress := .Values.ingress.services }} +{{- $servicePort := $ingress.service.port -}} +{{- $serviceName := $ingress.service.name -}} +{{- $ingressPath := $ingress.path -}} +{{- $ingressPathType := $ingress.pathType -}} +{{- $extraPaths := $ingress.extraPaths }} +--- +apiVersion: {{ include "evmFaucet.ingress.apiVersion" $ }} +kind: Ingress +metadata: + name: {{tpl $.Values.config.rollupName $ }}-evm-faucet-{{ $service }}-ingress + namespace: {{ include "evmFaucet.namespace" $ }} + labels: + {{- with $ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + kubernetes.io/ingress.class: {{ $.Values.ingress.className }} + {{- if $ingressApiIsStable }} + {{- range $key, $value := $ingress.annotations }} + {{ $key }}: {{ tpl $value $ | quote }} + {{- end }} + {{- end }} +spec: + {{- if $ingressSupportsIngressClassName }} + ingressClassName: {{ $.Values.ingress.className }} + {{- end -}} + {{- with $ingress.service }} + defaultBackend: + service: + {{- tpl (toYaml .) $ | nindent 6 }} + {{- end }} + rules: + {{- with $ingress.hosts }} + {{- range $host := . }} + - host: {{ tpl $host $ }} + http: + paths: + {{- with $extraPaths }} + {{- toYaml . | nindent 10 }} + {{- end }} + - path: {{ $ingressPath }} + {{- if $ingressSupportsPathType }} + pathType: {{ $ingressPathType }} + {{- end }} + backend: + {{- if $ingressApiIsStable }} + service: + {{- tpl (toYaml $ingress.service) $ | nindent 16 }} + {{- else }} + serviceName: {{ tpl $serviceName $ }} + servicePort: {{ tpl $servicePort $ }} + {{- end }} + {{- end }} + {{- end }} + {{- if $ingress.tls }} + tls: + {{- tpl (toYaml $ingress.tls) $ | nindent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/evm-faucet/templates/secretproviderclass.yaml b/charts/evm-faucet/templates/secretproviderclass.yaml new file mode 100644 index 0000000..d95be5d --- /dev/null +++ b/charts/evm-faucet/templates/secretproviderclass.yaml @@ -0,0 +1,18 @@ +{{- if .Values.secretProvider.enabled }} +apiVersion: secrets-store.csi.x-k8s.io/v1 +kind: SecretProviderClass +metadata: + name: faucet-private-key +spec: + provider: {{ .Values.secretProvider.provider }} + secretObjects: + - secretName: evm-faucet-private-key + type: Opaque + data: + - objectName: {{ .Values.config.privateKey.secret.filename }} + key: {{ .Values.config.privateKey.secret.key }} + parameters: + {{- $_ := set $ "key" .Values.config.privateKey.secret }} + {{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} +--- +{{- end }} diff --git a/charts/evm-faucet/templates/service.yaml b/charts/evm-faucet/templates/service.yaml new file mode 100644 index 0000000..c994fd6 --- /dev/null +++ b/charts/evm-faucet/templates/service.yaml @@ -0,0 +1,13 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{tpl .Values.config.rollupName . }}-evm-faucet-service + namespace: {{ include "evmFaucet.namespace" . }} +spec: + selector: + app: {{tpl .Values.config.rollupName . }}-evm-faucet + ports: + - name: evm-faucet-svc + port: {{ .Values.ports.faucet }} + targetPort: faucet +--- diff --git a/charts/evm-faucet/values.yaml b/charts/evm-faucet/values.yaml new file mode 100644 index 0000000..cc84496 --- /dev/null +++ b/charts/evm-faucet/values.yaml @@ -0,0 +1,59 @@ +global: + namespaceOverride: "" + replicaCount: 1 + # Whether to use tty readable logging for astria services, when false use json. + # Best to be false in production environments, true for clean logs on local dev. + useTTY: false + dev: false + +images: + faucet: + repo: "ghcr.io/astriaorg/ria-faucet" + tag: "0.0.1" + +config: + rollupName: '' + proxyCount: 1 + # The account from which the faucet disburses funds, likely want to have + # the corresponding account given a balance in genesis accounts. + # Note: When secretProvider.enabled is true the secret provided by + # `evmPrivateKey` is used instead of this value. + privateKey: + devContent: "" + secret: + filename: "key.hex" + resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest" + key: token + # The amount of token to give per request + amount: 1 + providerUrl: http://{{ .Values.config.rollupName }}-evm-service.{{ include "evmFaucet.namespace" . }}.svc.cluster.local:8545 + +ingress: + enabled: false + labels: {} + hostname: localdev.me + className: nginx + services: + faucet: + hosts: + - faucet.{{tpl .Values.config.rollupName . }}.{{ .Values.ingress.hostname }} + path: / + pathType: Prefix + service: + name: "{{tpl .Values.config.rollupName . }}-evm-faucet-service" + port: + name: evm-faucet-svc + +# When deploying in a production environment should use a secret provider +# This is configured for use with GCP, need to set own resource names +# and keys +secretProvider: + enabled: false + provider: gcp + parametersTemplate: |- + secrets: | + - resourceName: {{ .key.resourceName }} + fileName: "{{ .key.filename }}" + +ports: + faucet: 8080 diff --git a/charts/evm-rollup/Chart.yaml b/charts/evm-rollup/Chart.yaml index 3655046..d317e38 100644 --- a/charts/evm-rollup/Chart.yaml +++ b/charts/evm-rollup/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.23.2 +version: 0.24.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/evm-rollup/files/genesis/geth-genesis.json b/charts/evm-rollup/files/genesis/geth-genesis.json index ddb5c8b..98c194f 100644 --- a/charts/evm-rollup/files/genesis/geth-genesis.json +++ b/charts/evm-rollup/files/genesis/geth-genesis.json @@ -1,6 +1,6 @@ { "config": { - "chainId": {{ toString .Values.config.rollup.networkId | replace "\"" "" }}, + "chainId": {{ toString ( tpl .Values.genesis.chainId . ) | replace "\"" "" }}, "homesteadBlock": 0, "eip150Block": 0, "eip155Block": 0, @@ -11,45 +11,43 @@ "istanbulBlock": 0, "berlinBlock": 0, "londonBlock": 0, - {{- if .Values.config.rollup.genesis.shanghaiTime}} - "shanghaiTime": {{ toString .Values.config.rollup.genesis.shanghaiTime | replace "\"" "" }}, + "shanghaiTime": 0, + {{- if .Values.genesis.cancunTime }} + "cancunTime": {{ toString .Values.genesis.cancunTime | replace "\"" "" }}, {{- end }} - {{- if .Values.config.rollup.genesis.cancunTime }} - "cancunTime": {{ toString .Values.config.rollup.genesis.cancunTime | replace "\"" "" }}, + {{- if .Values.genesis.cancunTime }} + "pragueTime": {{ toString .Values.genesis.pragueTime | replace "\"" "" }}, {{- end }} - {{- if .Values.config.rollup.genesis.cancunTime }} - "pragueTime": {{ toString .Values.config.rollup.genesis.pragueTime | replace "\"" "" }}, - {{- end }} - {{- if .Values.config.rollup.genesis.cancunTime }} - "verkleTime": {{ toString .Values.config.rollup.genesis.verkleTime | replace "\"" "" }}, + {{- if .Values.genesis.cancunTime }} + "verkleTime": {{ toString .Values.genesis.verkleTime | replace "\"" "" }}, {{- end }} "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true, "ethash": {}, - {{- range $key, $value := .Values.config.rollup.genesis.extra }} + {{- range $key, $value := .Values.genesis.extra }} "{{ $key }}": {{ toPrettyJson $value | indent 8 | trim }}, {{- end }} - {{- if .Values.config.rollup.genesis.extraDataOverride }} - "astriaExtraDataOverride": "{{ .Values.config.rollup.genesis.extraDataOverride }}", + {{- if .Values.genesis.extraDataOverride }} + "astriaExtraDataOverride": "{{ .Values.genesis.extraDataOverride }}", {{- end }} - "astriaOverrideGenesisExtraData": {{ .Values.config.rollup.genesis.overrideGenesisExtraData }}, - "astriaSequencerInitialHeight": {{ toString .Values.config.sequencer.initialBlockHeight | replace "\"" "" }}, - "astriaRollupName": "{{ .Values.config.rollup.name }}", - "astriaCelestiaInitialHeight": {{ toString .Values.config.celestia.initialBlockHeight | replace "\"" "" }}, - "astriaCelestiaHeightVariance": {{ toString .Values.config.celestia.heightVariance | replace "\"" "" }}, - "astriaBridgeAddresses": {{ toPrettyJson .Values.config.rollup.genesis.bridgeAddresses | indent 8 | trim }}, - "astriaFeeCollectors": {{ toPrettyJson .Values.config.rollup.genesis.feeCollectors | indent 8 | trim }}, - "astriaEIP1559Params": {{ toPrettyJson .Values.config.rollup.genesis.eip1559Params | indent 8 | trim }}, - "astriaBridgeSenderAddress": "{{ .Values.config.rollup.genesis.bridgeSenderAddress }}", - "astriaSequencerAddressPrefix": "{{ .Values.config.sequencer.addressPrefixes.base }}" + "astriaOverrideGenesisExtraData": {{ .Values.genesis.overrideGenesisExtraData }}, + "astriaSequencerInitialHeight": {{ toString .Values.genesis.sequencerInitialHeight | replace "\"" "" }}, + "astriaRollupName": "{{ tpl .Values.genesis.rollupName . }}", + "astriaCelestiaInitialHeight": {{ toString .Values.genesis.celestiaInitialHeight | replace "\"" "" }}, + "astriaCelestiaHeightVariance": {{ toString .Values.genesis.celestiaHeightVariance | replace "\"" "" }}, + "astriaBridgeAddresses": {{ toPrettyJson .Values.genesis.bridgeAddresses | indent 8 | trim }}, + "astriaFeeCollectors": {{ toPrettyJson .Values.genesis.feeCollectors | indent 8 | trim }}, + "astriaEIP1559Params": {{ toPrettyJson .Values.genesis.eip1559Params | indent 8 | trim }}, + "astriaBridgeSenderAddress": "{{ .Values.genesis.bridgeSenderAddress }}", + "astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}" {{- if not .Values.global.dev }} {{- else }} {{- end }} }, "difficulty": "0", - "gasLimit": "{{ toString .Values.config.rollup.genesis.gasLimit | replace "\"" "" }}", + "gasLimit": "{{ toString .Values.genesis.gasLimit | replace "\"" "" }}", "alloc": { - {{- range $index, $value := .Values.config.rollup.genesis.alloc }} + {{- range $index, $value := .Values.genesis.alloc }} {{- if $index }},{{- end }} "{{ $value.address }}": {{ toPrettyJson $value.value | indent 8 | trim }} {{- end }} diff --git a/charts/evm-rollup/files/scripts/init-geth.sh b/charts/evm-rollup/files/scripts/init-geth.sh index cc28bee..52318ae 100755 --- a/charts/evm-rollup/files/scripts/init-geth.sh +++ b/charts/evm-rollup/files/scripts/init-geth.sh @@ -7,8 +7,12 @@ if [ ! -d "$data_dir/" ]; then cp /scripts/geth-genesis.json $home_dir/genesis.json - exec geth --datadir "$data_dir/" --db.engine {{ .Values.config.rollup.dbEngine }} \ - {{ if not .Values.config.rollup.archiveNode }}--state.scheme=path {{- end }} \ + exec geth \ + {{- range $arg := .Values.config.geth.flags -}} + {{- if $arg.condition | default true -}} + --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} \ + {{ end }} + {{- end -}} init $home_dir/genesis.json elif ! cmp -s "/scripts/geth-genesis.json" "$home_dir/genesis.json"; then echo "Geth DB already initialized, but genesis file upgraded..." diff --git a/charts/evm-rollup/templates/_helpers.tpl b/charts/evm-rollup/templates/_helpers.tpl index 1834e8c..5003367 100644 --- a/charts/evm-rollup/templates/_helpers.tpl +++ b/charts/evm-rollup/templates/_helpers.tpl @@ -5,11 +5,16 @@ Namepsace to deploy elements into. {{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}} {{- end }} +{{/* The name of the rollup */}} +{{- define "rollup.name" -}} +{{- tpl .Values.genesis.rollupName . }} +{{- end }} + {{/* Expand the name of the chart. */}} -{{- define "rollup.name" -}} -{{- default .Values.config.rollup.name | trunc 63 | trimSuffix "-" }}-astria-dev-cluster +{{- define "rollup.appName" -}} +{{- default (include "rollup.name" .) | trunc 63 | trimSuffix "-" }}-astria-dev-cluster {{- end }} {{/* @@ -23,7 +28,24 @@ Common labels Selector labels */}} {{- define "rollup.selectorLabels" -}} -app: {{ include "rollup.name" . }} +app: {{ include "rollup.appName" . }} +{{- end }} + +{{/* +The log level represented as a number +*/}} +{{- define "rollup.logLevelNum" -}} +{{- if eq .Values.config.logLevel "error" }} +1 +{{- else if eq .Values.config.logLevel "warn" }} +2 +{{- else if eq .Values.config.logLevel "info" }} +3 +{{- else if eq .Values.config.logLevel "debug" }} +4 +{{- else if eq .Values.config.logLevel "trace" }} +5 +{{- end }} {{- end }} {{/* @@ -73,3 +95,11 @@ Return the appropriate apiVersion for ingress. {{- print "extensions/v1beta1" }} {{- end }} {{- end }} + +{{- define "rollup.gethHomeDir" -}} +/home/geth +{{- end }} + +{{- define "rollup.gethDataDir" -}} +{{ include "rollup.gethHomeDir" . }}/{{ include "rollup.name" . }} +{{- end }} diff --git a/charts/evm-rollup/templates/configmap.yaml b/charts/evm-rollup/templates/configmap.yaml index 1eb6272..6a08e4d 100644 --- a/charts/evm-rollup/templates/configmap.yaml +++ b/charts/evm-rollup/templates/configmap.yaml @@ -1,8 +1,8 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Values.config.rollup.name }}-conductor-env - namespace: {{ include "rollup.namespace" . }} + name: {{ include "rollup.name" . }}-conductor-env + namespace: {{ include "rollup.namespace" . }} data: ASTRIA_CONDUCTOR_LOG: "astria_conductor={{ .Values.config.logLevel }}" {{- if (index .Values "celestia-node").enabled }} @@ -14,26 +14,25 @@ data: {{- end }} ASTRIA_CONDUCTOR_CELESTIA_BLOCK_TIME_MS: "12000" ASTRIA_CONDUCTOR_EXECUTION_RPC_URL: "http://127.0.0.1:{{ .Values.ports.executionGRPC }}" - ASTRIA_CONDUCTOR_EXECUTION_COMMIT_LEVEL: "{{ .Values.config.rollup.executionCommitLevel }}" - ASTRIA_CONDUCTOR_INITIAL_SEQUENCER_BLOCK_HEIGHT: "{{ .Values.config.sequencer.initialBlockHeight }}" - ASTRIA_CONDUCTOR_SEQUENCER_GRPC_URL: "{{ .Values.config.sequencer.grpc }}" - ASTRIA_CONDUCTOR_SEQUENCER_COMETBFT_URL: "{{ .Values.config.sequencer.rpc }}" - ASTRIA_CONDUCTOR_SEQUENCER_BLOCK_TIME_MS: "{{ .Values.config.sequencer.blockTimeMs }}" - ASTRIA_CONDUCTOR_NO_METRICS: "{{ not .Values.config.rollup.metrics.enabled }}" + ASTRIA_CONDUCTOR_EXECUTION_COMMIT_LEVEL: "{{ .Values.config.conductor.executionCommitLevel }}" + ASTRIA_CONDUCTOR_SEQUENCER_GRPC_URL: "{{ tpl .Values.config.conductor.sequencerGrpc . }}" + ASTRIA_CONDUCTOR_SEQUENCER_COMETBFT_URL: "{{ tpl .Values.config.conductor.sequencerRpc . }}" + ASTRIA_CONDUCTOR_SEQUENCER_BLOCK_TIME_MS: "{{ .Values.config.conductor.sequencerBlockTimeMs }}" + ASTRIA_CONDUCTOR_NO_METRICS: "{{ not .Values.metrics.enabled }}" ASTRIA_CONDUCTOR_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.conductorMetrics }}" + ASTRIA_CONDUCTOR_SEQUENCER_REQUESTS_PER_SECOND: "{{ .Values.config.conductor.sequencerRequestsPerSecond }}" ASTRIA_CONDUCTOR_FORCE_STDOUT: "{{ .Values.global.useTTY }}" ASTRIA_CONDUCTOR_PRETTY_PRINT: "{{ .Values.global.useTTY }}" NO_COLOR: "{{ .Values.global.useTTY }}" - ASTRIA_CONDUCTOR_NO_OTEL: "{{ not .Values.config.rollup.otel.enabled }}" + ASTRIA_CONDUCTOR_NO_OTEL: "{{ not .Values.otel.enabled }}" ASTRIA_CONDUCTOR_CELESTIA_BEARER_TOKEN: "{{ .Values.config.celestia.token }}" - OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.config.rollup.otel.endpoint }}" - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ .Values.config.rollup.otel.tracesEndpoint }}" - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ .Values.config.rollup.otel.tracesTimeout }}" - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ .Values.config.rollup.otel.tracesCompression }}" - OTEL_EXPORTER_OTLP_HEADERS: "{{ .Values.config.rollup.otel.otlpHeaders }}" - OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ .Values.config.rollup.otel.traceHeaders }}" - OTEL_SERVICE_NAME: "{{ tpl .Values.config.rollup.otel.serviceNamePrefix . }}-conductor" - ASTRIA_CONDUCTOR_SEQUENCER_REQUESTS_PER_SECOND: "500" + OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.otel.endpoint }}" + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ .Values.otel.tracesEndpoint }}" + OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ .Values.otel.tracesTimeout }}" + OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ .Values.otel.tracesCompression }}" + OTEL_EXPORTER_OTLP_HEADERS: "{{ .Values.otel.otlpHeaders }}" + OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ .Values.otel.traceHeaders }}" + OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceNamePrefix . }}-conductor" {{- if not .Values.global.dev }} {{- else }} {{- end }} @@ -41,67 +40,16 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Values.config.rollup.name }}-composer-env + name: {{ include "rollup.name" . }}-geth-env namespace: {{ include "rollup.namespace" . }} data: - ASTRIA_COMPOSER_LOG: "astria_composer={{ .Values.config.logLevel }}" - ASTRIA_COMPOSER_API_LISTEN_ADDR: "0.0.0.0:{{ .Values.ports.composerHealthAPI }}" - ASTRIA_COMPOSER_GRPC_ADDR: "0.0.0.0:{{ .Values.ports.composerGRPC }}" - ASTRIA_COMPOSER_SEQUENCER_CHAIN_ID: "{{ .Values.config.sequencer.chainId }}" - ASTRIA_COMPOSER_SEQUENCER_URL: "{{ .Values.config.sequencer.rpc }}" - ASTRIA_COMPOSER_ROLLUPS: "{{ .Values.config.rollup.name }}::ws://127.0.0.1:{{ .Values.ports.wsRPC }}" - ASTRIA_COMPOSER_PRIVATE_KEY_FILE: "/var/secrets/{{ .Values.config.sequencer.privateKey.secret.filename }}" - ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE: "{{ .Values.config.rollup.maxBytesPerBundle }}" - ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY: "{{ .Values.config.rollup.bundleQueueCapacity }}" - ASTRIA_COMPOSER_MAX_SUBMIT_INTERVAL_MS: "{{ .Values.config.rollup.maxSubmitInterval }}" - ASTRIA_COMPOSER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencer.addressPrefixes.base }}" - ASTRIA_COMPOSER_FEE_ASSET: "{{ .Values.config.sequencer.nativeAssetBaseDenomination }}" - ASTRIA_COMPOSER_NO_METRICS: "{{ not .Values.config.rollup.metrics.enabled }}" - ASTRIA_COMPOSER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.composerMetrics }}" - ASTRIA_COMPOSER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" - ASTRIA_COMPOSER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" - NO_COLOR: "{{ .Values.global.useTTY }}" - ASTRIA_COMPOSER_NO_OTEL: "{{ not .Values.config.rollup.otel.enabled }}" - OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.config.rollup.otel.endpoint }}" - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ .Values.config.rollup.otel.tracesEndpoint }}" - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ .Values.config.rollup.otel.tracesTimeout }}" - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ .Values.config.rollup.otel.tracesCompression }}" - OTEL_EXPORTER_OTLP_HEADERS: "{{ .Values.config.rollup.otel.otlpHeaders }}" - OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ .Values.config.rollup.otel.traceHeaders }}" - OTEL_SERVICE_NAME: "{{ tpl .Values.config.rollup.otel.serviceNamePrefix . }}-composer" - {{- if not .Values.global.dev }} - {{- else }} - {{- end }} + home_dir: '{{ include "rollup.gethHomeDir" . }}' + data_dir: '{{ include "rollup.gethDataDir" . }}' --- -{{- if .Values.config.faucet.enabled }} apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Values.config.rollup.name }}-faucet-env - namespace: {{ include "rollup.namespace" . }} -data: - ETH_FAUCET_PROXYCOUNT: "{{ .Values.config.faucet.proxyCount }}" - ETH_FAUCET_PORT: "{{ .Values.ports.faucet }}" - ETH_FAUCET_EVM_PROVIDER_URL: "http://{{ .Values.config.rollup.name }}-evm-service:{{ .Values.ports.jsonRPC }}" - ETH_FAUCET_AMOUNT: "{{ .Values.config.faucet.amount }}" - {{- if not .Values.secretProvider.enabled }} - ETH_FAUCET_EVM_PRIVATE_KEY: "{{ .Values.config.faucet.privateKey.devContent }}" - {{- end }} ---- -{{- end }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.config.rollup.name }}-geth-env - namespace: {{ include "rollup.namespace" . }} -data: - home_dir: "/home/geth" - data_dir: "/home/geth/{{ .Values.config.rollup.name }}geth" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.config.rollup.name }}-executor-scripts + name: {{ include "rollup.name" . }}-executor-scripts namespace: {{ include "rollup.namespace" . }} data: geth-genesis.json: | @@ -109,172 +57,3 @@ data: init-geth.sh: | {{- tpl (.Files.Get "files/scripts/init-geth.sh") $ | nindent 4 }} --- -{{- if .Values.config.blockscout.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.config.rollup.name }}-blockscout-env - namespace: {{ include "rollup.namespace" . }} -data: - ACCOUNT_CLOAK_KEY: "" - ACCOUNT_ENABLED: "false" - ACCOUNT_REDIS_URL: "redis://localhost:6379" - API_RATE_LIMIT: "50" - API_RATE_LIMIT_BY_IP: "3000" - API_RATE_LIMIT_BY_IP_TIME_INTERVAL: "5m" - API_RATE_LIMIT_BY_KEY: "50" - API_RATE_LIMIT_BY_WHITELISTED_IP: "50" - API_RATE_LIMIT_STATIC_API_KEY: "" - API_RATE_LIMIT_TIME_INTERVAL: "1s" - API_RATE_LIMIT_UI_V2_TOKEN_TTL_IN_SECONDS: "18000" - API_RATE_LIMIT_UI_V2_WITH_TOKEN: "5" - API_RATE_LIMIT_WHITELISTED_IPS: "" - API_V1_READ_METHODS_DISABLED: "false" - API_V1_WRITE_METHODS_DISABLED: "false" - APPS_MENU: "true" - BLOCK_TRANSFORMER: "base" - BLOCKSCOUT_HOST: "" - BLOCKSCOUT_PROTOCOL: "" - CACHE_ADDRESS_SUM_PERIOD: "3600" - CACHE_ADDRESS_TOKEN_TRANSFERS_COUNTER_PERIOD: "1800" - CACHE_ADDRESS_TOKENS_USD_SUM_PERIOD: "3600" - CACHE_ADDRESS_TRANSACTIONS_COUNTER_PERIOD: "1800" - CACHE_ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_PERIOD: "1800" - CACHE_ADDRESS_WITH_BALANCES_UPDATE_INTERVAL: "1800" - CACHE_AVERAGE_BLOCK_PERIOD: "1800" - CACHE_BLOCK_COUNT_PERIOD: "7200" - CACHE_MARKET_HISTORY_PERIOD: "21600" - CACHE_TOKEN_HOLDERS_COUNTER_PERIOD: "3600" - CACHE_TOKEN_TRANSFERS_COUNTER_PERIOD: "3600" - CACHE_TOTAL_GAS_USAGE_PERIOD: "3600" - CACHE_TXS_COUNT_PERIOD: "7200" - CHAIN_ID: "" - CHECKSUM_ADDRESS_HASHES: "true" - CHECKSUM_FUNCTION: "eth" - COIN: "" - COIN_BALANCE_HISTORY_DAYS: "90" - COIN_NAME: "" - CONTRACT_MAX_STRING_LENGTH_WITHOUT_TRIMMING: "2040" - CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS: "homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg,istanbul,berlin,london,paris,shanghai,default" - CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS: "byzantium,constantinople,petersburg,istanbul,berlin,paris,shanghai,default" - DATABASE_URL: "postgresql://postgres:@localhost:5432/blockscout?ssl=false" - DECODE_NOT_A_CONTRACT_CALLS: "true" - DISABLE_EXCHANGE_RATES: "true" - DISABLE_INDEXER: "false" - DISABLE_REALTIME_INDEXER: "false" - DISABLE_WEBAPP: "false" - DISPLAY_TOKEN_ICONS: "false" - ECTO_USE_SSL: "false" - EIP_1559_ELASTICITY_MULTIPLIER: "2" - EMISSION_FORMAT: "DEFAULT" - ETHEREUM_JSONRPC_DISABLE_ARCHIVE_BALANCES: "false" - ETHEREUM_JSONRPC_HTTP_URL: "http://{{ .Values.config.rollup.name }}-evm-service:{{ .Values.ports.jsonRPC }}/" - ETHEREUM_JSONRPC_TRACE_URL: "http://{{ .Values.config.rollup.name }}-evm-service:{{ .Values.ports.jsonRPC }}/" - ETHEREUM_JSONRPC_WS_URL: "ws://{{ .Values.config.rollup.name }}-evm-service:{{ .Values.ports.wsRPC }}/" - ETHEREUM_JSONRPC_TRANSPORT: "http" - ETHEREUM_JSONRPC_VARIANT: "geth" - EXCHANGE_RATES_COIN: "" - EXTERNAL_APPS: '[]' - FETCH_REWARDS_WAY: "trace_block" - FOOTER_LINK_TO_OTHER_EXPLORERS: "false" - FOOTER_LOGO: "/images/blockscout_logo.svg" - FOOTER_OTHER_EXPLORERS: '{}' - HEART_BEAT_TIMEOUT: "30" - HIDE_BLOCK_MINER: "false" - INDEXER_DISABLE_INTERNAL_TRANSACTIONS_FETCHER: "false" - INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER: "false" - INDEXER_DISABLE_TOKEN_INSTANCE_REALTIME_FETCHER: "false" - INDEXER_DISABLE_TOKEN_INSTANCE_RETRY_FETCHER: "false" - INDEXER_DISABLE_TOKEN_INSTANCE_SANITIZE_FETCHER: "false" - IPC_PATH: "" - JSON_RPC: "" - LOGO: "/images/blockscout_logo.svg" - MAINTENANCE_ALERT_MESSAGE: "" - MAX_SIZE_UNLESS_HIDE_ARRAY: "50" - MICROSERVICE_ETH_BYTECODE_DB_INTERVAL_BETWEEN_LOOKUPS: "10m" - MICROSERVICE_SC_VERIFIER_ENABLED: "true" - MICROSERVICE_SC_VERIFIER_TYPE: "sc_verifier" - MICROSERVICE_SC_VERIFIER_URL: "http://localhost:8150/" - MICROSERVICE_SIG_PROVIDER_ENABLED: "true" - MICROSERVICE_SIG_PROVIDER_URL: "http://localhost:8050/" - MICROSERVICE_VISUALIZE_SOL2UML_ENABLED: "true" - MICROSERVICE_VISUALIZE_SOL2UML_URL: "http://localhost:8151/" - NETWORK: "{{ .Values.config.rollup.name }}" - NETWORK_PATH: "/" - POOL_SIZE: "90" - POOL_SIZE_API: "10" - PORT: "4000" - RE_CAPTCHA_CLIENT_KEY: "" - RE_CAPTCHA_DISABLED: "false" - RE_CAPTCHA_SECRET_KEY: "" - RE_CAPTCHA_V3_CLIENT_KEY: "" - RE_CAPTCHA_V3_SECRET_KEY: "" - RELEASE_LINK: "" - SHOW_ADDRESS_MARKETCAP_PERCENTAGE: "true" - SHOW_MAINTENANCE_ALERT: "false" - SHOW_PRICE_CHART: "false" - SHOW_PRICE_CHART_LEGEND: "false" - SHOW_TENDERLY_LINK: "false" - SHOW_TXS_CHART: "true" - SOURCIFY_INTEGRATION_ENABLED: "false" - SOURCIFY_REPO_URL: "" - SOURCIFY_SERVER_URL: "" - SUBNETWORK: {{ .Values.config.rollup.name | title }} - SUPPORTED_CHAINS: '{}' - TENDERLY_CHAIN_PATH: "" - TOKEN_METADATA_UPDATE_INTERVAL: "172800" - TXS_HISTORIAN_INIT_LAG: "0" - TXS_STATS_DAYS_TO_COMPILE_AT_INIT: "10" - TXS_STATS_ENABLED: "true" - UNCLES_IN_AVERAGE_BLOCK_TIME: "false" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ .Values.config.rollup.name }}-smart-contract-verifier-env - namespace: {{ include "rollup.namespace" . }} -data: - SMART_CONTRACT_VERIFIER__JAEGER__AGENT_ENDPOINT: "localhost:6831" - SMART_CONTRACT_VERIFIER__JAEGER__ENABLED: "false" - SMART_CONTRACT_VERIFIER__METRICS__ADDR: "0.0.0.0:6060" - SMART_CONTRACT_VERIFIER__METRICS__ENABLED: "false" - SMART_CONTRACT_VERIFIER__METRICS__ROUTE: "/metrics" - SMART_CONTRACT_VERIFIER__SERVER__GRPC__ADDR: "0.0.0.0:8151" - SMART_CONTRACT_VERIFIER__SERVER__GRPC__ENABLED: "false" - SMART_CONTRACT_VERIFIER__SERVER__HTTP__ADDR: "0.0.0.0:8150" - SMART_CONTRACT_VERIFIER__SERVER__HTTP__ENABLED: "true" - SMART_CONTRACT_VERIFIER__SERVER__HTTP__MAX_BODY_SIZE: "2097152" - SMART_CONTRACT_VERIFIER__SOLIDITY__COMPILERS_DIR: "/tmp/solidity-compilers" - SMART_CONTRACT_VERIFIER__SOLIDITY__ENABLED: "true" - SMART_CONTRACT_VERIFIER__SOLIDITY__FETCHER__LIST__LIST_URL: "https://solc-bin.ethereum.org/linux-amd64/list.json" - SMART_CONTRACT_VERIFIER__SOLIDITY__REFRESH_VERSIONS_SCHEDULE: "0 0 * * * * *" - SMART_CONTRACT_VERIFIER__SOURCIFY__API_URL: "https://sourcify.dev/server/" - SMART_CONTRACT_VERIFIER__SOURCIFY__ENABLED: "true" - SMART_CONTRACT_VERIFIER__SOURCIFY__REQUEST_TIMEOUT: "10" - SMART_CONTRACT_VERIFIER__SOURCIFY__VERIFICATION_ATTEMPTS: "3" - SMART_CONTRACT_VERIFIER__VYPER__COMPILERS_DIR: "/tmp/vyper-compilers" - SMART_CONTRACT_VERIFIER__VYPER__ENABLED: "true" - SMART_CONTRACT_VERIFIER__VYPER__FETCHER__LIST__LIST_URL: "https://raw.githubusercontent.com/blockscout/solc-bin/main/vyper.list.json" - SMART_CONTRACT_VERIFIER__VYPER__REFRESH_VERSIONS_SCHEDULE: "0 0 * * * * *" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ include "rollup.namespace" . }} - name: {{ .Values.config.rollup.name }}-visualizer-env -data: - VISUALIZER__SERVER__GRPC__ENABLED: "false" - VISUALIZER__SERVER__HTTP__ADDR: "0.0.0.0:8151" ---- -{{- end }} -{{- if not .Values.secretProvider.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - namespace: {{ include "rollup.namespace" . }} - name: sequencer-private-key -data: - {{ .Values.config.sequencer.privateKey.secret.filename }}: | - {{ .Values.config.sequencer.privateKey.devContent }} ---- -{{- end }} diff --git a/charts/evm-rollup/templates/ingress.yaml b/charts/evm-rollup/templates/ingress.yaml index 220cada..efb13ca 100644 --- a/charts/evm-rollup/templates/ingress.yaml +++ b/charts/evm-rollup/templates/ingress.yaml @@ -6,7 +6,7 @@ {{- range $service, $ingress := .Values.ingress.services }} {{- if $ingress.enabled -}} {{- $servicePort := $ingress.service.port -}} -{{- $serviceName := $ingress.service.name -}} +{{- $serviceName := tpl $ingress.service.name $ -}} {{- $ingressPath := $ingress.path -}} {{- $ingressPathType := $ingress.pathType -}} {{- $extraPaths := $ingress.extraPaths }} @@ -14,8 +14,8 @@ apiVersion: {{ include "rollup.ingress.apiVersion" $ }} kind: Ingress metadata: - name: {{ $.Values.config.rollup.name }}-{{ $service }}-ingress - namespace: {{ include "rollup.namespace" $ }} + name: {{ include "rollup.name" $ }}-{{ $service }}-ingress + namespace: {{ include "rollup.namespace" $ }} labels: {{- with $ingress.labels }} {{- toYaml . | nindent 4 }} diff --git a/charts/evm-rollup/templates/prometheusrule.yaml b/charts/evm-rollup/templates/prometheusrule.yaml index b0157db..128a52f 100644 --- a/charts/evm-rollup/templates/prometheusrule.yaml +++ b/charts/evm-rollup/templates/prometheusrule.yaml @@ -1,20 +1,20 @@ -{{- if .Values.config.rollup.alerting.enabled -}} +{{- if .Values.alerting.enabled -}} apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: - name: {{ template "rollup.fullname" . }} -{{- if .Values.config.rollup.alerting.prometheusRule.namespace }} - namespace: {{ .Values.config.rollup.alerting.prometheusRule.namespace | quote }} + name: {{ template "rollup.appName" . }} +{{- if .Values.alerting.prometheusRule.namespace }} + namespace: {{ .Values.alerting.prometheusRule.namespace | quote }} {{- end }} labels: {{- include "rollup.labels" . | nindent 4 }} - {{- if .Values.config.rollup.alerting.prometheusRule.additionalLabels }} - {{- toYaml .Values.config.rollup.alerting.prometheusRule.additionalLabels | nindent 4 }} + {{- if .Values.alerting.prometheusRule.additionalLabels }} + {{- toYaml .Values.alerting.prometheusRule.additionalLabels | nindent 4 }} {{- end }} spec: {{- if .Values.config.rollup.alerting.prometheusRule.rules }} groups: - - name: {{ template "rollup.fullname" . }} - rules: {{- toYaml .Values.config.rollup.alerting.prometheusRule.rules | nindent 4 }} + - name: {{ template "rollup.name" . }} + rules: {{- toYaml .Values.alerting.prometheusRule.rules | nindent 4 }} {{- end }} {{- end }} diff --git a/charts/evm-rollup/templates/secretproviderclass.yaml b/charts/evm-rollup/templates/secretproviderclass.yaml deleted file mode 100644 index 0fdbf3d..0000000 --- a/charts/evm-rollup/templates/secretproviderclass.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.secretProvider.enabled }} -apiVersion: secrets-store.csi.x-k8s.io/v1 -kind: SecretProviderClass -metadata: - name: sequencer-private-key -spec: - provider: {{ .Values.secretProvider.provider }} - parameters: - {{- $_ := set $ "key" .Values.config.sequencer.privateKey.secret }} - {{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} ---- -{{- if .Values.config.faucet.enabled }} -apiVersion: secrets-store.csi.x-k8s.io/v1 -kind: SecretProviderClass -metadata: - name: faucet-private-key -spec: - provider: {{ .Values.secretProvider.provider }} - secretObjects: - - secretName: faucet-private-key - type: Opaque - data: - - objectName: {{ .Values.config.faucet.privateKey.secret.filename }} - key: {{ .Values.config.faucet.privateKey.secret.key }} - parameters: - {{- $_ := set $ "key" .Values.config.faucet.privateKey.secret }} - {{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} ---- -{{- end }} -{{- end }} diff --git a/charts/evm-rollup/templates/service.yaml b/charts/evm-rollup/templates/service.yaml index add1edd..a3c3ce2 100644 --- a/charts/evm-rollup/templates/service.yaml +++ b/charts/evm-rollup/templates/service.yaml @@ -1,11 +1,11 @@ kind: Service apiVersion: v1 metadata: - name: {{ .Values.config.rollup.name }}-evm-service + name: {{ include "rollup.name" . }}-evm-service namespace: {{ include "rollup.namespace" . }} spec: selector: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} ports: - name: json-rpc-svc port: {{ .Values.ports.jsonRPC }} @@ -14,54 +14,21 @@ spec: port: {{ .Values.ports.wsRPC }} targetPort: ws-rpc --- -{{- if .Values.config.faucet.enabled}} +{{- if .Values.metrics.enabled }} kind: Service apiVersion: v1 metadata: - name: {{ .Values.config.rollup.name }}-faucet-service - namespace: {{ include "rollup.namespace" . }} -spec: - selector: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - ports: - - name: faucet-svc - port: {{ .Values.ports.faucet }} - targetPort: faucet ---- -{{- end }} -{{- if .Values.config.blockscout.enabled }} -kind: Service -apiVersion: v1 -metadata: - name: {{ .Values.config.rollup.name }}-blockscout-svc - namespace: {{ include "rollup.namespace" . }} -spec: - selector: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - ports: - - name: blockscout-svc - port: {{ .Values.ports.blockscout }} - targetPort: blockscout ---- -{{- end }} -{{- if .Values.config.rollup.metrics.enabled }} -kind: Service -apiVersion: v1 -metadata: - name: {{ .Values.config.rollup.name }}-metrics + name: {{ include "rollup.name" . }}-metrics namespace: {{ include "rollup.namespace" . }} labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} spec: selector: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} ports: - name: geth-metr port: {{ .Values.ports.metrics }} targetPort: geth-metr - - name: composer-metr - port: {{ .Values.ports.composerMetrics }} - targetPort: composer-metr - name: conductor-metr port: {{ .Values.ports.conductorMetrics }} targetPort: conductor-metr diff --git a/charts/evm-rollup/templates/servicemonitor.yaml b/charts/evm-rollup/templates/servicemonitor.yaml index c0a6f7e..e7b6ad4 100644 --- a/charts/evm-rollup/templates/servicemonitor.yaml +++ b/charts/evm-rollup/templates/servicemonitor.yaml @@ -1,11 +1,11 @@ -{{- if .Values.config.rollup.serviceMonitor.enabled }} +{{- if .Values.serviceMonitor.enabled }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: {{ .Values.config.rollup.name }}-geth-metrics + name: {{include "rollup.name" . }}-geth-metrics labels: {{- include "rollup.labels" . | nindent 4 }} - {{- with .Values.config.rollup.serviceMonitor.additionalLabels }} + {{- with .Values.serviceMonitor.additionalLabels }} {{- toYaml . | nindent 4 }} {{- end }} spec: @@ -15,30 +15,22 @@ spec: - {{ include "rollup.namespace" . }} selector: matchLabels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} endpoints: - port: geth-metr path: /debug/metrics/prometheus - {{- with .Values.config.rollup.serviceMonitor.interval }} + {{- with .Values.serviceMonitor.interval }} interval: {{ . }} {{- end }} - {{- with .Values.config.rollup.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ . }} - {{- end }} - - port: composer-metr - path: / - {{- with .Values.config.rollup.serviceMonitor.interval }} - interval: {{ . }} - {{- end }} - {{- with .Values.config.rollup.serviceMonitor.scrapeTimeout }} + {{- with .Values.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ . }} {{- end }} - port: conductor-metr path: / - {{- with .Values.config.rollup.serviceMonitor.interval }} + {{- with .Values.serviceMonitor.interval }} interval: {{ . }} {{- end }} - {{- with .Values.config.rollup.serviceMonitor.scrapeTimeout }} + {{- with .Values.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ . }} {{- end }} {{- end }} diff --git a/charts/evm-rollup/templates/statefulsets.yaml b/charts/evm-rollup/templates/statefulsets.yaml index 4681fce..50cb283 100644 --- a/charts/evm-rollup/templates/statefulsets.yaml +++ b/charts/evm-rollup/templates/statefulsets.yaml @@ -1,92 +1,63 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ .Values.config.rollup.name }}-geth + name: {{ include "rollup.name" . }}-geth labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} namespace: {{ include "rollup.namespace" . }} spec: replicas : {{ .Values.global.replicaCount }} selector: matchLabels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} template: metadata: - name: {{ .Values.config.rollup.name }}-execution-chain + name: {{ include "rollup.name" . }}-execution-chain labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster + app: {{ include "rollup.appName" . }} spec: initContainers: - {{- if .Values.config.rollup.purgeMempool }} + {{- if .Values.config.geth.purgeMempool }} - name: purge-mempool image: {{ include "rollup.image" . }} - command: [ "sh", "-c", "rm -f $data_dir/geth/transactions.rlp" ] - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-geth-env + command: [ "sh", "-c", "rm" ] + args: + - -f + - {{ include "rollup.gethDataDir" . }}/geth/transactions.rlp volumeMounts: - mountPath: /home/geth - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/executor + name: {{ include "rollup.name" $ }}-rollup-shared-storage-vol + subPath: {{ include "rollup.name" . }}/executor {{- end }} - name: init-geth command: [ "/scripts/init-geth.sh" ] image: {{ include "rollup.image" . }} + envFrom: + - configMapRef: + name: {{ include "rollup.name" . }}-geth-env volumeMounts: - mountPath: /scripts/ - name: {{ .Values.config.rollup.name }}-executor-scripts-volume + name: {{ include "rollup.name" . }}-executor-scripts-volume - mountPath: /home/geth - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/executor - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-geth-env + name: {{ include "rollup.name" $ }}-rollup-shared-storage-vol + subPath: {{ include "rollup.name" . }}/executor containers: - name: geth command: [ "geth" ] args: - - --datadir=$(data_dir)/ - - --networkid={{ .Values.config.rollup.networkId }} - - --http - - --http.addr=0.0.0.0 - - --http.port={{ .Values.ports.jsonRPC }} - - --http.corsdomain=* - - --http.vhosts=* - - --http.api=eth,net,web3,debug,txpool - - --ws - - --ws.addr=0.0.0.0 - - --ws.port={{ .Values.ports.wsRPC }} - - --ws.origins=* - - --grpc - - --grpc.addr=0.0.0.0 - - --grpc.port={{ .Values.ports.executionGRPC }} - - --db.engine={{ .Values.config.rollup.dbEngine }} - - --maxpeers=0 - {{- if .Values.config.rollup.archiveNode }} - - --gcmode=archive - - --state.scheme=hash - - --history.transactions=0 - - --history.state=0 - {{- else }} - - --state.scheme=path - - --history.state=540000 + {{- range $arg := .Values.config.geth.flags }} + {{- if $arg.condition | default true }} + - --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} {{- end }} - {{ if .Values.config.rollup.metrics.enabled }} - - --metrics - - --metrics.addr=0.0.0.0 - - --metrics.port={{ .Values.ports.metrics }} {{- end }} image: {{ include "rollup.image" . }} volumeMounts: - mountPath: /scripts/ - name: {{ .Values.config.rollup.name }}-executor-scripts-volume + name: {{ include "rollup.name" . }}-executor-scripts-volume readOnly: true - mountPath: /home/geth - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/executor - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-geth-env + name: {{ include "rollup.name" . }}-rollup-shared-storage-vol + subPath: {{ include "rollup.name" . }}/executor ports: - containerPort: {{ .Values.ports.jsonRPC }} name: json-rpc @@ -94,40 +65,12 @@ spec: name: ws-rpc - containerPort: {{ .Values.ports.executionGRPC }} name: execution-grpc - {{- if .Values.config.rollup.metrics.enabled }} + {{- if .Values.metrics.enabled }} - containerPort: {{ .Values.ports.metrics }} name: geth-metr {{- end }} resources: {{- toYaml .Values.resources.geth | trim | nindent 12 }} - - name: composer - image: {{ include "composer.image" . }} - command: [ "/usr/local/bin/astria-composer" ] - stdin: {{ .Values.global.useTTY }} - tty: {{ .Values.global.useTTY }} - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-composer-env - volumeMounts: - - mountPath: "/var/secrets" - name: sequencer-private-key - startupProbe: - httpGet: - path: /readyz - port: {{ .Values.ports.composerHealthAPI }} - readinessProbe: - httpGet: - path: /readyz - port: {{ .Values.ports.composerHealthAPI }} - ports: - {{- if .Values.config.rollup.metrics.enabled }} - - containerPort: {{ .Values.ports.composerMetrics }} - name: composer-metr - {{- end }} - - containerPort: {{ .Values.ports.composerHealthAPI }} - name: composer-api - resources: - {{- toYaml .Values.resources.composer | trim | nindent 12 }} - name: conductor image: {{ include "conductor.image" . }} command: [ "/usr/local/bin/astria-conductor" ] @@ -135,126 +78,24 @@ spec: tty: {{ .Values.global.useTTY }} envFrom: - configMapRef: - name: {{ .Values.config.rollup.name }}-conductor-env + name: {{ include "rollup.name" . }}-conductor-env resources: {{- toYaml .Values.resources.conductor | trim | nindent 12 }} - {{- if .Values.config.rollup.metrics.enabled }} + {{- if .Values.metrics.enabled }} ports: - containerPort: {{ .Values.ports.conductorMetrics }} name: conductor-metr {{- end }} volumes: - - name: {{ .Values.config.rollup.name }}-executor-scripts-volume + - name: {{ include "rollup.name" . }}-executor-scripts-volume configMap: - name: {{ .Values.config.rollup.name }}-executor-scripts + name: {{ include "rollup.name" . }}-executor-scripts defaultMode: 0500 - - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - {{- if .Values.storage.enabled }} - persistentVolumeClaim: - claimName: {{ $.Values.config.rollup.name }}-rollup-shared-storage-pvc-geth - {{- else }} - emptyDir: {} - {{- end }} - - name: sequencer-private-key - {{- if .Values.secretProvider.enabled }} - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: sequencer-private-key - {{- else }} - configMap: - name: sequencer-private-key - {{- end }} ---- -{{- if .Values.config.blockscout.enabled }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ .Values.config.rollup.name }}-blockscout - labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - namespace: {{ include "rollup.namespace" . }} -spec: - replicas : {{ .Values.global.replicaCount }} - selector: - matchLabels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - template: - metadata: - name: {{ .Values.config.rollup.name }}-blockscout-local - labels: - app: {{ .Values.config.rollup.name }}-astria-dev-cluster - spec: - containers: - - name: blockscout - command: ["bash"] - args: - - -c - - bin/blockscout eval "Elixir.Explorer.ReleaseTasks.create_and_migrate()" && bin/blockscout start - image: {{ .Values.images.blockscout.core }} - volumeMounts: - - mountPath: /app/logs - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/blockscout/logs - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-blockscout-env - ports: - - containerPort: {{ .Values.ports.blockscout }} - name: blockscout - - name: postgres - command: ["docker-entrypoint.sh"] - args: - - -c - - max_connections=200 - env: - - name: POSTGRES_HOST_AUTH_METHOD - value: trust - - name: POSTGRES_PASSWORD - - name: POSTGRES_USER - value: postgres - image: {{ .Values.images.blockscout.postgres }} - ports: - - containerPort: 5432 - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/blockscout/postgres - - name: redis - command: ["redis-server"] - image: {{ .Values.images.blockscout.redis }} - ports: - - containerPort: 6379 - volumeMounts: - - mountPath: /data - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol - subPath: {{ .Values.config.rollup.name }}/blockscout/redis - - name: sig-provider - image: {{ .Values.images.blockscout.sigProvider }} - ports: - - containerPort: 8050 - - name: smart-contract-verifier - image: {{ .Values.images.blockscout.smartContractVerifier }} - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-smart-contract-verifier-env - ports: - - containerPort: 8150 - - name: visualizer - image: {{ .Values.images.blockscout.visualizer }} - envFrom: - - configMapRef: - name: {{ .Values.config.rollup.name }}-visualizer-env - ports: - - containerPort: 8151 - volumes: - - name: {{ $.Values.config.rollup.name }}-rollup-shared-storage-vol + - name: {{ include "rollup.name" $ }}-rollup-shared-storage-vol {{- if .Values.storage.enabled }} persistentVolumeClaim: - claimName: {{ $.Values.config.rollup.name }}-rollup-shared-storage-pvc-blockscout + claimName: {{ include "rollup.name" $ }}-rollup-shared-storage-pvc-geth {{- else }} emptyDir: {} {{- end }} --- -{{- end }} diff --git a/charts/evm-rollup/values.yaml b/charts/evm-rollup/values.yaml index fb56125..0269bd0 100644 --- a/charts/evm-rollup/values.yaml +++ b/charts/evm-rollup/values.yaml @@ -20,193 +20,171 @@ images: tag: "0.8.0" devTag: latest - # Rollup faucet - faucet: "ghcr.io/astriaorg/ria-faucet:0.0.1" - # Pertaining to deploying blockscout block explorer - blockscout: - core: "docker.io/blockscout/blockscout:5.1.0" - postgres: "docker.io/library/postgres:14" - redis: "docker.io/library/redis:alpine" - sigProvider: "ghcr.io/blockscout/sig-provider@sha256:ae371ce8d0a20993bf61ca81b3394416f4778c9edd398250fd4d81a8d6820950" - smartContractVerifier: "ghcr.io/blockscout/smart-contract-verifier@sha256:f07b2d874c28d45f5ba81f297c868a746a03771e8b6d9b8e96f0eba0beeb1016" - visualizer: "ghcr.io/blockscout/visualizer@sha256:99479da126248e0aba5c32b1e32625f8c527b72924f55cb510b50e5f854b2d15" +genesis: + ## These values are used to configure the genesis block of the rollup chain + ## no defaults as they are unique to each chain + + # The name of the rollup chain, used to generate the Rollup ID + rollupName: "" + # Block height to start syncing rollup from, lowest possible is 2 + sequencerInitialHeight: "" + # The first Celestia height to utilize when looking for rollup data + celestiaInitialHeight: "" + # The variance in Celestia height to allow before halting the chain + celestiaHeightVariance: "" + # Will fill the extra data in each block, can be left empty + # can also fill with something unique for your chain. + extraDataOverride: "" + + ## These are general configuration values with some recommended defaults + + # Configure the gas Limit + gasLimit: "50000000" + # If set to true the genesis block will contain extra data + overrideGenesisExtraData: true + # The hrp for bech32m addresses, unlikely to be changed + sequencerAddressPrefix: "astria" + + ## These values are used to configure astria native bridging + ## Many of the fields have commented out example fields + + # When using an erc20 canonical bridge, the address from which tokens will + # be sent via the bridge contract + bridgeSenderAddress: "0x0000000000000000000000000000000000000000" + # Configure the sequencer bridge addresses and allowed assets if using + # the astria canonical bridge. Recommend removing alloc values if so. + bridgeAddresses: [] + # - address: "684ae50c49a434199199c9c698115391152d7b3f" + # startHeight: 1 + # assetDenom: "nria" + # assetPrecision: 9 + + + ## Fee configuration + + # Configure the fee collector for the evm tx fees, activated at block heights. + # If not configured, all tx fees will be burned. + feeCollectors: {} + # 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" + # Configure EIP-1559 params, activated at block heights + eip1559Params: {} + # 1: + # minBaseFee: 0 + # elasticityMultiplier: 2 + # baseFeeChangeDenominator: 8 + + ## Standard Eth Genesis config values + # An EVM chain number id, different from the astria rollup name + chainId: "" + # Configuration of Eth forks, setting to 0 will enable from height, + # left as is these forks will not activate. + cancunTime: "" + pragueTime: "" + verkleTime: "" + # Can configure the genesis allocs for the chain + alloc: + # Deploying the deterministic deploy proxy contract in genesis + # Forge and other tools use this for their CREATE2 usage, but + # can only be included through the genesis block after EIP-155 + # https://github.com/Arachnid/deterministic-deployment-proxy + - address: "0x4e59b44847b379578588920cA78FbF26c0B4956C" + value: + balance: "0" + code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3" + # Example of simple genesis account funding + # - address: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" + # value: + # # The balance must be a string due to size + # balance: "1000000000000000000000000000" config: # The level at which core astria components will log out # Options are: error, warn, info, and debug logLevel: "debug" - rollup: - # string name for the rollup chain, used to generate Rollup ID - name: "" - # EVM network ID used by the chain - networkId: "" - # Can be set to 'pebble' or 'leveldb' - dbEngine: pebble + geth: # Set to true to keep history of all blocks archiveNode: false # Set to true to clear the mempool on startup/restart purgeMempool: false + flags: + - name: datadir + value: '{{ include "rollup.gethDataDir" . }}' + - name: networkid + value: "{{ tpl .Values.genesis.chainId . }}" + - name: http + - name: http.addr + value: 0.0.0.0 + - name: http.port + value: "{{ .Values.ports.jsonRPC }}" + - name: http.corsdomain + value: "*" + - name: http.vhosts + value: "*" + - name: http.api + value: eth,net,web3,debug,txpool + - name: ws + - name: ws.addr + value: 0.0.0.0 + - name: ws.port + value: "{{ .Values.ports.wsRPC }}" + - name: ws.origins + value: "*" + - name: grpc + - name: grpc.addr + value: 0.0.0.0 + - name: grpc.port + value: "{{ .Values.ports.executionGRPC }}" + - name: db.engine + value: pebble # Can be set to 'pebble' or 'leveldb' + - name: maxpeers + value: "0" + - name: rpc.gascap + value: "{{ .Values.genesis.gasLimit }}" + - name: rpc.txfeecap + value: "0" + - name: gcmode + value: "{{- if .Values.config.geth.archiveNode -}} archive {{- else -}} full {{- end }}" + - name: state.scheme + value: "{{- if .Values.config.geth.archiveNode -}} hash {{- else -}} path {{- end }}" + - name: history.transactions + value: "{{- if .Values.config.geth.archiveNode -}} 0 {{- else -}} 2350000 {{- end }}" + - name: history.state + value: "{{- if .Values.config.geth.archiveNode -}} 0 {{- else -}} 540000 {{- end }}" + - name: metrics + condition: .Values.metrics.enabled + - name: metrics.addr + value: 0.0.0.0 + condition: .Values.metrics.enabled + - name: metrics.port + value: "{{ .Values.ports.metrics }}" + condition: .Values.metrics.enabled + + + conductor: # Determines what will drive block execution, options are: # - "SoftOnly" -> blocks are only pulled from the sequencer # - "FirmOnly" -> blocks are only pulled from DA # - "SoftAndFirm" -> blocks are pulled from both the sequencer and DA executionCommitLevel: 'SoftAndFirm' - # Max bytes to encode into a single sequencer `SignedTransaction`, not including signature, - # public key, nonce. This is the sum of the sizes of all the `SequenceAction`s. Should be - # set below the sequencer's max block size to allow space for encoding, signature, public - # key and nonce bytes - maxBytesPerBundle: 200000 - # Max amount of bundles that can be in the submission queue. - # ASTRIA_COMPOSER_BUNDLE_QUEUE_CAPACITY * ASTRIA_COMPOSER_MAX_BYTES_PER_BUNDLE (e.g. - # 40000 * 200KB = 8GB) is the limit on how much memory the finished bundle queue can consume. - # This should be lower than the resource limit enforced by Kubernetes on the pod, defined below - bundleQueueCapacity: 40000 - maxSubmitInterval: 2000 - # Configuration specific to EVM rollup genesis - genesis: - # Configuration of Eth forks, setting to 0 will enable from height, - # left as is these forks will not activate. - shanghaiTime: "" - cancunTime: "" - pragueTime: "" - verkleTime: "" - # Configure the gas Limit - gasLimit: "8000000" - # Set to a hex set of bytes if your rollup has manually configured extra data - extraDataOverride: "" - # If set to true the genesis block will contain extra data - overrideGenesisExtraData: true - # When using an erc20 canonical bridge, the address from which tokens will - # be sent via the bridge contract - bridgeSenderAddress: "0x0000000000000000000000000000000000000000" - # Configure the sequencer bridge addresses and allowed assets if using - # the astria canonical bridge. Recommend removing alloc values if so. - bridgeAddresses: [] - # - address: "684ae50c49a434199199c9c698115391152d7b3f" - # startHeight: 1 - # assetDenom: "nria" - # assetPrecision: 9 - # Configure the fee collector for the evm tx fees, activated at block heights. - # If not configured, all tx fees will be burned. - feeCollectors: - 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" - # Configure EIP-1559 params, activated at block heights - eip1559Params: {} - # 1: - # minBaseFee: 0 - # elasticityMultiplier: 2 - # baseFeeChangeDenominator: 8 - # Can configure the genesis allocs for the chain - alloc: - # Deploying the deterministic deploy proxy contract in genesis - # Forge and other tools use this for their CREATE2 usage, but - # can only be included through the genesis block after EIP-155 - # https://github.com/Arachnid/deterministic-deployment-proxy - - address: "0x4e59b44847b379578588920cA78FbF26c0B4956C" - value: - balance: "0" - code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3" - # Example of simple genesis account funding - # - address: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" - # value: - # # The balance must be a string due to size - # balance: "1000000000000000000000000000" - metrics: - # set to enable prometheus metrics - enabled: false - otel: - enabled: false - serviceNamePrefix: "{{ .Values.config.rollup.name }}" - endpoint: - tracesEndpoint: - tracesCompression: gzip - tracesTimeout: 10 - otlpHeaders: - traceHeaders: - serviceMonitor: - # set to enable port svc and service monitor - enabled: false - port: 6060 - additionalLabels: - release: kube-prometheus-stack - alerting: - enabled: false - interval: "" - additionalLabels: - release: kube-prometheus-stack - annotations: {} - # scrapeTimeout: 10s - # path: /metrics - prometheusRule: - enabled: true - additionalLabels: - release: kube-prometheus-stack - namespace: monitoring - rules: - - alert: Geth_Slow_Finalized - expr: increase(chain_head_finalized{namespace="astria-dusk3-cluster"}[5m]) < 20 # Insert your query Expression - for: 5m # Rough number but should be enough to init warn - labels: - severity: critical - annotations: - summary: Slow Chain Head Finalized (instance {{ $labels.instance }}) - description: "Chain Head Finalized on {{ $labels.namespace }} is increasing at a rate slower then 20 blocks per 5 minute\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - faucet: - enabled: false - proxyCount: 1 - # The account from which the faucet disburses funds, likely want to have - # the corresponding account given a balance in genesis accounts. - # Note: When secretProvider.enabled is true the secret provided by - # `evmPrivateKey` is used instead of this value. - privateKey: - devContent: "" - secret: - filename: "key.hex" - resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest" - key: token - # The amount of token to give per request - amount: 1 - - # Configuration related to sequencer connection for rollup - sequencer: - addressPrefixes: - base: "astria" - nativeAssetBaseDenomination: nria - chainId: "" - # Block height to start syncing rollup from - initialBlockHeight: "2" - # Fastest block time possible in MS - blockTimeMs: 2000 + # The chain id of the Astria sequencer chain conductor communicates with + sequencerChainId: "" + # The expected fastest block time possible from sequencer, determines polling + # rate. + sequencerBlockTimeMs: 2000 # URL path for the sequencer - rpc: "" + sequencerRpc: "" # gRPC path for the sequencer - grpc: "" - # Private key which is used for wrapping txs for sequencer submission - # Note: When secretProvider.enabled is true the secret provided by - # `sequencerPrivateKey` is used instead of this value. - privateKey: - devContent: "" - secret: - filename: "key.hex" - resourceName: "projects/$PROJECT_ID/secrets/sequencerPrivateKey/versions/latest" + sequencerGrpc: "" + # The maximum number of requests to make to the sequencer per second + sequencerRequestsPerSecond: 500 celestia: # if config.rollup.executionLevel is NOT 'SoftOnly' AND celestia-node is not enabled # the rpc, ws, and token fields must be set to access celestia network. rpc: "" token: "" - # The first block height to look at for a rollup block - initialBlockHeight: "" - # The number of blocks to celestia blocks to allow before finding the next rollup data - # The chain will halt in FirmOnly when this limit is hit. In SoftAndOnly mode, the chain - # will execute up to 6x this of soft blocks ahead of firm commitment and then halt. - heightVariance: "" - - blockscout: - enabled: false celestia-node: # Strongly recommend leaving enabled when not doing `SoftOnly` execution @@ -226,16 +204,48 @@ celestia-node: # # The custom info below must be grabbed from the custom network bridge on startup # customInfo: ":" -# When deploying in a production environment should use a secret provider -# This is configured for use with GCP, need to set own resource names -# and keys -secretProvider: +metrics: + # set to enable prometheus metrics + enabled: false + +otel: enabled: false - provider: gcp - parametersTemplate: |- - secrets: | - - resourceName: {{ .key.resourceName }} - fileName: "{{ .key.filename }}" + serviceNamePrefix: '{{ include "rollup.name" . }}' + endpoint: + tracesEndpoint: + tracesCompression: gzip + tracesTimeout: 10 + otlpHeaders: + traceHeaders: + +serviceMonitor: + # set to enable port svc and service monitor + enabled: false + port: 6060 + additionalLabels: + release: kube-prometheus-stack +alerting: + enabled: false + interval: "" + additionalLabels: + release: kube-prometheus-stack + annotations: {} + # scrapeTimeout: 10s + # path: /metrics + prometheusRule: + enabled: true + additionalLabels: + release: kube-prometheus-stack + namespace: monitoring + rules: + - alert: Geth_Slow_Finalized + expr: increase(chain_head_finalized{namespace="astria-dusk3-cluster"}[5m]) < 20 # Insert your query Expression + for: 5m # Rough number but should be enough to init warn + labels: + severity: critical + annotations: + summary: Slow Chain Head Finalized (instance {{ $labels.instance }}) + description: "Chain Head Finalized on {{ $labels.namespace }} is increasing at a rate slower then 20 blocks per 5 minute\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" ingress: enabled: false @@ -246,11 +256,11 @@ ingress: rpc: enabled: true hosts: - - executor.{{ .Values.config.rollup.name }}.{{ .Values.ingress.hostname }} + - 'executor.{{ include "rollup.name" . }}.{{ .Values.ingress.hostname }}' path: / pathType: Prefix service: - name: "{{ .Values.config.rollup.name }}-evm-service" + name: '{{ include "rollup.name" . }}-evm-service' port: name: json-rpc-svc annotations: {} @@ -264,11 +274,11 @@ ingress: ws: enabled: true hosts: - - ws-executor.{{ .Values.config.rollup.name }}.{{ .Values.ingress.hostname }} + - ws-executor.{{ include "rollup.name" . }}.{{ .Values.ingress.hostname }} path: / pathType: Prefix service: - name: "{{ .Values.config.rollup.name }}-evm-service" + name: '{{ include "rollup.name" . }}-evm-service' port: name: ws-rpc-svc annotations: {} @@ -279,42 +289,6 @@ ingress: # - secretName: chart-example-tls # hosts: # - chart-example.local - faucet: - enabled: false - hosts: - - faucet.{{ .Values.config.rollup.name }}.{{ .Values.ingress.hostname }} - path: / - pathType: Prefix - service: - name: "{{ .Values.config.rollup.name }}-faucet-service" - port: - name: faucet-svc - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - labels: {} - tls: {} - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - explorer: - enabled: false - hosts: - - blockscout.{{ .Values.config.rollup.name }}.{{ .Values.ingress.hostname }} - path: / - pathType: Prefix - service: - name: "{{ .Values.config.rollup.name }}-blockscout-svc" - port: - name: blockscout-svc - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - labels: {} - tls: {} - # - secretName: chart-example-tls - # hosts: - # - chart-example.local # Default persistent storage values # NOTE - `rollupName` will be used with `persistentVolumeName` to generate names for kubernetes resources. @@ -322,21 +296,14 @@ ingress: resources: conductor: requests: - cpu: 0.1 + cpu: 100m memory: 200Mi limits: - cpu: 1 + cpu: 1000m memory: 2Gi - composer: - requests: - cpu: 0.1 - memory: 100Mi - limits: - cpu: 1 - memory: 1Gi geth: requests: - cpu: 16 + cpu: 16000m memory: 32Gi storage: @@ -353,10 +320,5 @@ ports: jsonRPC: 8545 wsRPC: 8546 executionGRPC: 50051 - composerGRPC: 50052 - composerHealthAPI: 2450 - faucet: 8080 - blockscout: 4000 metrics: 6060 conductorMetrics: 9000 - composerMetrics: 9001 diff --git a/charts/evm-stack/Chart.lock b/charts/evm-stack/Chart.lock new file mode 100644 index 0000000..cc9e188 --- /dev/null +++ b/charts/evm-stack/Chart.lock @@ -0,0 +1,21 @@ +dependencies: +- name: evm-rollup + repository: file://../evm-rollup + version: 0.24.0 +- name: composer + repository: file://../composer + version: 0.1.0 +- name: evm-faucet + repository: file://../evm-faucet + version: 0.1.0 +- name: bridge-withdrawer + repository: file://../evm-bridge-withdrawer + version: 0.1.0 +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 15.2.4 +- name: blockscout-stack + repository: https://blockscout.github.io/helm-charts + version: 1.6.2 +digest: sha256:ee596bb8a69b90fdd2e7ee183b8c5f1db9ad9990f5e57de20abd3f5986e4b8a0 +generated: "2024-07-19T12:21:39.271691+02:00" diff --git a/charts/evm-stack/Chart.yaml b/charts/evm-stack/Chart.yaml new file mode 100644 index 0000000..166279c --- /dev/null +++ b/charts/evm-stack/Chart.yaml @@ -0,0 +1,56 @@ +apiVersion: v2 +name: evm-stack +description: Configure and + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +dependencies: + - name: evm-rollup + version: 0.24.0 + repository: "file://../evm-rollup" + - name: composer + version: 0.1.0 + repository: "file://../composer" + condition: composer.enabled + - name: evm-faucet + version: 0.1.0 + repository: "file://../evm-faucet" + condition: evm-faucet.enabled + - name: bridge-withdrawer + version: 0.1.0 + repository: "file://../evm-bridge-withdrawer" + condition: bridge-withdrawer.enabled + - name: postgresql + version: "15.2.4" + repository: "https://charts.bitnami.com/bitnami" + condition: postgresql.enabled + - name: blockscout-stack + repository: "https://blockscout.github.io/helm-charts" + version: "1.6.2" + condition: blockscout-stack.enabled + + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "0.1.0" + +maintainers: + - name: wafflesvonmaple + url: astria.org + - name: joroshiba + url: astria.org diff --git a/charts/evm-stack/values.yaml b/charts/evm-stack/values.yaml new file mode 100644 index 0000000..750fc38 --- /dev/null +++ b/charts/evm-stack/values.yaml @@ -0,0 +1,88 @@ +# Default values for sequencer. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: + namespaceOverride: "" + replicaCount: 1 + # Whether to use tty readable logging for astria services, when false use json. + # Best to be false in production environments, true for clean logs on local dev. + useTTY: true + dev: false + sequencerRpc: "" + sequencerGrpc: "" + rollupName: "" + evmChainId: "" + sequencerChainId: "" + otel: + endpoint: "" + tracesEndpoint: "" + tracesCompression: gzip + tracesTimeout: 10 + otlpHeaders: "" + traceHeaders: "" + +evm-rollup: + enabled: true + genesis: + rollupName: "{{ .Values.global.rollupName }}" + chainId: "{{ .Values.global.evmChainId }}" + config: + conductor: + sequencerChainId: "{{ .Values.global.sequencerChainId }}" + sequencerRpc: "{{ .Values.global.sequencerRpc }}" + sequencerGrpc: "{{ .Values.global.sequencerGrpc }}" + otel: + endpoint: "{{ .Values.global.otel.endpoint }}" + tracesEndpoint: "{{ .Values.global.otel.tracesEndpoint }}" + tracesCompression: "{{ .Values.global.otel.tracesCompression }}" + tracesTimeout: "{{ .Values.global.otel.tracesTimeout }}" + otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}" + traceHeaders: "{{ .Values.global.otel.traceHeaders }}" + +composer: + enabled: false + config: + sequencerChainId: "{{ .Values.global.sequencerChainId }}" + sequencerRpc: "{{ .Values.global.sequencerRpc }}" + sequencerGrpc: "{{ .Values.global.sequencerGrpc }}" + rollups: + - name: "{{ .Values.global.rollupName }}" + wsRpc: "ws://{{ .Values.global.rollupName }}-evm-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:8546" + otel: + endpoint: "{{ .Values.global.otel.endpoint }}" + tracesEndpoint: "{{ .Values.global.otel.tracesEndpoint }}" + tracesCompression: "{{ .Values.global.otel.tracesCompression }}" + tracesTimeout: "{{ .Values.global.otel.tracesTimeout }}" + otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}" + traceHeaders: "{{ .Values.global.otel.traceHeaders }}" + +evm-faucet: + enabled: false + config: + rollupName: "{{ .Values.global.rollupName }}" + providerUrl: "http://{{ .Values.global.rollupName }}-evm-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:8545" + +bridge-withdrawer: + enabled: false + config: + sequencerChainId: "{{ .Values.global.sequencerChainId }}" + sequencerCometbftEndpoint: "{{ .Values.global.sequencerRpc }}" + evmRpcEndpoint: "ws://{{ .Values.global.rollupName }}-evm-service.{{ default .Release.Namespace .Values.global.namespaceOverride }}.svc.cluster.local:8546" + sequencerGrpcEndpoint: "{{ .Values.global.sequencerGrpc }}" + otel: + endpoint: "{{ .Values.global.otel.endpoint }}" + tracesEndpoint: "{{ .Values.global.otel.tracesEndpoint }}" + tracesCompression: "{{ .Values.global.otel.tracesCompression }}" + tracesTimeout: "{{ .Values.global.otel.tracesTimeout }}" + otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}" + traceHeaders: "{{ .Values.global.otel.traceHeaders }}" + +blockscout-stack: + frontend: + image: + tag: v1.32.0 + enabled: false + + +postgresql: + enabled: false diff --git a/charts/sequencer-relayer/Chart.yaml b/charts/sequencer-relayer/Chart.yaml index 817c68b..bcebe7d 100644 --- a/charts/sequencer-relayer/Chart.yaml +++ b/charts/sequencer-relayer/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.0 +version: 0.11.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sequencer-relayer/templates/configmaps.yaml b/charts/sequencer-relayer/templates/configmaps.yaml index fc076a4..50917b7 100644 --- a/charts/sequencer-relayer/templates/configmaps.yaml +++ b/charts/sequencer-relayer/templates/configmaps.yaml @@ -18,14 +18,14 @@ data: ASTRIA_SEQUENCER_RELAYER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" ASTRIA_SEQUENCER_RELAYER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" NO_COLOR: "{{ .Values.global.useTTY }}" - ASTRIA_SEQUENCER_RELAYER_NO_OTEL: "{{ not .Values.config.relayer.otel.enabled }}" - OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.config.relayer.otel.endpoint }}" - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ .Values.config.relayer.otel.tracesEndpoint }}" - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ .Values.config.relayer.otel.tracesTimeout }}" - OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ .Values.config.relayer.otel.tracesCompression }}" - OTEL_EXPORTER_OTLP_HEADERS: "{{ .Values.config.relayer.otel.otlpHeaders }}" - OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ .Values.config.relayer.otel.traceHeaders }}" - OTEL_SERVICE_NAME: "{{ tpl .Values.config.relayer.otel.serviceName . }}" + ASTRIA_SEQUENCER_RELAYER_NO_OTEL: "{{ not .Values.otel.enabled }}" + OTEL_EXPORTER_OTLP_ENDPOINT: "{{ tpl .Values.otel.endpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "{{ tpl .Values.otel.tracesEndpoint . }}" + OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "{{ tpl .Values.otel.tracesTimeout . }}" + OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "{{ tpl .Values.otel.tracesCompression . }}" + OTEL_EXPORTER_OTLP_HEADERS: "{{ tpl .Values.otel.otlpHeaders . }}" + OTEL_EXPORTER_OTLP_TRACE_HEADERS: "{{ tpl .Values.otel.traceHeaders . }}" + OTEL_SERVICE_NAME: "{{ tpl .Values.otel.serviceName . }}" ASTRIA_SEQUENCER_RELAYER_ONLY_INCLUDE_ROLLUPS: "{{ .Values.config.relayer.onlyIncludeRollups }}" ASTRIA_SEQUENCER_RELAYER_SEQUENCER_CHAIN_ID: "{{ .Values.config.relayer.sequencerChainId }}" ASTRIA_SEQUENCER_RELAYER_CELESTIA_CHAIN_ID: "{{ .Values.config.relayer.celestiaChainId }}" diff --git a/charts/sequencer-relayer/values.yaml b/charts/sequencer-relayer/values.yaml index 718b282..229fad2 100644 --- a/charts/sequencer-relayer/values.yaml +++ b/charts/sequencer-relayer/values.yaml @@ -28,21 +28,22 @@ config: metrics: enabled: false - otel: - enabled: false - serviceName: "astria-sequencer-relayer" - endpoint: - tracesEndpoint: - tracesCompression: gzip - tracesTimeout: 10 - otlpHeaders: - traceHeaders: - celestiaAppPrivateKey: devContent: "" secret: filename: "key.hex" resourceName: "projects/$PROJECT_ID/secrets/celestiaPrivateKey/versions/latest" + +otel: + enabled: false + serviceName: "astria-sequencer-relayer" + endpoint: "" + tracesEndpoint: "" + tracesCompression: gzip + tracesTimeout: "10" + otlpHeaders: "" + traceHeaders: "" + ports: healthAPI: 2450 metrics: 9000 diff --git a/charts/sequencer/Chart.lock b/charts/sequencer/Chart.lock index e3be569..7807d9b 100644 --- a/charts/sequencer/Chart.lock +++ b/charts/sequencer/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: sequencer-relayer repository: file://../sequencer-relayer - version: 0.10.0 -digest: sha256:b2d8726e0722360789c49dbe60a0eb11751c583e09e32a57767981607533cf21 -generated: "2024-07-01T16:33:42.474014-07:00" + version: 0.11.0 +digest: sha256:70434f4e37c36660ff9b89258d4de6770f206712020bda7398a22772e8f74fa8 +generated: "2024-07-19T12:21:51.250339+02:00" diff --git a/charts/sequencer/Chart.yaml b/charts/sequencer/Chart.yaml index 64f5b4c..9982dc2 100644 --- a/charts/sequencer/Chart.yaml +++ b/charts/sequencer/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.18.1 +version: 0.19.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. @@ -24,7 +24,7 @@ appVersion: "0.14.0" dependencies: - name: sequencer-relayer - version: "0.10.0" + version: "0.11.0" repository: "file://../sequencer-relayer" condition: sequencer-relayer.enabled diff --git a/dev/bridgetester.just b/dev/bridgetester.just index 0396c84..0c6a033 100644 --- a/dev/bridgetester.just +++ b/dev/bridgetester.just @@ -4,7 +4,7 @@ just wait-for-ingress-controller > /dev/null echo "Deploying local celestia instance..." && just deploy celestia-local > /dev/null helm dependency update ./charts/sequencer > /dev/null - helm dependency update ./charts/evm-rollup > /dev/null + helm dependency update ./charts/evm-stack> /dev/null echo "Setting up single astria sequencer..." && helm install \ -n astria-validator-single single-sequencer-chart charts/sequencer \ -f ./dev/values/validators/all.yml \ @@ -12,13 +12,14 @@ {{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ --create-namespace > /dev/null just wait-for-sequencer > /dev/null - echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-rollup \ + echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-stack \ -f ./dev/values/rollup/dev.yaml \ -f ./dev/values/rollup/ibc-bridge-test.yaml \ - {{ if tag != '' { replace('--set images.conductor.devTag=# --set images.composer.devTag=#', '#', tag) } else { '' } }} \ - --set config.blockscout.enabled=false \ - --set config.faucet.enabled=false > /dev/null - just wait-for-dev-rollup > /dev/null + {{ if tag != '' { replace('--set evm-rollup.images.conductor.devTag=# --set composer.images.composer.devTag=# --set evm-bridge-withdrawer.images.evmBridgeWithdrawer.devTag=#', '#', tag) } else { '' } }} \ + --set blockscout-stack.enabled=false \ + --set postgresql.enabled=false \ + --set evm-faucet.enabled=false > /dev/null + just wait-for-rollup > /dev/null echo "Deploying Hermes and creating IBC channel..." just deploy hermes-local > /dev/null kubectl wait -n astria-dev-cluster deployment hermes-local-chart --for=condition=Available=True --timeout=300s diff --git a/dev/containerfiles/bridgetesterutility.Dockerfile b/dev/containerfiles/bridgetesterutility.Dockerfile index 83d755e..911c187 100644 --- a/dev/containerfiles/bridgetesterutility.Dockerfile +++ b/dev/containerfiles/bridgetesterutility.Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /home ARG CELESTIA_VERSION=v1.9.0 -ARG ASTRIA_VERSION=nightly-2024-07-10 +ARG ASTRIA_VERSION=v0.12.0 # download architecture-specific binaries ARG TARGETPLATFORM diff --git a/dev/values/rollup/dev.yaml b/dev/values/rollup/dev.yaml index 1ad96a5..5e88a27 100644 --- a/dev/values/rollup/dev.yaml +++ b/dev/values/rollup/dev.yaml @@ -1,130 +1,247 @@ global: useTTY: true dev: true + evmChainId: 1337 + rollupName: astria + sequencerRpc: http://node0-sequencer-rpc-service.astria-dev-cluster.svc.cluster.local:26657 + sequencerGrpc: http://node0-sequencer-grpc-service.astria-dev-cluster.svc.cluster.local:8080 + sequencerChainId: sequencer-test-chain-0 -config: - # The level at which core astria components will log out - # Options are: error, warn, info, and debug - logLevel: "debug" - - rollup: - # Default name for the rollup chain, used to generate Rollup ID - name: astria - # Set to true to keep history of all blocks - archiveNode: false - # EVM network ID used by the chain - networkId: "1337" - # Determines what will drive block execution, options are: - # - "SoftOnly" -> blocks are only pulled from the sequencer - # - "FirmOnly" -> blocks are only pulled from DA - # - "SoftAndFirm" -> blocks are pulled from both the sequencer and DA - executionCommitLevel: 'SoftAndFirm' - # Configuration specific to EVM rollup genesis - genesis: - # Configuration of Eth forks, setting to 0 will enable form height, - # left as is these forks will not activate. - shanghaiTime: "0" - cancunTime: "" - pragueTime: "" - verkleTime: "" - # Configure the gas Limit - gasLimit: "8000000" - # Set to a hex set of bytes if your rollup has manually configured extra data - extraDataOverride: "" - # If set to true the genesis block will contain extra data - overrideGenesisExtraData: true - # Configure the sequencer bridge addresses and allowed assets if using - # the astria canonical bridge. Recommend removing alloc values if so. - bridgeAddresses: - - bridgeAddress: "astria13ahqz4pjqfmynk9ylrqv4fwe4957x2p0h5782u" - startHeight: 1 - assetDenom: "nria" - assetPrecision: 9 - # Configure the fee collector for the evm tx fees, activated at block heights. - # If not configured, all tx fees will be burned. - feeCollectors: - 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" - # Configure EIP-1559 params, activated at block heights - eip1559Params: {} - # 1: - # minBaseFee: 0 - # elasticityMultiplier: 2 - # baseFeeChangeDenominator: 8 - # Can configure the genesis allocs for the chain - alloc: - # Deploying the deterministic deploy proxy contract in genesis - # Forge and other tools use this for their CREATE2 usage, but - # can only be included through the genesis block after EIP-155 - # https://github.com/Arachnid/deterministic-deployment-proxy - - address: "0x4e59b44847b379578588920cA78FbF26c0B4956C" - value: - balance: "0" - code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3" - - address: "0xA58639fB5458e65E4fA917FF951C390292C24A15" - value: - balance: "0" - code: "0x60806040526004361061004a5760003560e01c80637eb6dec71461004f578063a996e0201461009d578063b6476c7e146100b2578063bab916d0146100d4578063db97dc98146100e7575b600080fd5b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000981565b60405163ffffffff90911681526020015b60405180910390f35b6100b06100ab366004610315565b6100fc565b005b3480156100be57600080fd5b506100c761019e565b6040516100949190610381565b6100b06100e23660046103cf565b61022c565b3480156100f357600080fd5b506100c76102bf565b3460006101297f000000000000000000000000000000000000000000000000000000003b9aca0083610411565b1161014f5760405162461bcd60e51b815260040161014690610433565b60405180910390fd5b34336001600160a01b03167f0c64e29a5254a71c7f4e52b3d2d236348c80e00a00ba2e1961962bd2827c03fb8787878760405161018f94939291906104ea565b60405180910390a35050505050565b600180546101ab9061051c565b80601f01602080910402602001604051908101604052809291908181526020018280546101d79061051c565b80156102245780601f106101f957610100808354040283529160200191610224565b820191906000526020600020905b81548152906001019060200180831161020757829003601f168201915b505050505081565b3460006102597f000000000000000000000000000000000000000000000000000000003b9aca0083610411565b116102765760405162461bcd60e51b815260040161014690610433565b34336001600160a01b03167f0f4961cab7530804898499aa89f5ec81d1a73102e2e4a1f30f88e5ae3513ba2a85856040516102b2929190610556565b60405180910390a3505050565b600080546101ab9061051c565b60008083601f8401126102de57600080fd5b50813567ffffffffffffffff8111156102f657600080fd5b60208301915083602082850101111561030e57600080fd5b9250929050565b6000806000806040858703121561032b57600080fd5b843567ffffffffffffffff8082111561034357600080fd5b61034f888389016102cc565b9096509450602087013591508082111561036857600080fd5b50610375878288016102cc565b95989497509550505050565b600060208083528351808285015260005b818110156103ae57858101830151858201604001528201610392565b506000604082860101526040601f19601f8301168501019250505092915050565b600080602083850312156103e257600080fd5b823567ffffffffffffffff8111156103f957600080fd5b610405858286016102cc565b90969095509350505050565b60008261042e57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526062908201527f417374726961576974686472617765723a20696e73756666696369656e74207660408201527f616c75652c206d7573742062652067726561746572207468616e203130202a2a60608201527f20283138202d20424153455f434841494e5f41535345545f505245434953494f6080820152614e2960f01b60a082015260c00190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006104fe6040830186886104c1565b82810360208401526105118185876104c1565b979650505050505050565b600181811c9082168061053057607f821691505b60208210810361055057634e487b7160e01b600052602260045260246000fd5b50919050565b60208152600061056a6020830184866104c1565b94935050505056fea264697066735822122047a7ef84c0be4640572989abfc01decbc1ae143d4659f1b32047978c67ebc9c864736f6c63430008150033" - faucet: +evm-rollup: + genesis: + ## These values are used to configure the genesis block of the rollup chain + ## no defaults as they are unique to each chain + + # Block height to start syncing rollup from, lowest possible is 2 + sequencerInitialHeight: 2 + # The first Celestia height to utilize when looking for rollup data + celestiaInitialHeight: 2 + # The variance in Celestia height to allow before halting the chain + celestiaHeightVariance: 10 + # Will fill the extra data in each block, can be left empty + # can also fill with something unique for your chain. + extraDataOverride: "" + + ## These are general configuration values with some recommended defaults + + # Configure the gas Limit + gasLimit: "50000000" + # If set to true the genesis block will contain extra data + overrideGenesisExtraData: true + # The hrp for bech32m addresses, unlikely to be changed + sequencerAddressPrefix: "astria" + + ## These values are used to configure astria native bridging + ## Many of the fields have commented out example fields + + # When using an erc20 canonical bridge, the address from which tokens will + # be sent via the bridge contract + bridgeSenderAddress: "0x0000000000000000000000000000000000000000" + # Configure the sequencer bridge addresses and allowed assets if using + # the astria canonical bridge. Recommend removing alloc values if so. + bridgeAddresses: + - bridgeAddress: "astria13ahqz4pjqfmynk9ylrqv4fwe4957x2p0h5782u" + startHeight: 1 + assetDenom: "nria" + assetPrecision: 9 + + + ## Fee configuration + + # Configure the fee collector for the evm tx fees, activated at block heights. + # If not configured, all tx fees will be burned. + feeCollectors: + 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" + # Configure EIP-1559 params, activated at block heights + eip1559Params: {} + # 1: + # minBaseFee: 0 + # elasticityMultiplier: 2 + # baseFeeChangeDenominator: 8 + + ## Standard Eth Genesis config values + # Configuration of Eth forks, setting to 0 will enable from height, + # left as is these forks will not activate. + cancunTime: "" + pragueTime: "" + verkleTime: "" + # Can configure the genesis allocs for the chain + alloc: + # Deploying the deterministic deploy proxy contract in genesis + # Forge and other tools use this for their CREATE2 usage, but + # can only be included through the genesis block after EIP-155 + # https://github.com/Arachnid/deterministic-deployment-proxy + - address: "0x4e59b44847b379578588920cA78FbF26c0B4956C" + value: + balance: "0" + code: "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3" + - address: "0xA58639fB5458e65E4fA917FF951C390292C24A15" + value: + balance: "0" + code: "0x60806040526004361061004a5760003560e01c80637eb6dec71461004f578063a996e0201461009d578063b6476c7e146100b2578063bab916d0146100d4578063db97dc98146100e7575b600080fd5b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000981565b60405163ffffffff90911681526020015b60405180910390f35b6100b06100ab366004610315565b6100fc565b005b3480156100be57600080fd5b506100c761019e565b6040516100949190610381565b6100b06100e23660046103cf565b61022c565b3480156100f357600080fd5b506100c76102bf565b3460006101297f000000000000000000000000000000000000000000000000000000003b9aca0083610411565b1161014f5760405162461bcd60e51b815260040161014690610433565b60405180910390fd5b34336001600160a01b03167f0c64e29a5254a71c7f4e52b3d2d236348c80e00a00ba2e1961962bd2827c03fb8787878760405161018f94939291906104ea565b60405180910390a35050505050565b600180546101ab9061051c565b80601f01602080910402602001604051908101604052809291908181526020018280546101d79061051c565b80156102245780601f106101f957610100808354040283529160200191610224565b820191906000526020600020905b81548152906001019060200180831161020757829003601f168201915b505050505081565b3460006102597f000000000000000000000000000000000000000000000000000000003b9aca0083610411565b116102765760405162461bcd60e51b815260040161014690610433565b34336001600160a01b03167f0f4961cab7530804898499aa89f5ec81d1a73102e2e4a1f30f88e5ae3513ba2a85856040516102b2929190610556565b60405180910390a3505050565b600080546101ab9061051c565b60008083601f8401126102de57600080fd5b50813567ffffffffffffffff8111156102f657600080fd5b60208301915083602082850101111561030e57600080fd5b9250929050565b6000806000806040858703121561032b57600080fd5b843567ffffffffffffffff8082111561034357600080fd5b61034f888389016102cc565b9096509450602087013591508082111561036857600080fd5b50610375878288016102cc565b95989497509550505050565b600060208083528351808285015260005b818110156103ae57858101830151858201604001528201610392565b506000604082860101526040601f19601f8301168501019250505092915050565b600080602083850312156103e257600080fd5b823567ffffffffffffffff8111156103f957600080fd5b610405858286016102cc565b90969095509350505050565b60008261042e57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526062908201527f417374726961576974686472617765723a20696e73756666696369656e74207660408201527f616c75652c206d7573742062652067726561746572207468616e203130202a2a60608201527f20283138202d20424153455f434841494e5f41535345545f505245434953494f6080820152614e2960f01b60a082015260c00190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6040815260006104fe6040830186886104c1565b82810360208401526105118185876104c1565b979650505050505050565b600181811c9082168061053057607f821691505b60208210810361055057634e487b7160e01b600052602260045260246000fd5b50919050565b60208152600061056a6020830184866104c1565b94935050505056fea264697066735822122047a7ef84c0be4640572989abfc01decbc1ae143d4659f1b32047978c67ebc9c864736f6c63430008150033" + + + config: + # The level at which core astria components will log out + # Options are: error, warn, info, and debug + logLevel: "debug" + + conductor: + # Determines what will drive block execution, options are: + # - "SoftOnly" -> blocks are only pulled from the sequencer + # - "FirmOnly" -> blocks are only pulled from DA + # - "SoftAndFirm" -> blocks are pulled from both the sequencer and DA + executionCommitLevel: 'SoftAndFirm' + # The expected fastest block time possible from sequencer, determines polling + # rate. + sequencerBlockTimeMs: 2000 + # The maximum number of requests to make to the sequencer per second + sequencerRequestsPerSecond: 500 + + celestia: + rpc: "http://celestia-service.astria-dev-cluster.svc.cluster.local:26658" + token: "http://celestia-service.astria-dev-cluster.svc.cluster.local:5353" + + resources: + conductor: + requests: + cpu: 0.01 + memory: 1Mi + limits: + cpu: 0.1 + memory: 20Mi + geth: + requests: + cpu: 0.25 + memory: 256Mi + limits: + cpu: 2 + memory: 1Gi + + celestia-node: + enabled: false + + storage: + enabled: false + + ingress: enabled: true - privateKey: - devContent: "8b3a7999072c9c9314c084044fe705db11714c6c4ed7cddb64da18ea270dd203" + services: + rpc: + enabled: true + ws: + enabled: true - # The amount of token to give per request - amount: 1 - sequencer: - chainId: sequencer-test-chain-0 - # URL path for the sequencer - rpc: "http://node0-sequencer-rpc-service.astria-dev-cluster.svc.cluster.local:26657" - # gRPC path for the sequencer - grpc: "http://node0-sequencer-grpc-service.astria-dev-cluster.svc.cluster.local:8080" +composer: + enabled: true + config: privateKey: devContent: "2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90" - celestia: - rpc: "http://celestia-service.astria-dev-cluster.svc.cluster.local:26658" - token: "http://celestia-service.astria-dev-cluster.svc.cluster.local:5353" - initialBlockHeight: "2" - heightVariance: "10" - blockscout: + +bridge-withdrawer: + enabled: true + config: + minExpectedFeeAssetBalance: "0" + sequencerBridgeAddress: "astria13ahqz4pjqfmynk9ylrqv4fwe4957x2p0h5782u" + feeAssetDenom: "nria" + rollupAssetDenom: "nria" + evmContractAddress: "0xA58639fB5458e65E4fA917FF951C390292C24A15" + sequencerPrivateKey: + devContent: "dfa7108e38ab71f89f356c72afc38600d5758f11a8c337164713e4471411d2e0" + +evm-faucet: + enabled: true + ingress: enabled: true + config: + privateKey: + devContent: "8b3a7999072c9c9314c084044fe705db11714c6c4ed7cddb64da18ea270dd203" -resources: - conductor: - requests: - cpu: 0.01 - memory: 1Mi - limits: - cpu: 0.1 - memory: 20Mi - composer: - requests: - cpu: 0.01 - memory: 1Mi - limits: - cpu: 0.1 - memory: 20Mi - geth: - requests: - cpu: 0.25 - memory: 256Mi - limits: - cpu: 2 - memory: 1Gi - -celestia-node: - enabled: false - -storage: - enabled: false - -ingress: +postgresql: enabled: true - services: - rpc: - enabled: true - ws: - enabled: true - faucet: - enabled: true - explorer: + nameOverride: blockscout-postegres + primary: + persistence: + enabled: false + resourcesPreset: "medium" + auth: + enablePostgresUser: true + postgresPassword: bigsecretpassword + username: blockscout + password: blockscout + database: blockscout + audit: + logHostname: true + logConnections: true + logDisconnections: true +blockscout-stack: + enabled: true + config: + id: 1337 + name: Astria + shortname: Astria + currency: + name: RIA + symbol: RIA + decimals: 18 + testnet: true + prometheus: + enabled: false + blockscout: + extraEnv: + - name: ECTO_USE_SSL + value: "false" + - name: DATABASE_URL + value: "postgres://postgres:bigsecretpassword@astria-chain-chart-blockscout-postegres.astria-dev-cluster.svc.cluster.local:5432/blockscout" + - name: ETHEREUM_JSONRPC_VARIANT + value: "geth" + - name: ETHEREUM_JSONRPC_HTTP_URL + value: "http://astria-evm-service.astria-dev-cluster.svc.cluster.local:8545/" + - name: ETHEREUM_JSONRPC_INSECURE + value: "true" + - name: ETHEREUM_JSONRPC_WS_URL + value: "ws://astria-evm-service.astria-dev-cluster.svc.cluster.local:8546/" + - name: INDEXER_DISABLE_BEACON_BLOB_FETCHER + value: "true" + - name: NETWORK + value: "Astria" + - name: SUBNETWORK + value: "Local" + - name: CONTRACT_VERIFICATION_ALLOWED_SOLIDITY_EVM_VERSIONS + value: "homestead,tangerineWhistle,spuriousDragon,byzantium,constantinople,petersburg,istanbul,berlin,london,paris,shanghai,default" + - name: CONTRACT_VERIFICATION_ALLOWED_VYPER_EVM_VERSIONS + value: "byzantium,constantinople,petersburg,istanbul,berlin,paris,shanghai,default" + - name: DISABLE_EXCHANGE_RATES + value: "true" + - name: COIN + value: "RIA" + + ingress: enabled: true + hostname: explorer.astria.localdev.me + frontend: + extraEnv: + - name: NEXT_PUBLIC_NETWORK_NAME + value: "Astria Flame" + - name: NEXT_PUBLIC_NETWORK_SHORT_NAME + value: "Flame" + - name: NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE + value: "validation" + - name: NEXT_PUBLIC_AD_BANNER_PROVIDER + value: "none" + - name: NEXT_PUBLIC_API_PROTOCOL + value: "http" + - name: NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL + value: "ws" + - name: NEXT_PUBLIC_NETWORK_CURRENCY_NAME + value: "Ria" + - name: NEXT_PUBLIC_NETWORK_CURRENCY_WEI_NAME + value: "aRia" + - name: NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL + value: "RIA" + - name: NEXT_PUBLIC_AD_TEXT_PROVIDER + value: "none" + ingress: + enabled: true + hostname: explorer.astria.localdev.me diff --git a/dev/values/rollup/ibc-bridge-test.yaml b/dev/values/rollup/ibc-bridge-test.yaml index 825e2e4..e438e19 100644 --- a/dev/values/rollup/ibc-bridge-test.yaml +++ b/dev/values/rollup/ibc-bridge-test.yaml @@ -1,9 +1,8 @@ # this file contains overrides that are used for the ibc bridge tests -config: - rollup: - genesis: - bridgeAddresses: +evm-rollup: + genesis: + bridgeAddresses: - bridgeAddress: "astria1d7zjjljc0dsmxa545xkpwxym86g8uvvwhtezcr" startHeight: 1 assetDenom: "transfer/channel-0/utia"