Skip to content

Commit

Permalink
Merge branch 'main' into refactor/output-privkey-to-file
Browse files Browse the repository at this point in the history
  • Loading branch information
Halimao authored Jul 27, 2024
2 parents 5e4ddf9 + c19812d commit ba5e536
Show file tree
Hide file tree
Showing 140 changed files with 4,084 additions and 2,464 deletions.
35 changes: 34 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
- "**-v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "**-v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "**-v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

pull_request:
types:
- opened
Expand Down Expand Up @@ -179,6 +179,39 @@ jobs:
timeout-minutes: 3
run: just run-smoke-cli

ibc-bridge-test:
needs: [ run_checker, composer, conductor, sequencer, sequencer-relayer ]
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: Install astria cli (rust)
run: just install-cli
- name: Fetch and install celestia-appd
run: just get-celestia-appd v1.9.0 Linux x86_64
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Setup IBC Bridge Test Environment
timeout-minutes: 5
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 ibc-test deploy $TAG
- name: Run IBC ICS20 Transfer test
timeout-minutes: 3
run: just ibc-test run ./celestia ./celestia-appd

docker:
if: ${{ always() && !cancelled() }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
with:
python-version: '3.9'
check-latest: true
- name: Setup helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add blockscout https://blockscout.github.io/helm-charts
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/reusable-run-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ jobs:
with:
list-files: json
filters: |
charts: &charts
- 'charts/**'
smoke_tests: &smoke_tests
- 'dev/**'
- *charts
release_workflow:
- '.github/workflows/release.yml'
- '.github/workflows/reusable-cargo-version.yml'
Expand All @@ -74,6 +79,7 @@ jobs:
- 'containerfiles/**'
- '.dockerignore'
- 'Cargo.lock'
- *smoke_tests
lint_workflow:
- '.github/workflows/lint.yml'
crates:
Expand All @@ -95,7 +101,5 @@ jobs:
- '**/*.md'
rustfmt:
- 'rustfmt.toml'
charts:
- 'charts/**'
lockfile:
- 'Cargo.lock'
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ target/

# We don't want to commit the dependency directory of charts
charts/*/charts

crates/astria-bridge-withdrawer/src/withdrawer/ethereum/generated/
35 changes: 24 additions & 11 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ to `local`. You can now deploy the chart with your local image.

### Dev vs Prod

All of our charts should run against both the lastest code in monorepo AND
All of our charts should run against both the latest code in monorepo AND
against the latest release. Sometimes, there are configuration changes between
releases though. To manage this in various templates you will see the following
pattern (especially in config maps and genesis files):
Expand Down Expand Up @@ -183,8 +183,8 @@ To deploy and run this:
## Examining Deployments

[k9s](https://k9scli.io/) is a useful utility for inspecting deployed
containers, logs and services. Additionally you may interact directly with the
kubernetes API some helpful commands below.
containers, logs and services. Additionally, you may interact directly with the
kubernetes API using some helpful commands below.

### Helpful commands

Expand Down
2 changes: 1 addition & 1 deletion charts/celestia-local/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: 0.4.0
version: 0.5.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
Expand Down
24 changes: 24 additions & 0 deletions charts/celestia-local/files/scripts/init-celestia-appd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@ celestia-appd gentx \
--chain-id "$chainid" \
--home "$home_dir"

# add ibc account
echo "$ibc_account_mnemonic" | celestia-appd keys add \
"$ibc_account_key_name" \
--home "$home_dir" \
--keyring-backend="$keyring_backend" \
--recover
ibc_account_key=$(celestia-appd keys show "$ibc_account_key_name" -a --keyring-backend="$keyring_backend" --home "$home_dir")
celestia-appd add-genesis-account \
"$ibc_account_key" \
--home "$home_dir" \
"$coins"

# add account used for development and testing
echo "$dev_account_mnemonic" | celestia-appd keys add \
"$dev_account_key_name" \
--home "$home_dir" \
--keyring-backend="$keyring_backend" \
--recover
dev_account_key=$(celestia-appd keys show "$dev_account_key_name" -a --keyring-backend="$keyring_backend" --home "$home_dir")
celestia-appd add-genesis-account \
"$dev_account_key" \
--home "$home_dir" \
"$coins"

celestia-appd collect-gentxs --home "$home_dir"

# Enable transaction indexing
Expand Down
1 change: 1 addition & 0 deletions charts/celestia-local/files/scripts/start-celestia-appd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ exec celestia-appd start --home "${home_dir}" \
--grpc.address "0.0.0.0:$celestia_app_grpc_port" \
--rpc.laddr "tcp://0.0.0.0:$celestia_app_host_port" \
--api.enable \
--api.enabled-unsafe-cors \
--grpc.enable \
--grpc-web.enable
4 changes: 4 additions & 0 deletions charts/celestia-local/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ data:
bridge_rpc_port: "{{ .Values.ports.bridgeRPC }}"
celestia_app_host_port: "{{ .Values.ports.celestiaAppHostPort }}"
celestia_app_grpc_port: "{{ .Values.ports.celestiaAppGrpcPort }}"
ibc_account_mnemonic: "{{ .Values.ibcAccountMnemonic }}"
ibc_account_key_name: "{{ .Values.ibcAccountKeyName }}"
dev_account_mnemonic: "{{ .Values.devAccountMnemonic }}"
dev_account_key_name: "{{ .Values.devAccountName }}"
---
apiVersion: v1
kind: ConfigMap
Expand Down
2 changes: 2 additions & 0 deletions charts/celestia-local/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ spec:
name: app-rpc
- containerPort: {{ .Values.ports.celestiaAppGrpcPort }}
name: app-grpc
- containerPort: {{ .Values.ports.celestiaAppRestPort }}
name: app-rest
- name: celestia-bridge
command: [ "/scripts/start-bridge.sh" ]
image: {{ .Values.celestiaNodeImage }}
Expand Down
13 changes: 13 additions & 0 deletions charts/celestia-local/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
labels:
app: celestia-local-network
annotations:
nginx.ingress.kubernetes.io/enable-cors: "true"
# allow requests from bridge web app
nginx.ingress.kubernetes.io/cors-allow-origin: "http://localhost:3000"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
spec:
Expand Down Expand Up @@ -51,3 +54,13 @@ spec:
name: celestia-app-service
port:
name: app-rpc
- host: rest.app.celestia.localdev.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: celestia-app-service
port:
name: app-rest
3 changes: 3 additions & 0 deletions charts/celestia-local/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ spec:
- name: app-grpc
port: {{ .Values.ports.celestiaAppGrpcPort }}
targetPort: app-grpc
- name: app-rest
port: {{ .Values.ports.celestiaAppRestPort }}
targetPort: app-rest
11 changes: 10 additions & 1 deletion charts/celestia-local/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ storage:
persistentVolumeName: "celestia-shared-storage"
path: "/data/celestia-data"

celestiaAppImage: "ghcr.io/celestiaorg/celestia-app:v1.8.0"
celestiaAppImage: "ghcr.io/celestiaorg/celestia-app:v1.9.0"
celestiaNodeImage: "ghcr.io/celestiaorg/celestia-node:v0.13.4"

podSecurityContext:
Expand All @@ -37,10 +37,19 @@ validatorMnemonic: connect soon random stable toddler tired glove drastic comfor
coins: "10000000000000000000000000utia"
# Staking amount
validatorStake: "5000000000utia"
# ibc account
ibcAccountKeyName: "ibc-account"
# mnemonic for ibc account, so we can add its key and get them funded during genesis
ibcAccountMnemonic: globe elegant people render embark whisper pumpkin local thing shallow front surround domain wave drill peasant duck midnight call slight ball segment token will
# a dev account to aid in development and testing. can use mnemonic to import into Keplr
# address celestia1m0ksdjl2p5nzhqy3p47fksv52at3ln885xvl96
devAccountName: "dev-account"
devAccountMnemonic: enrich avocado local net will avoid dizzy truth column excuse ready lesson

# Default service ports
ports:
celestiaAppHostPort: 26657
celestiaAppGrpcPort: 9090
celestiaAppRestPort: 1317
bridgeRPC: 26658
bridgeHTTP: 26659
32 changes: 32 additions & 0 deletions charts/composer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: v2
name: composer
description: Astria composer helm chart

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"

maintainers:
- name: wafflesvonmaple
url: astria.org
- name: quasystaty1
url: astria.org
- name: joroshiba
url: astria.org
Loading

0 comments on commit ba5e536

Please sign in to comment.