-
Notifications
You must be signed in to change notification settings - Fork 97
feature(charts): hermes chart fixes, bech32 updates, ibc bridge test #1130
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
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
a488dc5
fix hermes chart
steezeburger b3519fd
reverse unneeded changes
steezeburger 4c7c2b5
reverse uneeded
steezeburger 45e1282
pr feedback
steezeburger 71a9b58
add celestia app rest api to ingress, unsafe cors option
steezeburger 72de1cb
add new celestia dev account to genesis to be used with keplr
steezeburger 93f3d6f
use new hermes image from registry
steezeburger 3b88f44
Merge branch 'main' into fix/hermes-chart
steezeburger d408372
increment celestia-local chart version
steezeburger 16dbb7e
update hermes chart version as well
steezeburger 0f261e3
make comment more clear
steezeburger fc1cf45
bridge-test chart
steezeburger b2b4c1f
wip ibc testing
steezeburger 537c0a2
Merge branch 'main' into fix/hermes-chart
steezeburger 49f6516
consistent naming
steezeburger 143e83f
config updates, use script for job, configmap
steezeburger d985e57
bech32
steezeburger c8709df
human-readable prefix updates to geth
steezeburger a0b75b0
Merge branch 'main' into fix/hermes-chart
steezeburger 6044a64
ibc bridge test
steezeburger fcf2a9c
changes for ci/cd
steezeburger 8535f15
use geth image from pr build
steezeburger 4fbbba4
fail gh action if job fails
steezeburger 8da1a40
debugging
steezeburger e889b36
attempting kubectl wait using while, which works previously in the job
steezeburger 88a9222
lint
steezeburger 72f9e9c
try polling since kubectl wait hangs
steezeburger 5d0f3c1
lints
steezeburger 54525fb
debugging
steezeburger f9f32a6
chart version bumps to appease the lint gods
steezeburger c1dc1bd
shorter timeout
steezeburger 49882bd
last commit didnt trigger action?
steezeburger 88b721a
revert
steezeburger bab039a
trying to trigger action
steezeburger fac1df6
hm
steezeburger 30835a1
Merge branch 'main' into fix/hermes-chart
steezeburger 3569078
set TAG envar
steezeburger 36869ff
simplify gh job
steezeburger 79d44da
check status
steezeburger 0acf5d1
else not elif
steezeburger bdb1dbd
Merge branch 'main' into fix/hermes-chart
steezeburger 4e7bca5
fix hermes smoke tests
steezeburger e7907df
updates to hermes chart and ibc test
steezeburger 5a3c8e7
Merge branch 'main' into fix/hermes-chart
steezeburger 01a3e86
remove extra spaces
steezeburger 63ef8b8
remove extra line
steezeburger e7c878a
escape evm address correctly for memo field
steezeburger caa038f
Merge branch 'main' into fix/hermes-chart
steezeburger 7d0d246
fix chart maintainers list
steezeburger 54c9a8b
version bump
steezeburger 79af7bf
Merge branch 'main' into fix/hermes-chart
steezeburger 11a7ab7
better default for just command
steezeburger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| apiVersion: v2 | ||
| name: bridge-test | ||
| description: A Helm chart for Kubernetes | ||
|
|
||
| # A chart can be either an 'application' or a 'library' chart. | ||
| # | ||
| # Application charts are a collection of templates that can be packaged into versioned archives | ||
| # to be deployed. | ||
| # | ||
| # Library charts provide useful utilities or functions for the chart developer. They're included as | ||
| # a dependency of application charts to inject those utilities and functions into the rendering | ||
| # pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
| type: application | ||
|
|
||
| # This is the chart version. This version number should be incremented each time you make changes | ||
| # to the chart and its templates, including the app version. | ||
| # Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
| version: 0.1.0 | ||
|
|
||
| # This is the version number of the application being deployed. This version number should be | ||
| # incremented each time you make changes to the application. Versions are not expected to | ||
| # follow Semantic Versioning. They should reflect the version the application is using. | ||
| # It is recommended to use it with quotes. | ||
| appVersion: "0.1.0" | ||
|
|
||
| maintainers: | ||
| - name: steezeburger | ||
| url: astria.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| #!/bin/sh | ||
|
|
||
| get_evm_balance() { | ||
| HEX_NUM=$(curl -X POST "$evm_url" -s -d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBalance\",\"params\":[\"$evm_to_address\", \"latest\"],\"id\":1}" -H 'Content-Type: application/json' | jq -r '.result') | ||
| # strip 0x | ||
| HEX_NUM=$(echo "$HEX_NUM" | sed 's/^0x//') | ||
| # capitalize all lowercase letters | ||
| HEX_NUM=$(echo "$HEX_NUM" | tr '[:lower:]' '[:upper:]') | ||
| # print as integer | ||
| echo "ibase=16; $HEX_NUM" | bc | ||
| } | ||
|
|
||
| addKeyForCelestiaAccount() { | ||
| # add key for the celestia dev account using the mnemonic | ||
| echo "Adding key for the celestia dev account..." | ||
| echo "$celestia_dev_account_mnemonic" | celestia-appd keys add \ | ||
| "$celestia_dev_account_key_name" \ | ||
| --home "$home_dir" \ | ||
| --keyring-backend="$keyring_backend" \ | ||
| --recover | ||
| } | ||
|
|
||
| performIBCTransfer() { | ||
| # perform ibc transfer | ||
| echo "Performing IBC transfer..." | ||
| celestia-appd tx ibc-transfer transfer \ | ||
| transfer \ | ||
| channel-0 \ | ||
| "$bridge_account_address_bech32" \ | ||
| 53000utia \ | ||
| --memo="{\"rollupAddress\":\"$evm_to_address\"}" \ | ||
| --chain-id="$celestia_chain_id" \ | ||
| --node="$celestia_node_url" \ | ||
| --from="$celestia_dev_account_address" \ | ||
| --fees=26000utia \ | ||
| --yes \ | ||
| --log_level=debug \ | ||
| --home "$home_dir" \ | ||
| --keyring-backend="$keyring_backend" | ||
| } | ||
|
|
||
| initial_balance=$(get_evm_balance) | ||
|
|
||
| addKeyForCelestiaAccount | ||
| performIBCTransfer | ||
|
|
||
| # FIXME - should probably poll w/ timeout instead of sleeping? | ||
| sleep 30 | ||
|
|
||
| final_balance=$(get_evm_balance) | ||
| expected_balance=$(echo "$initial_balance + 53000000000000000" | bc) | ||
| if [ "$(echo "$final_balance == $expected_balance" | bc)" -eq 0 ]; then | ||
| echo "IBC Transfer failed!" | ||
| echo "Expected balance $expected_balance, got $final_balance" | ||
| exit 1 | ||
| else | ||
| echo "IBC Transfer successful!" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| {{/* | ||
| Namespace to deploy elements into. | ||
| */}} | ||
| {{- define "bridge-test.namespace" -}} | ||
| {{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create a default fully qualified app name. | ||
| We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
| */}} | ||
| {{- define "bridge-test.fullname" -}} | ||
| {{- if .Values.fullnameOverride -}} | ||
| {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
| {{- else -}} | ||
| {{- $name := default .Chart.Name .Values.nameOverride -}} | ||
| {{- if contains $name .Release.Name -}} | ||
| {{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
| {{- else -}} | ||
| {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
| {{- end -}} | ||
| {{- end -}} | ||
| {{- end -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: bridge-test-env | ||
| namespace: {{ include "bridge-test.namespace" . }} | ||
| data: | ||
| home_dir: "/home/celestia" | ||
| keyring_backend: "test" | ||
| bridge_account_address: "{{ .Values.bridgeAccount.address }}" | ||
| bridge_account_address_bech32: "{{ .Values.bridgeAccount.bech32 }}" | ||
| evm_to_address: "{{ .Values.evmToAddress }}" | ||
| evm_url: "{{ .Values.evmURL }}" | ||
| celestia_chain_id: "{{ .Values.celestiaChainID }}" | ||
| celestia_node_url: "{{ .Values.celestiaNodeURL }}" | ||
| celestia_dev_account_address: "{{ .Values.celestiaDevAccount.address }}" | ||
| celestia_dev_account_mnemonic: "{{ .Values.celestiaDevAccount.mnemonic }}" | ||
| celestia_dev_account_key_name: "{{ .Values.celestiaDevAccount.name }}" | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: bridge-test-scripts | ||
| namespace: {{ include "bridge-test.namespace" . }} | ||
| data: | ||
| test-ibc-transfer.sh: | | ||
| {{- .Files.Get "files/scripts/test-ibc-transfer.sh" | nindent 4 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: {{ include "bridge-test.fullname" . }} | ||
| labels: | ||
| app: astria-dev-cluster | ||
| namespace: {{ include "bridge-test.namespace" . }} | ||
| spec: | ||
| template: | ||
| metadata: | ||
| name: {{ include "bridge-test.fullname" . }} | ||
| labels: | ||
| app: astria-dev-cluster | ||
| spec: | ||
| initContainers: | ||
| - name: init-bridge-account | ||
| image: {{ .Values.bridgeTesterUtilityImage }} | ||
| command: [ "astria-go", "sequencer", "bridge", "init", {{ .Values.evmRollupName }} ] | ||
| args: | ||
| - --privkey={{ .Values.bridgeAccount.privkey }} | ||
| - --sequencer-chain-id={{ .Values.sequencerChainId }} | ||
| - --sequencer-url={{ .Values.sequencerURL }} | ||
| - --asset={{ .Values.asset }} | ||
| - --fee-asset={{ .Values.feeAsset }} | ||
| - --log-level=debug | ||
| containers: | ||
| - name: test-ibc-transfer | ||
| image: {{ .Values.bridgeTesterUtilityImage }} | ||
| command: [ "/scripts/test-ibc-transfer.sh" ] | ||
| volumeMounts: | ||
| - mountPath: /scripts/ | ||
| name: bridge-test-scripts-volume | ||
| envFrom: | ||
| - configMapRef: | ||
| name: bridge-test-env | ||
| volumes: | ||
| - name: bridge-test-scripts-volume | ||
| configMap: | ||
| name: bridge-test-scripts | ||
| defaultMode: 0777 | ||
| restartPolicy: Never |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| replicaCount: 1 | ||
|
|
||
| # this image is overridden in ci/cd with the image built in ci/cd | ||
| bridgeTesterUtilityImage: ghcr.io/astriaorg/bridge-tester-utility:local | ||
|
|
||
| imagePullSecrets: [] | ||
| nameOverride: "" | ||
| namespaceOverride: "" | ||
| fullnameOverride: "" | ||
|
|
||
| # must match rollup name used in evm rollup chart values | ||
| evmRollupName: "astria" | ||
| # this is a shared dev address | ||
| evmToAddress: "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" | ||
| # evm execution api url | ||
| evmURL: "http://astria-evm-service.astria-dev-cluster.svc.cluster.local:8545" | ||
|
|
||
| sequencerURL: "http://node0-sequencer-rpc-service.astria-dev-cluster.svc.cluster.local:26657" | ||
| # must match chain id used in sequencer chart values | ||
| sequencerChainId: "sequencer-test-chain-0" | ||
| asset: "transfer/channel-0/utia" | ||
| feeAsset: "nria" | ||
|
|
||
| # sequencer bridge account. is funded during sequencer genesis. | ||
| bridgeAccount: | ||
| address: "6f85297e587b61b37695a1ac17189b3e907e318e" | ||
| bech32: "astria1d7zjjljc0dsmxa545xkpwxym86g8uvvwhtezcr" | ||
| privkey: "6015fbe1c365d3c5ef92dc891db8c5bb26ad454bec2db4762b96e9f8b2430285" | ||
| pubkey: "b78aa61c65f21e5fe0f31d221819053fa2286dd6eff83fc490e3ee746f144626" | ||
|
|
||
| celestiaChainID: "celestia-local-0" | ||
| celestiaNodeURL: "http://celestia-app-service.astria-dev-cluster.svc.cluster.local:26657" | ||
|
|
||
| # this account should be funded during celestia genesis | ||
| celestiaDevAccount: | ||
| name: "dev-account" | ||
| address: "celestia1m0ksdjl2p5nzhqy3p47fksv52at3ln885xvl96" | ||
| mnemonic: "enrich avocado local net will avoid dizzy truth column excuse ready lesson" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe update to a generic structure here in values that is array of accounts with object fields name, mnemonic, value, staked_value? This would allow customizing the chart to generically generate genesis setup with any number of accounts.