From d29ee41268b6a75176847c0d2b951631690b2713 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Sun, 4 Aug 2024 16:19:43 +0000 Subject: [PATCH] Changes from astriaorg/astria@48404841f47f1dad3c746aa8878714acb3fa006a --- .../{deployment.yaml => statefulsets.yaml} | 2 +- charts/deploy.just | 3 +- charts/ibc-test.just | 31 ++++++------------- 3 files changed, 11 insertions(+), 25 deletions(-) rename charts/celestia-local/templates/{deployment.yaml => statefulsets.yaml} (99%) diff --git a/charts/celestia-local/templates/deployment.yaml b/charts/celestia-local/templates/statefulsets.yaml similarity index 99% rename from charts/celestia-local/templates/deployment.yaml rename to charts/celestia-local/templates/statefulsets.yaml index 42fb310..4112906 100644 --- a/charts/celestia-local/templates/deployment.yaml +++ b/charts/celestia-local/templates/statefulsets.yaml @@ -1,5 +1,5 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: celestia-local labels: diff --git a/charts/deploy.just b/charts/deploy.just index 6ce3cb5..785b690 100644 --- a/charts/deploy.just +++ b/charts/deploy.just @@ -93,7 +93,7 @@ delete-sequencer name=validatorName: delete-sequencers: (delete-sequencer "node0") (delete-sequencer "node1") (delete-sequencer "node2") wait-for-sequencer: - kubectl wait -n astria-dev-cluster deployment celestia-local --for=condition=Available=True --timeout=600s + kubectl rollout status --watch statefulset/celestia-local -n astria-dev-cluster --timeout=600s kubectl rollout status --watch statefulset/sequencer -n astria-dev-cluster --timeout=600s deploy-rollup: deploy-dev-rollup wait-for-rollup @@ -238,7 +238,6 @@ init-ibc-bridge privateKey asset feeAsset rollupName=defaultRollupName: --fee-asset {{ feeAsset }} \ --asset {{ asset }} - eth_rpc_url := "http://executor.astria.localdev.me/" eth_ws_url := "ws://ws-executor.astria.localdev.me/" bridge_tx_bytes := "0xf8f280843c54e7f182898594a58639fb5458e65e4fa917ff951c390292c24a15880de0b6b3a7640000b884bab916d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002d617374726961313777306164656736346b7930646178776432756779756e65656c6c6d6a676e786c333935303400000000000000000000000000000000000000820a96a086b85348c9816f6d34533669db3d3626cf55eecea6a380d4d072efb1839df443a04b8b60c8b91dd30add1ca4a96097238d73bab29b0a958322d9a51755d5a5f287" diff --git a/charts/ibc-test.just b/charts/ibc-test.just index 6561918..94bc98d 100644 --- a/charts/ibc-test.just +++ b/charts/ibc-test.just @@ -32,7 +32,7 @@ delete: kubectl wait -n astria-dev-cluster deployment hermes-local-chart --for=condition=Available=True --timeout=300s [no-cd] -run celestiaHome pathToCelestiaAppd=default_celestia_appd : +run: #!/usr/bin/env bash initial_balance=$(just evm-get-balance {{evm_destination_address}}) @@ -40,11 +40,8 @@ run celestiaHome pathToCelestiaAppd=default_celestia_appd : # Create a bridge account on the sequencer just init-ibc-bridge {{ sequencer_tia_bridge_pkey }} transfer/channel-0/utia nria - # Load the private key of the Celestia dev account to issue transfers - just ibc-test _load-celestia-key "{{ celestiaHome}}" "{{ pathToCelestiaAppd }}" - # Execute the transfer from Celestia to the Rollup - just ibc-test _do-ibc-transfer "{{ celestiaHome}}" "{{ pathToCelestiaAppd }}" + just ibc-test _do-ibc-transfer # Multiplication factor is 10^-6 (utia to tia) * 10^18 (rollup factor) = 10^12 let expected_balance="$initial_balance + {{ transfer_amount }} * 10**12" @@ -68,8 +65,6 @@ run celestiaHome pathToCelestiaAppd=default_celestia_appd : bridge_address := "astria1d7zjjljc0dsmxa545xkpwxym86g8uvvwhtezcr" celestia_dev_account_address := "celestia1m0ksdjl2p5nzhqy3p47fksv52at3ln885xvl96" -celestia_dev_account_key_name := "dev" -celestia_dev_account_mnemonic := "enrich avocado local net will avoid dizzy truth column excuse ready lesson" celestia_chain_id := "celestia-local-0" celestia_node_url := "http://rpc.app.celestia.localdev.me:80" sequencer_tia_bridge_pkey := "6015fbe1c365d3c5ef92dc891db8c5bb26ad454bec2db4762b96e9f8b2430285" @@ -82,30 +77,22 @@ evm_destination_address := "0xaC21B97d35Bf75A7dAb16f35b111a50e78A72F30" transfer_amount := "53000" transfer_fees := "26000" -default_celestia_appd := "celestia-appd" -[no-cd] -_load-celestia-key celestiaHome pathToCelestiaAppd=default_celestia_appd: - #!/usr/bin/env bash - pwd - "{{pathToCelestiaAppd}}" keys add {{ celestia_dev_account_key_name }} \ - --home "{{celestiaHome}}" \ - --keyring-backend="{{ keyring_backend }}" \ - --recover <<< "{{ celestia_dev_account_mnemonic }}" - +# TODO: move this to deploy.just so that defaultNamespace need not be redefined +defaultNamespace := "astria-dev-cluster" [no-cd] -_do-ibc-transfer celestiaHome pathToCelestiaAppd=default_celestia_appd: +_do-ibc-transfer namespace=defaultNamespace: echo "Performing IBC transfer..." - "{{pathToCelestiaAppd}}" tx ibc-transfer transfer \ + kubectl exec -n {{ namespace }} pods/celestia-local-0 celestia-app -- /bin/bash -c \ + 'celestia-appd tx ibc-transfer transfer \ transfer \ channel-0 \ {{ bridge_address }} \ "{{ transfer_amount }}utia" \ --memo="{\"rollupDepositAddress\":\"{{ evm_destination_address }}\"}" \ --chain-id="{{ celestia_chain_id }}" \ - --node="{{ celestia_node_url }}" \ --from="{{ celestia_dev_account_address }}" \ --fees="{{ transfer_fees }}utia" \ --yes \ --log_level=debug \ - --home "{{celestiaHome}}" \ - --keyring-backend="{{ keyring_backend }}" + --home /home/celestia \ + --keyring-backend="{{ keyring_backend }}"'