Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proto, conductor, cd)!: changes for Forma migration #1843

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d8b9778
proto changes, add stop/restart logic
ethanoroshiba Dec 3, 2024
fdbe302
add soft and firm test, update change log and valus
ethanoroshiba Dec 3, 2024
30bd915
version updates
ethanoroshiba Dec 3, 2024
ff9ad8c
update chart.lock
ethanoroshiba Dec 3, 2024
af132a1
add rollup_start_block_height field to GenesisInfo
ethanoroshiba Dec 4, 2024
59456a4
update height mapping calculation, flush out tests
ethanoroshiba Dec 4, 2024
afc2499
geth devtag
ethanoroshiba Dec 5, 2024
f7c9682
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Dec 5, 2024
90b1f11
fix height logic
ethanoroshiba Dec 9, 2024
2a3ca48
rustfmt
ethanoroshiba Dec 9, 2024
581424f
charts changes to reflect changes in geth
ethanoroshiba Dec 10, 2024
36572d0
fix extraDataOverride naming
ethanoroshiba Dec 10, 2024
6e790c1
remove rollup start height from geth config
ethanoroshiba Dec 10, 2024
5e562e4
fix erroneous doc comment
ethanoroshiba Dec 12, 2024
8988c88
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Dec 13, 2024
d971d5c
stop height of 0 means do not stop
mycodecrafting Dec 13, 2024
fa7474c
Merge branch 'ENG-1031/forma_migration' of https://github.com/astriao…
ethanoroshiba Dec 13, 2024
fa7af2a
charts updates
ethanoroshiba Dec 13, 2024
ea80fbb
fix charts
ethanoroshiba Dec 13, 2024
22edac8
Fix values
ethanoroshiba Dec 13, 2024
2f7ed73
requested changes and fix ibc tests
ethanoroshiba Dec 13, 2024
9f0deb6
genesis improvements, new smoke test
ethanoroshiba Dec 16, 2024
1b93dfb
fix values.yaml
ethanoroshiba Dec 16, 2024
2283672
add values
ethanoroshiba Dec 16, 2024
3a73489
fix devTag
ethanoroshiba Dec 16, 2024
483aa39
update specs
ethanoroshiba Jan 3, 2025
680d984
add preliminary to GenesisInfo
ethanoroshiba Jan 6, 2025
00b10a4
use enum to propagate exit reason instead of errors
ethanoroshiba Jan 6, 2025
02d04d7
add halt logic
ethanoroshiba Jan 6, 2025
af7ebd0
rustfmt
ethanoroshiba Jan 6, 2025
e890e64
Merge branch 'main' into ENG-1031/forma_migration
ethanoroshiba Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,37 @@ jobs:
run: |
TAG=sha-$(git rev-parse --short HEAD)
just run-smoke-test $TAG
smoke-test-evm-rollup-restart:
needs: [run_checker, composer, conductor, sequencer, sequencer-relayer, evm-bridge-withdrawer, cli]
if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'astriaorg/astria') && (github.event_name == 'merge_group' || needs.run_checker.outputs.run_docker == 'true')
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@just
- name: Install kind
uses: helm/kind-action@v1
with:
install_only: true
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Smoke Test Environment
timeout-minutes: 10
run: |
TAG=sha-$(git rev-parse --short HEAD)
just deploy cluster
kubectl create secret generic regcred --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson
echo -e "\n\nDeploying with astria images tagged $TAG"
just --set defaultValues "dev/values/rollup/evm-restart-test.yaml" deploy smoke-test $TAG
- name: Run Smoke test
timeout-minutes: 3
run: |
TAG=sha-$(git rev-parse --short HEAD)
just run-smoke-test $TAG

smoke-cli:
needs: [run_checker, composer, conductor, sequencer, sequencer-relayer, evm-bridge-withdrawer, cli]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions charts/deploy.just
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ clean-persisted-data:
deploy-local-metrics:
kubectl apply -f kubernetes/metrics-server-local.yml

defaultValues := "dev/values/rollup/dev.yaml"
defaultTag := ""
deploy-smoke-test tag=defaultTag:
deploy-smoke-test tag=defaultTag values=defaultValues:
@echo "Deploying ingress controller..." && just deploy ingress-controller > /dev/null
@just wait-for-ingress-controller > /dev/null
@echo "Deploying local celestia instance..." && just deploy celestia-local > /dev/null
Expand All @@ -184,7 +185,7 @@ 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-stack -f dev/values/rollup/dev.yaml \
@echo "Starting EVM rollup..." && helm install -n astria-dev-cluster astria-chain-chart ./charts/evm-stack -f {{ values }} \
{{ 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 \
Expand Down
4 changes: 2 additions & 2 deletions charts/evm-rollup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.0.0"
appVersion: "1.0.2"

maintainers:
- name: wafflesvonmaple
Expand Down
106 changes: 91 additions & 15 deletions charts/evm-rollup/files/genesis/geth-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
{{- if .Values.genesis.cancunTime }}
"cancunTime": {{ toString .Values.genesis.cancunTime | replace "\"" "" }},
{{- end }}
{{- if .Values.genesis.cancunTime }}
{{- if .Values.genesis.pragueTime }}
"pragueTime": {{ toString .Values.genesis.pragueTime | replace "\"" "" }},
{{- end }}
{{- if .Values.genesis.cancunTime }}
{{- if .Values.genesis.verkleTime }}
"verkleTime": {{ toString .Values.genesis.verkleTime | replace "\"" "" }},
{{- end }}
"terminalTotalDifficulty": 0,
Expand All @@ -27,22 +27,98 @@
{{- 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 }}"
{{- if not .Values.global.dev }}
{{- else }}
{{- end }}
"astriaForks": {
{{- $forks := .Values.genesis.forks }}
{{- $index := 0 }}
{{- $lastIndex := sub (len $forks) 1 }}
{{- range $key, $value := .Values.genesis.forks }}
"{{ $key }}": {
{{- $fields := list }}
{{- with $value }}

{{- if .height }}
{{- $fields = append $fields (printf "\"height\": %s" (toString .height | replace "\"" "")) }}
{{- end }}

{{- if .halt }}
{{- $fields = append $fields (printf "\"halt\": %s" (toString .halt | replace "\"" "")) }}
{{- end }}

{{- if .snapshotChecksum }}
{{- $fields = append $fields (printf "\"snapshotChecksum\": %s" (toString .snapshotChecksum)) }}
{{- end }}

{{- if .extraDataOverride }}
{{- $fields = append $fields (printf "\"extraDataOverride\": %s" (toString .extraDataOverride)) }}
{{- end }}

{{- if .feeCollector }}
{{- $fields = append $fields (printf "\"feeCollector\": \"%s\"" (toString .feeCollector)) }}
{{- end }}

{{- if .eip1559Params }}
{{- $fields = append $fields (printf "\"eip1559Params\": %s" (toPrettyJson .eip1559Params | indent 8 | trim)) }}
{{- end }}

{{- if .sequencer }}
{{- $sequencerFields := list }}

{{- if .sequencer.chainId }}
{{- $sequencerFields = append $sequencerFields (printf "\"chainId\": \"%s\"" (tpl .sequencer.chainId .)) }}
{{- end }}

{{- if .sequencer.addressPrefix }}
{{- $sequencerFields = append $sequencerFields (printf "\"addressPrefix\": \"%s\"" .sequencer.addressPrefix) }}
{{- end }}

{{- if .sequencer.startHeight }}
{{- $sequencerFields = append $sequencerFields (printf "\"startHeight\": %s" (toString .sequencer.startHeight | replace "\"" "")) }}
{{- end }}

{{- if .sequencer.stopHeight }}
{{- $sequencerFields = append $sequencerFields (printf "\"stopHeight\": %s" (toString .sequencer.stopHeight | replace "\"" "")) }}
{{- end }}

{{- $fields = append $fields (printf "\"sequencer\": {\n%s\n}" (join ",\n" $sequencerFields | indent 4)) }}
{{- end }}

{{- if .celestia }}
{{- $celestiaFields := list }}

{{- if .celestia.chainId }}
{{- $celestiaFields = append $celestiaFields (printf "\"chainId\": \"%s\"" (tpl .celestia.chainId .)) }}
{{- end }}

{{- if .celestia.startHeight }}
{{- $celestiaFields = append $celestiaFields (printf "\"startHeight\": %s" (toString .celestia.startHeight | replace "\"" "")) }}
{{- end }}

{{- if .celestia.heightVariance }}
{{- $celestiaFields = append $celestiaFields (printf "\"heightVariance\": %s" (toString .celestia.heightVariance | replace "\"" "")) }}
{{- end }}

{{- if $celestiaFields | len }}
{{- $fields = append $fields (printf "\"celestia\": {\n%s\n}" (join ",\n" $celestiaFields | indent 4)) }}
{{- end }}
{{- end }}

{{- if .bridgeAddresses }}
{{- $fields = append $fields (printf "\"bridgeAddresses\": %s" (toPrettyJson .bridgeAddresses | indent 4 | trim)) }}
{{- end }}

{{- join ",\n" $fields | indent 16 }}
}
{{- if ne $index $lastIndex }},{{ end }}
{{- $index := add $index 1 }}
{{- end }}
{{- end }}
}
},
{{- if not .Values.global.dev }}
{{- else }}
{{- end }}
"difficulty": "0",
"gasLimit": "{{ toString .Values.genesis.gasLimit | replace "\"" "" }}",
"alloc": {
Expand Down
2 changes: 0 additions & 2 deletions charts/evm-rollup/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ metadata:
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 }}"
Expand Down
97 changes: 52 additions & 45 deletions charts/evm-rollup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,76 @@ images:
repo: ghcr.io/astriaorg/astria-geth
pullPolicy: IfNotPresent
tag: 1.0.0
devTag: latest
devTag: pr-59
overrideTag: ""
conductor:
repo: ghcr.io/astriaorg/conductor
pullPolicy: IfNotPresent
tag: 1.0.0
tag: 1.0.1
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: ""

