diff --git a/charts/auctioneer/Chart.yaml b/charts/auctioneer/Chart.yaml index 6e964bbab0..5b1289d4e2 100644 --- a/charts/auctioneer/Chart.yaml +++ b/charts/auctioneer/Chart.yaml @@ -24,5 +24,11 @@ version: 0.0.1 appVersion: "0.0.1" maintainers: - - name: itamarreif + - name: wafflesvonmaple + url: astria.org + - name: quasystaty1 + url: astria.org + - name: steezeburger + url: astria.org + - name: joroshiba url: astria.org diff --git a/charts/auctioneer/templates/configmap.yaml b/charts/auctioneer/templates/configmap.yaml index 7060a04be4..ee209af9d5 100644 --- a/charts/auctioneer/templates/configmap.yaml +++ b/charts/auctioneer/templates/configmap.yaml @@ -4,9 +4,9 @@ metadata: name: auctioneer-env namespace: {{ include "auctioneer.namespace" . }} data: - ASTRIA_AUCTIONEER_SEQUENCER_GRPC_ENDPOINT: "{{ .Values.config.sequencerGrpcEndpoint }}" - ASTRIA_AUCTIONEER_SEQUENCER_ABCI_ENDPOINT: "{{ .Values.config.sequencerAbciEndpoint }}" - ASTRIA_AUCTIONEER_SEQUENCER_CHAIN_ID: "{{ .Values.config.sequencerChainId }}" + ASTRIA_AUCTIONEER_SEQUENCER_GRPC_ENDPOINT: "{{ tpl .Values.config.sequencerGrpcEndpoint . }}" + ASTRIA_AUCTIONEER_SEQUENCER_ABCI_ENDPOINT: "{{ tpl .Values.config.sequencerAbciEndpoint . }}" + ASTRIA_AUCTIONEER_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.sequencerChainId . }}" ASTRIA_AUCTIONEER_SEQUENCER_PRIVATE_KEY_PATH: "/var/secrets/{{ .Values.config.sequencerPrivateKey.secret.filename }}" ASTRIA_AUCTIONEER_FEE_ASSET_DENOMINATION: "{{ .Values.config.feeAssetDenomination }}" ASTRIA_AUCTIONEER_SEQUENCER_ADDRESS_PREFIX: "{{ .Values.config.sequencerAddressPrefix }}" diff --git a/charts/auctioneer/templates/deployment.yaml b/charts/auctioneer/templates/deployment.yaml index c5490caa3d..79a7de7e8a 100644 --- a/charts/auctioneer/templates/deployment.yaml +++ b/charts/auctioneer/templates/deployment.yaml @@ -31,7 +31,7 @@ spec: {{- if .Values.metrics.enabled }} ports: - containerPort: {{ .Values.ports.metrics }} - name: auctioneer-metrics + name: auct-metrics {{- end }} resources: {{- toYaml .Values.resources | trim | nindent 12 }} diff --git a/charts/auctioneer/templates/secretproviderclass.yaml b/charts/auctioneer/templates/secretproviderclass.yaml index 7789d6b3f1..b80e3fd08a 100644 --- a/charts/auctioneer/templates/secretproviderclass.yaml +++ b/charts/auctioneer/templates/secretproviderclass.yaml @@ -7,7 +7,7 @@ metadata: spec: provider: {{ .Values.secretProvider.provider }} parameters: - {{- $_ := set $ "key" .Values.config.privateKey.secret }} + {{- $_ := set $ "key" .Values.config.sequencerPrivateKey.secret }} {{- tpl $.Values.secretProvider.parametersTemplate $ | nindent 4 }} --- {{- end }} diff --git a/charts/auctioneer/templates/service.yaml b/charts/auctioneer/templates/service.yaml index 8646ee4103..4d3e8264db 100644 --- a/charts/auctioneer/templates/service.yaml +++ b/charts/auctioneer/templates/service.yaml @@ -12,5 +12,5 @@ spec: ports: - name: metrics port: {{ .Values.ports.metrics }} - targetPort: auctioneer-metrics + targetPort: auct-metrics {{- end }} diff --git a/charts/auctioneer/templates/servicemonitor.yaml b/charts/auctioneer/templates/servicemonitor.yaml index f0802fbd07..e785a10fa2 100644 --- a/charts/auctioneer/templates/servicemonitor.yaml +++ b/charts/auctioneer/templates/servicemonitor.yaml @@ -16,7 +16,7 @@ spec: matchLabels: app: auctioneer endpoints: - - port: auctioneer-metrics + - port: auct-metrics path: / {{- with .Values.serviceMonitor.interval }} interval: {{ . }} diff --git a/charts/auctioneer/values.yaml b/charts/auctioneer/values.yaml index 850985da67..e765555781 100644 --- a/charts/auctioneer/values.yaml +++ b/charts/auctioneer/values.yaml @@ -7,11 +7,11 @@ global: images: auctioneer: - repo: ghcr.io/astriaorg/astria-auctioneer + repo: ghcr.io/astriaorg/auctioneer pullPolicy: IfNotPresent # TODO - update to latest tag - tag: "pr-1822" - devTag: "pr-1822" + tag: "pr-1839" + devTag: "pr-1839" config: sequencerGrpcEndpoint: "" diff --git a/charts/deploy.just b/charts/deploy.just index 102b1142e5..797554581b 100644 --- a/charts/deploy.just +++ b/charts/deploy.just @@ -130,9 +130,20 @@ deploy-dev-rollup rollupName=defaultRollupName networkId=defaultNetworkId: -f dev/values/rollup/dev.yaml \ {{rollupName}}-chain-chart ./charts/evm-stack --namespace astria-dev-cluster +deploy-flame-dev-rollup rollupName=defaultRollupName networkId=defaultNetworkId: + 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/flame-dev.yaml \ + {{rollupName}}-chain-chart ./charts/evm-stack --namespace astria-dev-cluster + delete-dev-rollup rollupName=defaultRollupName: @just delete chart {{rollupName}}-chain +delete-flame-dev-rollup rollupName=defaultRollupName: + @just delete-dev-rollup + wait-for-dev-rollup rollupName=defaultRollupName: kubectl rollout status --watch statefulset/{{rollupName}}-geth -n astria-dev-cluster --timeout=600s diff --git a/charts/evm-rollup/Chart.yaml b/charts/evm-rollup/Chart.yaml index e5a8b972af..482a162569 100644 --- a/charts/evm-rollup/Chart.yaml +++ b/charts/evm-rollup/Chart.yaml @@ -15,13 +15,13 @@ 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: 1.0.2 +version: 1.0.1 # 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: "1.0.1" +appVersion: "1.0.0" maintainers: - name: wafflesvonmaple diff --git a/charts/evm-rollup/files/genesis/geth-genesis.json b/charts/evm-rollup/files/genesis/geth-genesis.json index 964fc49323..68027198d0 100644 --- a/charts/evm-rollup/files/genesis/geth-genesis.json +++ b/charts/evm-rollup/files/genesis/geth-genesis.json @@ -38,10 +38,9 @@ "astriaBridgeAddresses": {{ toPrettyJson .Values.genesis.bridgeAddresses | indent 8 | trim }}, "astriaFeeCollectors": {{ toPrettyJson .Values.genesis.feeCollectors | indent 8 | trim }}, "astriaEIP1559Params": {{ toPrettyJson .Values.genesis.eip1559Params | indent 8 | trim }}, - "astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}"{{- if .Values.global.dev }},{{ end }} + "astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}" {{- if not .Values.global.dev }} {{- else }} - "astriaAuctioneerAddresses": {{ toPrettyJson .Values.genesis.auctioneerAddresses | indent 8 | trim }} {{- end }} }, "difficulty": "0", diff --git a/charts/evm-rollup/templates/service.yaml b/charts/evm-rollup/templates/service.yaml index eee3a07c5e..a3c3ce26f4 100644 --- a/charts/evm-rollup/templates/service.yaml +++ b/charts/evm-rollup/templates/service.yaml @@ -13,9 +13,6 @@ spec: - name: ws-rpc-svc port: {{ .Values.ports.wsRPC }} targetPort: ws-rpc - - name: exec-grpc-svc - port: {{ .Values.ports.executionGRPC }} - targetPort: execution-grpc --- {{- if .Values.metrics.enabled }} kind: Service diff --git a/charts/evm-rollup/values.yaml b/charts/evm-rollup/values.yaml index 0855b7c551..5437e0c07d 100644 --- a/charts/evm-rollup/values.yaml +++ b/charts/evm-rollup/values.yaml @@ -70,7 +70,6 @@ genesis: # minBaseFee: 0 # elasticityMultiplier: 2 # baseFeeChangeDenominator: 8 - auctioneerAddresses: {} ## Standard Eth Genesis config values # An EVM chain number id, different from the astria rollup name diff --git a/charts/evm-stack/Chart.lock b/charts/evm-stack/Chart.lock index 0ff9721f99..3f8cee9606 100644 --- a/charts/evm-stack/Chart.lock +++ b/charts/evm-stack/Chart.lock @@ -4,10 +4,16 @@ dependencies: version: 0.4.0 - name: evm-rollup repository: file://../evm-rollup - version: 1.0.2 + version: 1.0.1 +- name: flame-rollup + repository: file://../flame-rollup + version: 0.0.1 - name: composer repository: file://../composer version: 1.0.0 +- name: auctioneer + repository: file://../auctioneer + version: 0.0.1 - name: evm-faucet repository: file://../evm-faucet version: 0.1.4 @@ -20,5 +26,5 @@ dependencies: - name: blockscout-stack repository: https://blockscout.github.io/helm-charts version: 1.6.8 -digest: sha256:fe5a1fc6ae84217c619ef95494f0ce8999f332c373ee127bc78935628d3167b4 -generated: "2025-01-09T20:52:50.206866+05:30" +digest: sha256:eb8ca7fb9b3d3965080027179b6417a6d2de4498bd217e26c77213d0f5874626 +generated: "2025-02-04T13:42:58.596376+02:00" diff --git a/charts/evm-stack/Chart.yaml b/charts/evm-stack/Chart.yaml index e31118474c..8551257e98 100644 --- a/charts/evm-stack/Chart.yaml +++ b/charts/evm-stack/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: 1.0.8 +version: 1.0.9 dependencies: - name: celestia-node @@ -23,12 +23,21 @@ dependencies: repository: "file://../celestia-node" condition: celestia-node.enabled - name: evm-rollup - version: 1.0.2 + version: 1.0.1 repository: "file://../evm-rollup" + condition: evm-rollup.enabled + - name: flame-rollup + version: 0.0.1 + repository: "file://../flame-rollup" + condition: flame-rollup.enabled - name: composer version: 1.0.0 repository: "file://../composer" condition: composer.enabled + - name: auctioneer + version: 0.0.1 + repository: "file://../auctioneer" + condition: auctioneer.enabled - name: evm-faucet version: 0.1.4 repository: "file://../evm-faucet" @@ -50,7 +59,7 @@ dependencies: # 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: "1.0.1" +appVersion: "1.0.0" maintainers: - name: wafflesvonmaple diff --git a/charts/evm-stack/values.yaml b/charts/evm-stack/values.yaml index e18df9b10c..18ad6e4350 100644 --- a/charts/evm-stack/values.yaml +++ b/charts/evm-stack/values.yaml @@ -41,6 +41,25 @@ evm-rollup: otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}" traceHeaders: "{{ .Values.global.otel.traceHeaders }}" +flame-rollup: + enabled: false + genesis: + rollupName: "{{ .Values.global.rollupName }}" + chainId: "{{ .Values.global.evmChainId }}" + config: + conductor: + sequencerChainId: "{{ .Values.global.sequencerChainId }}" + celestiaChainId: "{{ .Values.global.celestiaChainId }}" + 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 }}" + celestia-node: enabled: false @@ -61,6 +80,21 @@ composer: otlpHeaders: "{{ .Values.global.otel.otlpHeaders }}" traceHeaders: "{{ .Values.global.otel.traceHeaders }}" +auctioneer: + enabled: false + config: + sequencerGrpcEndpoint: "{{ .Values.global.sequencerGrpc }}" + sequencerAbciEndpoint: "{{ .Values.global.sequencerRpc }}" + sequencerChainId: "{{ .Values.global.sequencerChainId }}" + + 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: diff --git a/charts/flame-rollup/.helmignore b/charts/flame-rollup/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/charts/flame-rollup/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/flame-rollup/Chart.yaml b/charts/flame-rollup/Chart.yaml new file mode 100644 index 0000000000..1e1ad6528f --- /dev/null +++ b/charts/flame-rollup/Chart.yaml @@ -0,0 +1,34 @@ +apiVersion: v2 +name: flame-rollup +description: A Helm chart for Flame EVM rollup in k8s deployed on top of Astria Sequencer Network + Celestia. + +# 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.0.1 +# 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.0.1" + +maintainers: + - name: wafflesvonmaple + url: astria.org + - name: quasystaty1 + url: astria.org + - name: steezeburger + url: astria.org + - name: joroshiba + url: astria.org diff --git a/charts/flame-rollup/files/genesis/geth-genesis.json b/charts/flame-rollup/files/genesis/geth-genesis.json new file mode 100644 index 0000000000..f67049c0c3 --- /dev/null +++ b/charts/flame-rollup/files/genesis/geth-genesis.json @@ -0,0 +1,55 @@ +{ + "config": { + "chainId": {{ toString ( tpl .Values.genesis.chainId . ) | replace "\"" "" }}, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "shanghaiTime": 0, + {{- if .Values.genesis.cancunTime }} + "cancunTime": {{ toString .Values.genesis.cancunTime | replace "\"" "" }}, + {{- end }} + {{- if .Values.genesis.cancunTime }} + "pragueTime": {{ toString .Values.genesis.pragueTime | replace "\"" "" }}, + {{- end }} + {{- if .Values.genesis.cancunTime }} + "verkleTime": {{ toString .Values.genesis.verkleTime | replace "\"" "" }}, + {{- end }} + "terminalTotalDifficulty": 0, + "terminalTotalDifficultyPassed": true, + "ethash": {}, + {{- range $key, $value := .Values.genesis.extra }} + "{{ $key }}": {{ toPrettyJson $value | indent 8 | trim }}, + {{- end }} + {{- if .Values.genesis.extraDataOverride }} + "astriaExtraDataOverride": "{{ .Values.genesis.extraDataOverride }}", + {{- end }} + "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 }}, + "astriaSequencerAddressPrefix": "{{ .Values.genesis.sequencerAddressPrefix }}", + "astriaAuctioneerAddresses": {{ toPrettyJson .Values.genesis.auctioneerAddresses | indent 8 | trim }} + {{- if not .Values.global.dev }} + {{- else }} + {{- end }} + }, + "difficulty": "0", + "gasLimit": "{{ toString .Values.genesis.gasLimit | replace "\"" "" }}", + "alloc": { + {{- range $index, $value := .Values.genesis.alloc }} + {{- if $index }},{{- end }} + "{{ $value.address }}": {{ toPrettyJson $value.value | indent 8 | trim }} + {{- end }} + } +} diff --git a/charts/flame-rollup/files/keys/private_key.txt b/charts/flame-rollup/files/keys/private_key.txt new file mode 100644 index 0000000000..382cf3266f --- /dev/null +++ b/charts/flame-rollup/files/keys/private_key.txt @@ -0,0 +1 @@ +8b3a7999072c9c9314c084044fe705db11714c6c4ed7cddb64da18ea270dd203 \ No newline at end of file diff --git a/charts/flame-rollup/files/scripts/init-geth.sh b/charts/flame-rollup/files/scripts/init-geth.sh new file mode 100755 index 0000000000..77e450c30e --- /dev/null +++ b/charts/flame-rollup/files/scripts/init-geth.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -o errexit -o nounset + +if [ ! -d "$data_dir/" ]; then + echo "Initializing geth db..." + + cp /scripts/geth-genesis.json $home_dir/genesis.json + + exec geth \ + {{- range $arg := .Values.config.geth.flags -}} + {{- if hasKey $arg "condition" -}} + {{- if eq (tpl $arg.condition $) "true" -}} + --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} \ + {{- end -}} + {{- else }} + --{{ $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..." + + cp /scripts/geth-genesis.json $home_dir/genesis.json + + exec geth --datadir "$data_dir/" init $home_dir/genesis.json +fi diff --git a/charts/flame-rollup/templates/_helpers.tpl b/charts/flame-rollup/templates/_helpers.tpl new file mode 100644 index 0000000000..b6c1be6443 --- /dev/null +++ b/charts/flame-rollup/templates/_helpers.tpl @@ -0,0 +1,102 @@ +{{/* +Namepsace to deploy elements into. +*/}} +{{- define "rollup.namespace" -}} +{{- 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.appName" -}} +{{- default (include "rollup.name" .) | trunc 63 | trimSuffix "-" }}-astria-dev-cluster +{{- end }} + +{{/* +Common labels +*/}} +{{- define "rollup.labels" -}} +{{ include "rollup.selectorLabels" . }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "rollup.selectorLabels" -}} +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 }} + +{{/* +Full image paths for Astria built images +*/}} +{{- define "rollup.image" -}} +{{ .Values.images.geth.repo }}:{{ if .Values.global.dev }}{{ .Values.images.geth.devTag }}{{ else }}{{ .Values.images.geth.tag }}{{ end }} +{{- end }} +{{- define "conductor.image" -}} +{{ .Values.images.conductor.repo }}:{{ if .Values.global.dev }}{{ .Values.images.conductor.devTag }}{{ else }}{{ .Values.images.conductor.tag }}{{ end }} +{{- end }} + + +{{/* +Return if ingress is stable. +*/}} +{{- define "rollup.ingress.isStable" -}} +{{- eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1" }} +{{- end }} + +{{/* +Return if ingress supports ingressClassName. +*/}} +{{- define "rollup.ingress.supportsIngressClassName" -}} +{{- or (eq (include "rollup.ingress.isStable" .) "true") (and (eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- end }} + +{{/* +Return if ingress supports pathType. +*/}} +{{- define "rollup.ingress.supportsPathType" -}} +{{- or (eq (include "rollup.ingress.isStable" .) "true") (and (eq (include "rollup.ingress.apiVersion" .) "networking.k8s.io/v1beta1") (semverCompare ">= 1.18-0" .Capabilities.KubeVersion.Version)) }} +{{- end }} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "rollup.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 }} + +{{- define "rollup.gethHomeDir" -}} +/home/geth +{{- end }} + +{{- define "rollup.gethDataDir" -}} +{{ include "rollup.gethHomeDir" . }}/{{ include "rollup.name" . }} +{{- end }} diff --git a/charts/flame-rollup/templates/configmap.yaml b/charts/flame-rollup/templates/configmap.yaml new file mode 100644 index 0000000000..bf733912bf --- /dev/null +++ b/charts/flame-rollup/templates/configmap.yaml @@ -0,0 +1,56 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "rollup.name" . }}-conductor-env + namespace: {{ include "rollup.namespace" . }} +data: + ASTRIA_CONDUCTOR_LOG: "astria_conductor={{ .Values.config.logLevel }}" + ASTRIA_CONDUCTOR_CELESTIA_NODE_HTTP_URL: "{{ .Values.config.celestia.rpc }}" + ASTRIA_CONDUCTOR_EXPECTED_CELESTIA_CHAIN_ID: "{{ tpl .Values.config.conductor.celestiaChainId . }}" + ASTRIA_CONDUCTOR_CELESTIA_BEARER_TOKEN: "{{ .Values.config.celestia.token }}" + ASTRIA_CONDUCTOR_CELESTIA_BLOCK_TIME_MS: "{{ .Values.config.conductor.celestiaBlockTimeMs }}" + ASTRIA_CONDUCTOR_EXECUTION_RPC_URL: "http://127.0.0.1:{{ .Values.ports.executionGRPC }}" + 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_EXPECTED_SEQUENCER_CHAIN_ID: "{{ tpl .Values.config.conductor.sequencerChainId . }}" + 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.otel.enabled }}" + ASTRIA_CONDUCTOR_NO_CELESTIA_AUTH: "{{ not .Values.config.celestia.token }}" + 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.serviceNamePrefix . }}-conductor" + {{- if not .Values.global.dev }} + {{- else }} + {{- end }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "rollup.name" . }}-geth-env + namespace: {{ include "rollup.namespace" . }} +data: + home_dir: '{{ include "rollup.gethHomeDir" . }}' + data_dir: '{{ include "rollup.gethDataDir" . }}' +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "rollup.name" . }}-executor-scripts + namespace: {{ include "rollup.namespace" . }} +data: + geth-genesis.json: | + {{- tpl (.Files.Get "files/genesis/geth-genesis.json") $ | nindent 4 }} + init-geth.sh: | + {{- tpl (.Files.Get "files/scripts/init-geth.sh") $ | nindent 4 }} +--- diff --git a/charts/flame-rollup/templates/ingress.yaml b/charts/flame-rollup/templates/ingress.yaml new file mode 100644 index 0000000000..efb13ca03a --- /dev/null +++ b/charts/flame-rollup/templates/ingress.yaml @@ -0,0 +1,70 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressApiIsStable := eq (include "rollup.ingress.isStable" .) "true" -}} +{{- $ingressSupportsIngressClassName := eq (include "rollup.ingress.supportsIngressClassName" .) "true" -}} +{{- $ingressSupportsPathType := eq (include "rollup.ingress.supportsPathType" .) "true" -}} + +{{- range $service, $ingress := .Values.ingress.services }} +{{- if $ingress.enabled -}} +{{- $servicePort := $ingress.service.port -}} +{{- $serviceName := tpl $ingress.service.name $ -}} +{{- $ingressPath := $ingress.path -}} +{{- $ingressPathType := $ingress.pathType -}} +{{- $extraPaths := $ingress.extraPaths }} +--- +apiVersion: {{ include "rollup.ingress.apiVersion" $ }} +kind: Ingress +metadata: + name: {{ include "rollup.name" $ }}-{{ $service }}-ingress + namespace: {{ include "rollup.namespace" $ }} + labels: + {{- with $ingress.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- if not $ingressSupportsIngressClassName }} + kubernetes.io/ingress.class: {{ $.Values.ingress.className }} + {{- end }} + {{- 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 }} +{{- end }} diff --git a/charts/flame-rollup/templates/prometheusrule.yaml b/charts/flame-rollup/templates/prometheusrule.yaml new file mode 100644 index 0000000000..225805dd51 --- /dev/null +++ b/charts/flame-rollup/templates/prometheusrule.yaml @@ -0,0 +1,20 @@ +{{- if .Values.alerting.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + name: {{ template "rollup.appName" . }} +{{- if .Values.alerting.prometheusRule.namespace }} + namespace: {{ .Values.alerting.prometheusRule.namespace | quote }} +{{- end }} + labels: + {{- include "rollup.labels" . | nindent 4 }} + {{- if .Values.alerting.prometheusRule.additionalLabels }} + {{- toYaml .Values.alerting.prometheusRule.additionalLabels | nindent 4 }} + {{- end }} +spec: +{{- if .Values.alerting.prometheusRule.rules }} + groups: + - name: {{ template "rollup.name" . }} + rules: {{- toYaml .Values.alerting.prometheusRule.rules | nindent 4 }} +{{- end }} +{{- end }} diff --git a/charts/flame-rollup/templates/service.yaml b/charts/flame-rollup/templates/service.yaml new file mode 100644 index 0000000000..eee3a07c5e --- /dev/null +++ b/charts/flame-rollup/templates/service.yaml @@ -0,0 +1,38 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{ include "rollup.name" . }}-evm-service + namespace: {{ include "rollup.namespace" . }} +spec: + selector: + app: {{ include "rollup.appName" . }} + ports: + - name: json-rpc-svc + port: {{ .Values.ports.jsonRPC }} + targetPort: json-rpc + - name: ws-rpc-svc + port: {{ .Values.ports.wsRPC }} + targetPort: ws-rpc + - name: exec-grpc-svc + port: {{ .Values.ports.executionGRPC }} + targetPort: execution-grpc +--- +{{- if .Values.metrics.enabled }} +kind: Service +apiVersion: v1 +metadata: + name: {{ include "rollup.name" . }}-metrics + namespace: {{ include "rollup.namespace" . }} + labels: + app: {{ include "rollup.appName" . }} +spec: + selector: + app: {{ include "rollup.appName" . }} + ports: + - name: geth-metr + port: {{ .Values.ports.metrics }} + targetPort: geth-metr + - name: conductor-metr + port: {{ .Values.ports.conductorMetrics }} + targetPort: conductor-metr +{{- end }} diff --git a/charts/flame-rollup/templates/servicemonitor.yaml b/charts/flame-rollup/templates/servicemonitor.yaml new file mode 100644 index 0000000000..e7b6ad4493 --- /dev/null +++ b/charts/flame-rollup/templates/servicemonitor.yaml @@ -0,0 +1,36 @@ +{{- if .Values.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{include "rollup.name" . }}-geth-metrics + labels: + {{- include "rollup.labels" . | nindent 4 }} + {{- with .Values.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + jobLabel: geth-metrics + namespaceSelector: + matchNames: + - {{ include "rollup.namespace" . }} + selector: + matchLabels: + app: {{ include "rollup.appName" . }} + endpoints: + - port: geth-metr + path: /debug/metrics/prometheus + {{- with .Values.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} + - port: conductor-metr + path: / + {{- with .Values.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + {{- with .Values.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ . }} + {{- end }} +{{- end }} diff --git a/charts/flame-rollup/templates/statefulsets.yaml b/charts/flame-rollup/templates/statefulsets.yaml new file mode 100644 index 0000000000..6b5c070073 --- /dev/null +++ b/charts/flame-rollup/templates/statefulsets.yaml @@ -0,0 +1,109 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "rollup.name" . }}-geth + labels: + app: {{ include "rollup.appName" . }} + namespace: {{ include "rollup.namespace" . }} +spec: + replicas : {{ .Values.global.replicaCount }} + selector: + matchLabels: + app: {{ include "rollup.appName" . }} + template: + metadata: + name: {{ include "rollup.name" . }}-execution-chain + labels: + app: {{ include "rollup.appName" . }} + spec: + initContainers: + {{- if .Values.config.geth.purgeMempool }} + - name: purge-mempool + image: {{ include "rollup.image" . }} + imagePullPolicy: {{ .Values.images.geth.pullPolicy }} + command: [ "sh", "-c", "rm" ] + args: + - -f + - {{ include "rollup.gethDataDir" . }}/geth/transactions.rlp + volumeMounts: + - mountPath: /home/geth + 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" . }} + imagePullPolicy: {{ .Values.images.geth.pullPolicy }} + envFrom: + - configMapRef: + name: {{ include "rollup.name" . }}-geth-env + volumeMounts: + - mountPath: /scripts/ + name: {{ include "rollup.name" . }}-executor-scripts-volume + - mountPath: /home/geth + name: {{ include "rollup.name" $ }}-rollup-shared-storage-vol + subPath: {{ include "rollup.name" . }}/executor + containers: + - name: geth + command: [ "geth" ] + args: + {{- range $arg := .Values.config.geth.flags }} + {{- if hasKey $arg "condition" }} + {{- if eq (tpl $arg.condition $) "true" }} + - --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} + {{- end }} + {{- else }} + - --{{ $arg.name }}{{ if $arg.value }}={{ tpl $arg.value $ }}{{ end }} + {{- end }} + {{- end }} + image: {{ include "rollup.image" . }} + imagePullPolicy: {{ .Values.images.geth.pullPolicy }} + volumeMounts: + - mountPath: /scripts/ + name: {{ include "rollup.name" . }}-executor-scripts-volume + readOnly: true + - mountPath: /home/geth + name: {{ include "rollup.name" . }}-rollup-shared-storage-vol + subPath: {{ include "rollup.name" . }}/executor + ports: + - containerPort: {{ .Values.ports.jsonRPC }} + name: json-rpc + - containerPort: {{ .Values.ports.wsRPC }} + name: ws-rpc + - containerPort: {{ .Values.ports.executionGRPC }} + name: execution-grpc + {{- if .Values.metrics.enabled }} + - containerPort: {{ .Values.ports.metrics }} + name: geth-metr + {{- end }} + resources: + {{- toYaml .Values.resources.geth | trim | nindent 12 }} + - name: conductor + image: {{ include "conductor.image" . }} + imagePullPolicy: {{ .Values.images.conductor.pullPolicy }} + command: [ "/usr/local/bin/astria-conductor" ] + stdin: {{ .Values.global.useTTY }} + tty: {{ .Values.global.useTTY }} + envFrom: + - configMapRef: + name: {{ include "rollup.name" . }}-conductor-env + resources: + {{- toYaml .Values.resources.conductor | trim | nindent 12 }} + {{- if .Values.metrics.enabled }} + ports: + - containerPort: {{ .Values.ports.conductorMetrics }} + name: conductor-metr + {{- end }} + volumes: + - name: {{ include "rollup.name" . }}-executor-scripts-volume + configMap: + name: {{ include "rollup.name" . }}-executor-scripts + defaultMode: 0500 + - name: {{ include "rollup.name" $ }}-rollup-shared-storage-vol + {{- if .Values.storage.enabled }} + persistentVolumeClaim: + claimName: {{ include "rollup.name" $ }}-rollup-shared-storage-pvc-geth + {{- else }} + emptyDir: {} + {{- end }} +--- diff --git a/charts/flame-rollup/templates/storageclasses.yaml b/charts/flame-rollup/templates/storageclasses.yaml new file mode 100644 index 0000000000..ab93a6ece6 --- /dev/null +++ b/charts/flame-rollup/templates/storageclasses.yaml @@ -0,0 +1,13 @@ +{{/* We only want to create a storage class if we are local. */}} +{{/* For production, you need to create a StorageClass on GKE. */}} +{{- if and .Values.storage.enabled .Values.storage.local }} + {{- range $key, $value := .Values.storage.entities }} +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer +reclaimPolicy: Retain + {{- end }} +{{- end }} diff --git a/charts/flame-rollup/templates/volumes.yaml b/charts/flame-rollup/templates/volumes.yaml new file mode 100644 index 0000000000..7aa5e3658f --- /dev/null +++ b/charts/flame-rollup/templates/volumes.yaml @@ -0,0 +1,54 @@ +{{/* We need to manually create a PersistentVolume when local. */}} +{{/* In prod, a PV will be created by the StorageClass' provisioner using dynamic provisioning feature. */}} +{{- if and .Values.storage.enabled }} + {{- range $key, $value := .Values.storage.entities }} + {{- if $.Values.storage.local }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-pv +spec: + capacity: + storage: {{ $value.size }} + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local + local: + path: {{ $value.path }} + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - astria-dev-cluster-control-plane + - astria-dev-cluster-worker +--- + {{- end }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-pvc-geth + namespace: {{ include "rollup.namespace" $ }} + labels: + "app.kubernetes.io/name": "{{ include "rollup.name" $ }}-{{ $.Chart.Name }}" + "app.kubernetes.io/managed-by": {{ $.Release.Service | quote }} + "helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version | replace "+" "_" }} +spec: + {{- if $.Values.storage.local }} + storageClassName: {{ include "rollup.name" $ }}-{{ $value.persistentVolumeName }}-geth-local + {{- end }} + {{- if $value.storageClassName }} + storageClassName: {{ $value.storageClassName }} + {{- end }} + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ $value.size }} +--- + {{- end }} +{{- end }} diff --git a/charts/flame-rollup/values.yaml b/charts/flame-rollup/values.yaml new file mode 100644 index 0000000000..24d0c80aa1 --- /dev/null +++ b/charts/flame-rollup/values.yaml @@ -0,0 +1,313 @@ +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: + geth: + repo: ghcr.io/astriaorg/flame + pullPolicy: IfNotPresent + tag: pr-30 + devTag: pr-30 + conductor: + repo: ghcr.io/astriaorg/conductor + pullPolicy: IfNotPresent + tag: 1.0.0 + devTag: latest + + +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 + + # 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" + # senderAddress: "0x0000000000000000000000000000000000000000" + # 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 + auctioneerAddresses: {} + # 1: "astria1ferdmm38w7zr4ankmntst0g0qg8e7ygeu3vxcy" + + ## 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" + + geth: + # Set to true to keep history of all blocks + archiveNode: false + # Set to true to enable auctioneer functionality + auctioneer: 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: "{{- if .Values.metrics.enabled -}} true {{- else -}} false {{- end }}" + - name: metrics.addr + value: 0.0.0.0 + condition: "{{- if .Values.metrics.enabled -}} true {{- else -}} false {{- end }}" + - name: metrics.port + value: "{{ .Values.ports.metrics }}" + condition: "{{- if .Values.metrics.enabled -}} true {{- else -}} false {{- end }}" + - name: txpool.nolocals + value: "true" + - name: auctioneer + condition: "{{- if .Values.config.geth.auctioneer -}} true {{- else -}} false {{- end }}" + + 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 chain id of the Astria sequencer chain conductor communicates with + sequencerChainId: "" + # The expected fastest block time possible from sequencer, determines polling + # rate. + sequencerBlockTimeMs: 2000 + # The expected fastest block time possible from DA, determines polling rate. + celestiaBlockTimeMs: 6000 + # URL path for the sequencer + sequencerRpc: "" + # gRPC path for the sequencer + sequencerGrpc: "" + # The maximum number of requests to make to the sequencer per second + sequencerRequestsPerSecond: 500 + # The chain id of the celestia network the conductor communicates with + celestiaChainId: "" + + 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: "" + +metrics: + # set to enable prometheus metrics + enabled: false + +otel: + enabled: false + 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 + labels: {} + hostname: localdev.me + className: nginx + services: + rpc: + enabled: true + hosts: + - 'executor.{{ include "rollup.name" . }}.{{ .Values.ingress.hostname }}' + path: / + pathType: Prefix + service: + name: '{{ include "rollup.name" . }}-evm-service' + port: + name: json-rpc-svc + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + labels: {} + tls: {} + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + ws: + enabled: true + hosts: + - ws-executor.{{ include "rollup.name" . }}.{{ .Values.ingress.hostname }} + path: / + pathType: Prefix + service: + name: '{{ include "rollup.name" . }}-evm-service' + port: + name: ws-rpc-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. +# e.g. astria-executor-pv, astria-executor-pvc +resources: + conductor: + requests: + cpu: 100m + memory: 200Mi + limits: + cpu: 1000m + memory: 2Gi + geth: + requests: + cpu: 16000m + memory: 32Gi + +storage: + enabled: false + local: true + entities: + rollupSharedStorage: + size: "5Gi" + persistentVolumeName: "rollup-shared-storage" + path: "/data/rollup-data" + +# Default service ports +ports: + jsonRPC: 8545 + wsRPC: 8546 + executionGRPC: 50051 + metrics: 6060 + conductorMetrics: 9000 diff --git a/charts/sequencer/Chart.yaml b/charts/sequencer/Chart.yaml index 31767bf715..58cf56878c 100644 --- a/charts/sequencer/Chart.yaml +++ b/charts/sequencer/Chart.yaml @@ -20,7 +20,7 @@ version: 1.0.3 # 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: "1.0.1" +appVersion: "1.0.0" dependencies: - name: sequencer-relayer diff --git a/charts/sequencer/templates/configmaps.yaml b/charts/sequencer/templates/configmaps.yaml index a9999ce7a1..d9ef853c48 100644 --- a/charts/sequencer/templates/configmaps.yaml +++ b/charts/sequencer/templates/configmaps.yaml @@ -64,7 +64,6 @@ data: ASTRIA_SEQUENCER_METRICS_HTTP_LISTENER_ADDR: "0.0.0.0:{{ .Values.ports.sequencerMetrics }}" ASTRIA_SEQUENCER_FORCE_STDOUT: "{{ .Values.global.useTTY }}" ASTRIA_SEQUENCER_PRETTY_PRINT: "{{ .Values.global.useTTY }}" - ASTRIA_NO_OPTIMISTIC_BLOCKS: "{{ not .Values.sequencer.optimisticBlockApis.enabled }}" NO_COLOR: "{{ .Values.global.useTTY }}" ASTRIA_SEQUENCER_NO_OTEL: "{{ not .Values.sequencer.otel.enabled }}" OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.sequencer.otel.endpoint }}" diff --git a/charts/sequencer/values.yaml b/charts/sequencer/values.yaml index 14691e8c73..c1415b1d03 100644 --- a/charts/sequencer/values.yaml +++ b/charts/sequencer/values.yaml @@ -131,6 +131,7 @@ sequencer: otlpHeaders: traceHeaders: optimisticBlockApis: + # set to true to enable optimistic block APIs enabled: false cometbft: diff --git a/dev/values/rollup/dev.yaml b/dev/values/rollup/dev.yaml index 6e20912294..66eb3afb71 100644 --- a/dev/values/rollup/dev.yaml +++ b/dev/values/rollup/dev.yaml @@ -56,9 +56,8 @@ evm-rollup: # 1: # minBaseFee: 0 # elasticityMultiplier: 2 - # baseFeeChangeDenominator: 8 - auctioneerAddresses: - 1: "astria1ferdmm38w7zr4ankmntst0g0qg8e7ygeu3vxcy" + # 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. diff --git a/dev/values/rollup/flame-dev.yaml b/dev/values/rollup/flame-dev.yaml new file mode 100644 index 0000000000..5eb58554fd --- /dev/null +++ b/dev/values/rollup/flame-dev.yaml @@ -0,0 +1,274 @@ +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 + celestiaChainId: celestia-local-0 + +evm-rollup: + enabled: false + +flame-rollup: + enabled: true + 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 + + # 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 + senderAddress: "0x0000000000000000000000000000000000000000" + 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 + auctioneerAddresses: + 1: "astria1ferdmm38w7zr4ankmntst0g0qg8e7ygeu3vxcy" + ## 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: "0x6080604052600436106100f35760003560e01c8063b6476c7e1161008a578063e74b981b11610059578063e74b981b1461027b578063ebd090541461029b578063f2fde38b146102bb578063fc88d31b146102db57600080fd5b8063b6476c7e1461021c578063bab916d01461023e578063d294f09314610251578063db97dc981461026657600080fd5b80638da5cb5b116100c65780638da5cb5b146101a1578063a7eaa739146101d3578063a996e020146101f3578063ad2282471461020657600080fd5b80636f46384a146100f8578063715018a6146101215780637eb6dec7146101385780638897397914610181575b600080fd5b34801561010457600080fd5b5061010e60035481565b6040519081526020015b60405180910390f35b34801561012d57600080fd5b506101366102f1565b005b34801561014457600080fd5b5061016c7f000000000000000000000000000000000000000000000000000000000000000981565b60405163ffffffff9091168152602001610118565b34801561018d57600080fd5b5061013661019c3660046107a6565b610305565b3480156101ad57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610118565b3480156101df57600080fd5b506101366101ee3660046107a6565b610312565b610136610201366004610808565b61031f565b34801561021257600080fd5b5061010e60065481565b34801561022857600080fd5b50610231610414565b6040516101189190610874565b61013661024c3660046108c3565b6104a2565b34801561025d57600080fd5b50610136610588565b34801561027257600080fd5b506102316106b4565b34801561028757600080fd5b50610136610296366004610905565b6106c1565b3480156102a757600080fd5b506005546101bb906001600160a01b031681565b3480156102c757600080fd5b506101366102d6366004610905565b6106eb565b3480156102e757600080fd5b5061010e60045481565b6102f9610729565b6103036000610756565b565b61030d610729565b600455565b61031a610729565b600355565b3460045480821161034b5760405162461bcd60e51b815260040161034290610935565b60405180910390fd5b60007f000000000000000000000000000000000000000000000000000000003b9aca006103788385610998565b61038291906109b1565b1161039f5760405162461bcd60e51b8152600401610342906109d3565b600454600660008282546103b39190610a61565b90915550506004546103c59034610998565b336001600160a01b03167f0c64e29a5254a71c7f4e52b3d2d236348c80e00a00ba2e1961962bd2827c03fb888888886040516104049493929190610a9d565b60405180910390a3505050505050565b6002805461042190610acf565b80601f016020809104026020016040519081016040528092919081815260200182805461044d90610acf565b801561049a5780601f1061046f5761010080835404028352916020019161049a565b820191906000526020600020905b81548152906001019060200180831161047d57829003601f168201915b505050505081565b346003548082116104c55760405162461bcd60e51b815260040161034290610935565b60007f000000000000000000000000000000000000000000000000000000003b9aca006104f28385610998565b6104fc91906109b1565b116105195760405162461bcd60e51b8152600401610342906109d3565b6003546006600082825461052d9190610a61565b909155505060035461053f9034610998565b336001600160a01b03167f0f4961cab7530804898499aa89f5ec81d1a73102e2e4a1f30f88e5ae3513ba2a868660405161057a929190610b09565b60405180910390a350505050565b6005546001600160a01b031633146105f45760405162461bcd60e51b815260206004820152602960248201527f41737472696142726964676561626c6545524332303a206f6e6c7920666565206044820152681c9958da5c1a595b9d60ba1b6064820152608401610342565b6005546006546040516000926001600160a01b031691908381818185875af1925050503d8060008114610643576040519150601f19603f3d011682016040523d82523d6000602084013e610648565b606091505b50509050806106ac5760405162461bcd60e51b815260206004820152602a60248201527f41737472696142726964676561626c6545524332303a20666565207472616e7360448201526919995c8819985a5b195960b21b6064820152608401610342565b506000600655565b6001805461042190610acf565b6106c9610729565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6106f3610729565b6001600160a01b03811661071d57604051631e4fbdf760e01b815260006004820152602401610342565b61072681610756565b50565b6000546001600160a01b031633146103035760405163118cdaa760e01b8152336004820152602401610342565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156107b857600080fd5b5035919050565b60008083601f8401126107d157600080fd5b50813567ffffffffffffffff8111156107e957600080fd5b60208301915083602082850101111561080157600080fd5b9250929050565b6000806000806040858703121561081e57600080fd5b843567ffffffffffffffff8082111561083657600080fd5b610842888389016107bf565b9096509450602087013591508082111561085b57600080fd5b50610868878288016107bf565b95989497509550505050565b60006020808352835180602085015260005b818110156108a257858101830151858201604001528201610886565b506000604082860101526040601f19601f8301168501019250505092915050565b600080602083850312156108d657600080fd5b823567ffffffffffffffff8111156108ed57600080fd5b6108f9858286016107bf565b90969095509350505050565b60006020828403121561091757600080fd5b81356001600160a01b038116811461092e57600080fd5b9392505050565b6020808252602d908201527f417374726961576974686472617765723a20696e73756666696369656e74207760408201526c69746864726177616c2066656560981b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156109ab576109ab610982565b92915050565b6000826109ce57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526062908201527f417374726961576974686472617765723a20696e73756666696369656e74207660408201527f616c75652c206d7573742062652067726561746572207468616e203130202a2a60608201527f20283138202d20424153455f434841494e5f41535345545f505245434953494f6080820152614e2960f01b60a082015260c00190565b808201808211156109ab576109ab610982565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000610ab1604083018688610a74565b8281036020840152610ac4818587610a74565b979650505050505050565b600181811c90821680610ae357607f821691505b602082108103610b0357634e487b7160e01b600052602260045260246000fd5b50919050565b602081526000610b1d602083018486610a74565b94935050505056fea2646970667358221220842bd8104ffc1c611919341f64a8277f2fc808138b97720a6dc1382e5670099064736f6c63430008190033" + + + config: + # The level at which core astria components will log out + # Options are: error, warn, info, and debug + logLevel: "debug" + + geth: + auctioneer: false + + 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. When running with the auctioneer side car, decrease this value in + # order to avoid race condition between executions (100ms recommended). + 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: "" + + 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 + + storage: + enabled: false + + ingress: + enabled: true + services: + rpc: + enabled: true + ws: + enabled: true + +auctioneer: + enabled: false + config: + sequencerPrivateKey: + devContent: "b8da3289343cb92a235af079d74bae435f16272df38b9ab3ab468e62c632e2f8" + feeAssetDenomination: "nria" + sequencerAddressPrefix: astria + rollupGrpcEndpoint: "http://astria-evm-service.astria-dev-cluster.svc.cluster.local:50051" + rollupId: "astria" + latencyMarginMs: 1000 + logLevel: "debug" + + +celestia-node: + enabled: false + +composer: + enabled: true + config: + privateKey: + devContent: "2bd806c97f0e00af1a1fc3328fa763a9269723c8db8fac4f93af71db186d6e90" + +evm-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" + +postgresql: + enabled: true + 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: + network: + 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" + + ingress: + enabled: true + hostname: explorer.astria.localdev.me + paths: + - path: /api + pathType: Prefix + - path: /socket + pathType: Prefix + - path: /sitemap.xml + pathType: ImplementationSpecific + - path: /public-metrics + pathType: Prefix + - path: /auth/auth0 + pathType: Exact + - path: /auth/auth0/callback + pathType: Exact + - path: /auth/logout + pathType: Exact + + frontend: + extraEnv: + - 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_WEI_NAME + value: "aRia" + - name: NEXT_PUBLIC_AD_TEXT_PROVIDER + value: "none" + ingress: + enabled: true + hostname: explorer.astria.localdev.me diff --git a/dev/values/validators/all.yml b/dev/values/validators/all.yml index 0b482a4e62..21af3448ed 100644 --- a/dev/values/validators/all.yml +++ b/dev/values/validators/all.yml @@ -37,6 +37,11 @@ genesis: - address: astria1d7zjjljc0dsmxa545xkpwxym86g8uvvwhtezcr balance: "69000000" +sequencer: + optimisticBlockApis: + # set to true to enable optimistic block APIs + enabled: false + resources: cometbft: requests: