Skip to content

Commit

Permalink
feat(charts)!: sequencer defaults for networks
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Mar 7, 2025
1 parent 5dfa7cf commit 006f743
Show file tree
Hide file tree
Showing 18 changed files with 896 additions and 35 deletions.
4 changes: 2 additions & 2 deletions charts/deploy.just
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ deploy-smoke-test tag=defaultTag:
-n astria-validator-single single-sequencer-chart ./charts/sequencer \
-f dev/values/validators/all.yml \
-f dev/values/validators/single.yml \
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \
{{ if tag != '' { replace('--set images.sequencer.tag=# --set sequencer-relayer.images.sequencerRelayer.tag=#', '#', 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-stack -f dev/values/rollup/dev.yaml \
Expand All @@ -221,7 +221,7 @@ deploy-smoke-cli tag=defaultTag:
-n astria-validator-single single-sequencer-chart ./charts/sequencer \
-f dev/values/validators/all.yml \
-f dev/values/validators/single.yml \
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \
{{ if tag != '' { replace('--set images.sequencer.tag=# --set sequencer-relayer.images.sequencerRelayer.tag=#', '#', 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-stack -f dev/values/rollup/dev.yaml \
Expand Down
6 changes: 3 additions & 3 deletions charts/ibc-test.just
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ delete:
-n astria-validator-single single-sequencer-chart ./sequencer \
-f ../dev/values/validators/all.yml \
-f ../dev/values/validators/single.yml \
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \
{{ if tag != '' { replace('--set images.sequencer.tag=# --set sequencer-relayer.images.sequencerRelayer.tag=#', '#', 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 ./evm-stack \
Expand All @@ -45,7 +45,7 @@ delete:
-n astria-validator-single single-sequencer-chart ./sequencer \
-f ../dev/values/validators/all-without-native.yml \
-f ../dev/values/validators/single.yml \
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \
{{ if tag != '' { replace('--set images.sequencer.tag=# --set sequencer-relayer.images.sequencerRelayer.tag=#', '#', tag) } else { '' } }} \
--create-namespace > /dev/null
just wait-for-sequencer > /dev/null
echo "Deploying Hermes"
Expand All @@ -63,7 +63,7 @@ delete:
-n astria-validator-single single-sequencer-chart ./sequencer \
-f ../dev/values/validators/all.yml \
-f ../dev/values/validators/single.yml \
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \
{{ if tag != '' { replace('--set images.sequencer.tag=# --set sequencer-relayer.images.sequencerRelayer.tag=#', '#', 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 ./evm-stack \
Expand Down
2 changes: 1 addition & 1 deletion charts/sequencer-relayer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
version: 1.0.2

# 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
Expand Down
34 changes: 33 additions & 1 deletion charts/sequencer-relayer/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,40 @@ Namepsace to deploy elements into.
{{- default .Release.Namespace .Values.global.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- end }}

{{- define "sequencer-relayer.imageTag" -}}
{{- if or (eq .Values.global.network "custom") (eq .Values.global.dev "true") }}{{ .Values.images.sequencerRelayer.tag }}
{{- else if eq .Values.global.network "mainnet" }}1.0.0
{{- else if eq .Values.global.network "dawn-1" }}1.0.0
{{- else if eq .Values.global.network "dusk-11" }}1.0.0
{{- end }}
{{- end }}

{{- define "sequencer-relayer.image" -}}
{{ .Values.images.sequencerRelayer.repo }}:{{ if .Values.global.dev }}{{ .Values.images.sequencerRelayer.devTag }}{{ else }}{{ .Values.images.sequencerRelayer.tag }}{{ end }}
{{ .Values.images.sequencerRelayer.repo }}:{{ include "sequencer-relayer.imageTag" . }}
{{- end }}

{{- define "sequencer-relayer.sequencerChainId" -}}
{{- if eq .Values.global.network "custom" }}{{ .Values.config.relayer.sequencerChainId }}
{{- else if eq .Values.global.network "mainnet" }}astria
{{- else if eq .Values.global.network "dawn-1" }}dawn-1
{{- else if eq .Values.global.network "dusk-11" }}astria-dusk-11
{{- end }}
{{- end }}

{{- define "sequencer-relayer.celestiaChainId" -}}
{{- if eq .Values.global.network "custom" }}{{ .Values.config.relayer.celestiaChainId }}
{{- else if eq .Values.global.network "mainnet" }}celestia
{{- else if eq .Values.global.network "dawn-1" }}mocha-4
{{- else if eq .Values.global.network "dusk-11" }}mocha-4
{{- end }}
{{- end }}

{{- define "sequencer-relayer.blockTimeMs" -}}
{{- if or (eq .Values.global.network "custom") (eq .Values.global.dev "true") }}{{ .Values.config.relayer.blockTimeMs }}
{{- else if eq .Values.global.network "mainnet" }}1000
{{- else if eq .Values.global.network "dawn-1" }}1000
{{- else if eq .Values.global.network "dusk-11" }}1000
{{- end }}
{{- end }}

{{/*
Expand Down
6 changes: 3 additions & 3 deletions charts/sequencer-relayer/templates/configmaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
data:
ASTRIA_SEQUENCER_RELAYER_LOG: "astria_sequencer_relayer=debug"
ASTRIA_SEQUENCER_RELAYER_SUBMISSION_STATE_PATH: "{{ include "sequencer-relayer.storage.submissionStatePath" . }}"
ASTRIA_SEQUENCER_RELAYER_BLOCK_TIME: "{{ .Values.config.relayer.blockTimeMs }}"
ASTRIA_SEQUENCER_RELAYER_BLOCK_TIME: "{{ include "sequencer-relayer.blockTimeMs" . }}"
ASTRIA_SEQUENCER_RELAYER_COMETBFT_ENDPOINT: "{{ .Values.config.relayer.cometbftRpc }}"
ASTRIA_SEQUENCER_RELAYER_SEQUENCER_GRPC_ENDPOINT: "{{ .Values.config.relayer.sequencerGrpc }}"
ASTRIA_SEQUENCER_RELAYER_CELESTIA_APP_GRPC_ENDPOINT: "{{ .Values.config.relayer.celestiaAppGrpc }}"
Expand All @@ -26,8 +26,8 @@ data:
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 }}"
ASTRIA_SEQUENCER_RELAYER_SEQUENCER_CHAIN_ID: "{{ include "sequencer-relayer.sequencerChainId" . }}"
ASTRIA_SEQUENCER_RELAYER_CELESTIA_CHAIN_ID: "{{ include "sequencer-relayer.celestiaChainId" . }}"
{{- if not .Values.global.dev }}
{{- else }}
{{- end }}
Expand Down
11 changes: 9 additions & 2 deletions charts/sequencer-relayer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,30 @@ global:
# Best to be false in production environments, true for clean logs on local dev.
useTTY: true
dev: false
# Supported options are `custom`, `mainnet`, `dawn-1`, or `dusk-11`.
# When set to a specific network, there are default values for some
# values which are used and cannot be changed.
network: "custom"

# sequencer core images
images:
sequencerRelayer:
repo: ghcr.io/astriaorg/sequencer-relayer
pullPolicy: IfNotPresent
tag: 1.0.0
devTag: latest
# Only used when global.dev is true OR global.network is set to `custom`
tag: latest

config:
relayer:
# only configurable in custom network
sequencerChainId: ""
# only configurable in custom network
celestiaChainId: ""
celestiaAppGrpc: ""
cometbftRpc: ""
sequencerGrpc: ""
onlyIncludeRollups: ""
# Only used when global.network is set to `custom` or global.dev is true
blockTimeMs: "1000"

metrics:
Expand Down
6 changes: 3 additions & 3 deletions charts/sequencer/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: sequencer-relayer
repository: file://../sequencer-relayer
version: 1.0.1
digest: sha256:3b3ce65ff473606fcc86027653cadd212ba45ac8b39d5806d713b48f695ad235
generated: "2024-11-20T11:24:11.85775+02:00"
version: 1.0.2
digest: sha256:ccc0f6b082973f9f5efae28d83589f3ede213f4b6dcc1392f079d37ed6295d32
generated: "2025-02-20T10:18:48.213464-08:00"
4 changes: 2 additions & 2 deletions charts/sequencer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5
version: 1.0.6
# 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.
Expand All @@ -24,7 +24,7 @@ appVersion: "1.0.0"

dependencies:
- name: sequencer-relayer
version: "1.0.1"
version: "1.0.2"
repository: "file://../sequencer-relayer"
condition: sequencer-relayer.enabled

Expand Down
16 changes: 8 additions & 8 deletions charts/sequencer/files/cometbft/config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ grpc_laddr = ""
# 0 - unlimited.
# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
# 1024 - 40 - 10 - 50 = 924 = ~900
grpc_max_open_connections = {{ .Values.cometbft.config.grpc.maxOpenConnections }}
grpc_max_open_connections = {{ .Values.cometbft.config.grpc.maxOpenConnections }}

# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
unsafe = false
Expand Down Expand Up @@ -409,21 +409,21 @@ version = "v0"
wal_file = "data/cs.wal/wal"

# How long we wait for a proposal block before prevoting nil
timeout_propose = "{{ .Values.cometbft.config.consensus.timeoutPropose }}"
timeout_propose = "{{ include "cometBFT.timeouts.propose" . }}"
# How much timeout_propose increases with each round
timeout_propose_delta = "{{ .Values.cometbft.config.consensus.timeoutProposeDelta }}"
timeout_propose_delta = "{{ include "cometBFT.timeouts.proposeDelta" . }}"
# How long we wait after receiving +2/3 prevotes for “anything” (ie. not a single block or nil)
timeout_prevote = "{{ .Values.cometbft.config.consensus.timeoutPrevote }}"
timeout_prevote = "{{ include "cometBFT.timeouts.prevote" . }}"
# How much the timeout_prevote increases with each round
timeout_prevote_delta = "{{ .Values.cometbft.config.consensus.timeoutPrevoteDelta }}"
timeout_prevote_delta = "{{ include "cometBFT.timeouts.prevoteDelta" . }}"
# How long we wait after receiving +2/3 precommits for “anything” (ie. not a single block or nil)
timeout_precommit = "{{ .Values.cometbft.config.consensus.timeoutPrecommit }}"
timeout_precommit = "{{ include "cometBFT.timeouts.precommit" . }}"
# How much the timeout_precommit increases with each round
timeout_precommit_delta = "{{ .Values.cometbft.config.consensus.timeoutPrecommitDelta }}"
timeout_precommit_delta = "{{ include "cometBFT.timeouts.precommitDelta" . }}"
# How long we wait after committing a block, before starting on the new
# height (this gives us a chance to receive some more precommits, even
# though we already have +2/3).
timeout_commit = "{{ .Values.cometbft.config.consensus.timeoutCommit }}"
timeout_commit = "{{ include "cometBFT.timeouts.commit" . }}"

# How many blocks to look back to check existence of the node's consensus votes before joining consensus
# When non-zero, the node will panic upon restart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
]
{{- if not .Values.global.dev }}
{{- else }}
{{- end}}
{{- end }}
},
"chain_id": "{{ .Values.genesis.chainId }}",
"consensus_params": {
Expand Down
Loading

0 comments on commit 006f743

Please sign in to comment.