# The "forks" for upgrading the chain. Contains necessary information for starting
# and, if desired, restarting the chain at a given height. The necessary fields
# for the genesis fork are provided, and additional forks can be added as needed.
forks:
launch:
# The block height to start the chain at, 0 for genesis
height: "0"
# Whether to halt the rollup chain at the given height. False for genesis
halt: "false"
# Checksum of the snapshot to use upon restart
snapshotChecksum: ""
# Will fill the extra data in each block, can be left empty
# can also fill with something unique for your chain.
extraDataOverride: ""
# Configure the fee collector for the evm tx fees, activated at block heights.
# If not configured, all tx fees will be burned.
feeCollector: ""
# 1: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30"
# Configure EIP-1559 params, activated at block heights.
eip1559Params: {}
# 1:
# minBaseFee: 0
# elasticityMultiplier: 2
# baseFeeChangeDenominator: 8
sequencer:
# The chain id of the sequencer chain
chainId: ""
# The hrp for bech32m addresses, unlikely to be changed
addressPrefix: "astria"
# Block height to start syncing rollup from, lowest possible is 2
startHeight: ""
# Block height (on sequencer) to stop syncing rollup at, continuing to next configuration fork.
# A height of 0 indicates no stop height.
stopHeight: ""
celestia:
# The chain id of the celestia chain
chainId: ""
# The first Celestia height to utilize when looking for rollup data
startHeight: ""
# The variance in Celestia height to allow before halting the chain
heightVariance: ""
# 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

## 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

## Standard Eth Genesis config values
# An EVM chain number id, different from the astria rollup name
Expand Down Expand Up @@ -167,8 +178,6 @@ config:
# - "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
Expand All @@ -180,8 +189,6 @@ config:
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
Expand Down
6 changes: 3 additions & 3 deletions charts/evm-stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies:
version: 0.4.0
- name: evm-rollup
repository: file://../evm-rollup
version: 1.0.1
version: 1.0.2
- name: composer
repository: file://../composer
version: 1.0.0
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: blockscout-stack
repository: https://blockscout.github.io/helm-charts
version: 1.6.8
digest: sha256:4715e557b6ceb0fa85c9efe86f5b26d665783f0be9162728efe808fa3a35d727
generated: "2024-12-12T19:52:24.992658+02:00"
digest: sha256:cabd3646c4478bb720c86bdc692243c20717d667ad8230154656d9c965197c6a
generated: "2024-12-13T08:32:31.235575-06:00"
4 changes: 2 additions & 2 deletions charts/evm-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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.6
version: 1.0.7

dependencies:
- name: celestia-node
version: 0.4.0
repository: "file://../celestia-node"
condition: celestia-node.enabled
- name: evm-rollup
version: 1.0.1
version: 1.0.2
repository: "file://../evm-rollup"
- name: composer
version: 1.0.0
Expand Down
Loading
Loading