From b90dcc2a7fbfe1d65ca5b9b9042587bfc22a6c78 Mon Sep 17 00:00:00 2001 From: Dante Sanchez Date: Sun, 21 Apr 2024 22:22:11 -0400 Subject: [PATCH] enable all tests --- .../upgrade-gaia-v16-fresh-state.yml | 4935 ++++++++--------- tests/gaia-v16/test_ibc_fee.sh | 6 +- 2 files changed, 2470 insertions(+), 2471 deletions(-) diff --git a/.github/workflows/upgrade-gaia-v16-fresh-state.yml b/.github/workflows/upgrade-gaia-v16-fresh-state.yml index c85d0163..fbb1f06d 100644 --- a/.github/workflows/upgrade-gaia-v16-fresh-state.yml +++ b/.github/workflows/upgrade-gaia-v16-fresh-state.yml @@ -238,693 +238,198 @@ echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT outputs: upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }} - - # v16-1-vesting-liquid-staking: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # VESTING_AMOUNT: 110000000 - # VESTING_DELEGATED_AMOUNT: 100000000 - # VESTING_WALLET: cosmos1jf7j9nvjmnflal5ehaj25p7nsk2t3lkd3tj7zp - # VESTING_MNEMONIC: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon trouble" - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Set up vesting account - # run: | - # echo "Adding key..." - # echo "$VESTING_MNEMONIC" | $CHAIN_BINARY keys add vesting --home $HOME_1 --recover - - # echo "Creating vesting wallet..." - # start_time=$(date +%s) - # echo "start time: $start_time" - # end_time=$(date -d '10 minutes' +%s) - # echo "end time: $end_time" - # $CHAIN_BINARY tx vesting create-vesting-account \ - # $VESTING_WALLET $VESTING_AMOUNT$DENOM $end_time \ - # --from $WALLET_1 --home $HOME_1 \ - # --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep $COMMIT_TIMEOUT - # sleep $COMMIT_TIMEOUT - - # echo "Saving vesting times..." - # duration=$(echo "$end_time - $start_time" | bc -l) - # echo "duration: $duration" - # echo "vesting_start_time=$start_time" >> $GITHUB_ENV - # echo "vesting_end_time=$end_time" >> $GITHUB_ENV - # echo "vesting_duration=$duration" >> $GITHUB_ENV - - # - name: Set up bonding - # run: | - # $CHAIN_BINARY tx staking validator-bond $VALOPER_1 --from $WALLET_1 --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - - # - name: Delegate with vesting wallet - # run: | - # $CHAIN_BINARY q bank spendable-balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' - # echo "Delegating from vesting wallet..." - # $CHAIN_BINARY tx staking delegate $VALOPER_1 $VESTING_DELEGATED_AMOUNT$DENOM \ - # --from $VESTING_WALLET --home $HOME_1 \ - # --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep $COMMIT_TIMEOUT - # sleep $COMMIT_TIMEOUT - - # - name: Tokenize with vesting wallet - # run: | - # $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' - - # echo "vesting_start_time = $vesting_start_time" - # echo "vesting_end_time = $vesting_end_time" - # echo "vesting_duration = $vesting_duration" - - # echo "Calculating vested delegation..." - # current_epoch=$(date +%s) - # echo "epoch: $current_epoch" - # elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) - # echo "elapsed_time: $elapsed_time" - # vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) - # echo "vested ratio: $vested_ratio" - # vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) - # echo "vested amount: $vested_amount" - - # # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') - # echo "txhash: $txhash" - # sleep $COMMIT_TIMEOUT - # $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' - - # liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') - # echo "liquid tokens: $liquid_tokens" - # if [[ "$liquid_tokens" -gt "0" ]]; then - # echo "FAIL: Greater than zero amount in liquid tokens balance." - # exit 0 - # else - # echo "PASS: No liquid tokens balance." - # fi - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 3 - - # - name: Tokenize with vesting wallet - # run: | - # $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' - - # echo "vesting_start_time = $vesting_start_time" - # echo "vesting_end_time = $vesting_end_time" - # echo "vesting_duration = $vesting_duration" - - # echo "Calculating vested delegation..." - # current_epoch=$(date +%s) - # echo "epoch: $current_epoch" - # elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) - # echo "elapsed_time: $elapsed_time" - # vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) - # echo "vested ratio: $vested_ratio" - # vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) - # echo "vested amount: $vested_amount" - - # # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') - # echo "txhash: $txhash" - - # sleep $COMMIT_TIMEOUT - # $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1")' - # liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') - # echo "liquid tokens: $liquid_tokens" - # if [[ "$liquid_tokens" -gt "0" ]]; then - # echo "PASS: Greater than zero amount in liquid tokens balance." - # else - # echo "FAIL: No liquid tokens balance." - # exit 0 - # fi - - # v16-2-IBC-rate-limit: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # CHAIN_BINARY_SECONDARY: gaiad-ibc - # COMMIT_TIMEOUT: 1 - # RELAYER: hermes - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Set up relayer - # run: scripts/gaia-v16/setup_relayer_rate_limit.sh - - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain_single_val.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Installing secondary chain binaries - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # echo "Chain binary URL: $CHAIN_BINARY_URL" - # echo "Installing secondary chain binary..." - # wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q - # chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY - # - name: Start osmosis-1 chain - # env: - # CHAIN_SERVICE: osmosis.service - # CHAIN_HOME: /home/runner/.osmosis - # CHAIN_ID: osmosis-1 - # API_PORT: 25011 - # GRPC_PORT: 26011 - # RPC_PORT: 27011 - # P2P_PORT: 28011 - # PPROF_PORT: 29011 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate osmosis-1 channels - # env: - # TARGET_CHAIN_ID: osmosis-1 - # CLIENT_COUNT: 0 - # CHANNEL_START: 0 - # CHANNEL_END: 141 - # TRANSFER_CHANNEL: channel-141 - # RPC_PORT: 27011 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start core-1 chain - # env: - # CHAIN_SERVICE: core.service - # CHAIN_HOME: /home/runner/.core - # CHAIN_ID: core-1 - # API_PORT: 25021 - # GRPC_PORT: 26021 - # RPC_PORT: 27021 - # P2P_PORT: 28021 - # PPROF_PORT: 29021 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate core-1 channels - # env: - # TARGET_CHAIN_ID: core-1 - # CLIENT_COUNT: 1 - # CHANNEL_START: 142 - # CHANNEL_END: 190 - # TRANSFER_CHANNEL: channel-190 - # RPC_PORT: 27021 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start injective-1 chain - # env: - # CHAIN_SERVICE: injective.service - # CHAIN_HOME: /home/runner/.injective - # CHAIN_ID: injective-1 - # API_PORT: 25031 - # GRPC_PORT: 26031 - # RPC_PORT: 27031 - # P2P_PORT: 28031 - # PPROF_PORT: 29031 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate injective-1 channels - # env: - # TARGET_CHAIN_ID: injective-1 - # CLIENT_COUNT: 2 - # CHANNEL_START: 191 - # CHANNEL_END: 220 - # TRANSFER_CHANNEL: channel-220 - # RPC_PORT: 27031 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start secret-4 chain - # env: - # CHAIN_SERVICE: secret.service - # CHAIN_HOME: /home/runner/.secret - # CHAIN_ID: secret-4 - # API_PORT: 25041 - # GRPC_PORT: 26041 - # RPC_PORT: 27041 - # P2P_PORT: 28041 - # PPROF_PORT: 29041 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate secret-4 channels - # env: - # TARGET_CHAIN_ID: secret-4 - # CLIENT_COUNT: 3 - # CHANNEL_START: 221 - # CHANNEL_END: 235 - # TRANSFER_CHANNEL: channel-235 - # RPC_PORT: 27041 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start kaiyo-1 chain - # env: - # CHAIN_SERVICE: kaiyo.service - # CHAIN_HOME: /home/runner/.kaiyo - # CHAIN_ID: kaiyo-1 - # API_PORT: 25051 - # GRPC_PORT: 26051 - # RPC_PORT: 27051 - # P2P_PORT: 28051 - # PPROF_PORT: 29051 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate kaiyo-1 channels - # env: - # TARGET_CHAIN_ID: kaiyo-1 - # CLIENT_COUNT: 4 - # CHANNEL_START: 236 - # CHANNEL_END: 343 - # TRANSFER_CHANNEL: channel-343 - # RPC_PORT: 27051 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start stride-1 chain - # env: - # CHAIN_SERVICE: stride.service - # CHAIN_HOME: /home/runner/.stride - # CHAIN_ID: stride-1 - # API_PORT: 25061 - # GRPC_PORT: 26061 - # RPC_PORT: 27061 - # P2P_PORT: 28061 - # PPROF_PORT: 29061 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate stride-1 channels - # env: - # TARGET_CHAIN_ID: stride-1 - # CLIENT_COUNT: 5 - # CHANNEL_START: 344 - # CHANNEL_END: 391 - # TRANSFER_CHANNEL: channel-391 - # RPC_PORT: 27061 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Start neutron-1 chain - # env: - # CHAIN_SERVICE: neutron.service - # CHAIN_HOME: /home/runner/.neutron - # CHAIN_ID: neutron-1 - # API_PORT: 25071 - # GRPC_PORT: 26071 - # RPC_PORT: 27071 - # P2P_PORT: 28071 - # PPROF_PORT: 29071 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate neutron-1 channels - # env: - # TARGET_CHAIN_ID: neutron-1 - # CLIENT_COUNT: 6 - # CHANNEL_START: 392 - # CHANNEL_END: 569 - # TRANSFER_CHANNEL: channel-569 - # RPC_PORT: 27071 - # run: | - # scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 10 - # $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Restart relayer - # run: | - # sudo systemctl restart $RELAYER - # sleep 1m - - # - name: _Test IBC rate limits - osmosis-1 - # env: - # TRANSFER_CHANNEL: channel-141 - # RATE: 0.05 - # RPC_PORT: 27011 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - - # - name: _Test IBC rate limits - core-1 - # env: - # TRANSFER_CHANNEL: channel-190 - # RATE: 0.01 - # RPC_PORT: 27021 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: _Test IBC rate limits - injective-1 - # env: - # TRANSFER_CHANNEL: channel-220 - # RATE: 0.01 - # RPC_PORT: 27031 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - - # - name: _Test IBC rate limits - secret-4 - # env: - # TRANSFER_CHANNEL: channel-235 - # RATE: 0.01 - # RPC_PORT: 27041 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - - # - name: _Test IBC rate limits - kaiyo-1 - # env: - # TRANSFER_CHANNEL: channel-343 - # RATE: 0.01 - # RPC_PORT: 27051 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: _Test IBC rate limits - stride-1 - # env: - # TRANSFER_CHANNEL: channel-391 - # RATE: 0.01 - # RPC_PORT: 27061 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - - # - name: _Test IBC rate limits - neutron-1 - # env: - # TRANSFER_CHANNEL: channel-569 - # RATE: 0.01 - # RPC_PORT: 27071 - # run: | - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y - # sleep 3 - # tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - - # v16-3-ICA-controller: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # CHAIN_BINARY_SECONDARY: gaiad-ibc - # COMMIT_TIMEOUT: 1 - # RELAYER: hermes - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Set up relayer - # run: scripts/gaia-v16/setup_relayer_ica_controller.sh - - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain_single_val.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Installing secondary chain binaries - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # echo "Chain binary URL: $CHAIN_BINARY_URL" - # echo "Installing secondary chain binary..." - # wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q - # chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY - # - name: Start host chain - # env: - # CHAIN_SERVICE: host.service - # CHAIN_HOME: /home/runner/.host - # CHAIN_ID: host - # API_PORT: 25011 - # GRPC_PORT: 26011 - # RPC_PORT: 27011 - # P2P_PORT: 28011 - # PPROF_PORT: 29011 - # run: | - # scripts/start_chain_secondary.sh - # - name: Generate host connection - # env: - # TARGET_CHAIN_ID: host - # CLIENT_COUNT: 0 - # RPC_PORT: 27011 - # run: | - # scripts/gaia-v16/setup_connection_ica_controller.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Restart relayer - # run: | - # sudo systemctl restart $RELAYER - # sleep 1m - - # - name: _Test ICA controller - # env: - # CONTROLLER_HOME: /home/runner/.val1 - # HOST_HOME: /home/runner/.host - # run: | - # tests/gaia-v16/test_ica_controller.sh + v16-1-vesting-liquid-staking: + runs-on: ubuntu-22.04 + needs: set-version-matrix + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + VESTING_AMOUNT: 110000000 + VESTING_DELEGATED_AMOUNT: 100000000 + VESTING_WALLET: cosmos1jf7j9nvjmnflal5ehaj25p7nsk2t3lkd3tj7zp + VESTING_MNEMONIC: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon trouble" + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Set up vesting account + run: | + echo "Adding key..." + echo "$VESTING_MNEMONIC" | $CHAIN_BINARY keys add vesting --home $HOME_1 --recover + + echo "Creating vesting wallet..." + start_time=$(date +%s) + echo "start time: $start_time" + end_time=$(date -d '10 minutes' +%s) + echo "end time: $end_time" + $CHAIN_BINARY tx vesting create-vesting-account \ + $VESTING_WALLET $VESTING_AMOUNT$DENOM $end_time \ + --from $WALLET_1 --home $HOME_1 \ + --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep $COMMIT_TIMEOUT + sleep $COMMIT_TIMEOUT + + echo "Saving vesting times..." + duration=$(echo "$end_time - $start_time" | bc -l) + echo "duration: $duration" + echo "vesting_start_time=$start_time" >> $GITHUB_ENV + echo "vesting_end_time=$end_time" >> $GITHUB_ENV + echo "vesting_duration=$duration" >> $GITHUB_ENV + + - name: Set up bonding + run: | + $CHAIN_BINARY tx staking validator-bond $VALOPER_1 --from $WALLET_1 --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + + - name: Delegate with vesting wallet + run: | + $CHAIN_BINARY q bank spendable-balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' + echo "Delegating from vesting wallet..." + $CHAIN_BINARY tx staking delegate $VALOPER_1 $VESTING_DELEGATED_AMOUNT$DENOM \ + --from $VESTING_WALLET --home $HOME_1 \ + --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep $COMMIT_TIMEOUT + sleep $COMMIT_TIMEOUT + + - name: Tokenize with vesting wallet + run: | + $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' + + echo "vesting_start_time = $vesting_start_time" + echo "vesting_end_time = $vesting_end_time" + echo "vesting_duration = $vesting_duration" + + echo "Calculating vested delegation..." + current_epoch=$(date +%s) + echo "epoch: $current_epoch" + elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) + echo "elapsed_time: $elapsed_time" + vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) + echo "vested ratio: $vested_ratio" + vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) + echo "vested amount: $vested_amount" + + # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') + echo "txhash: $txhash" + sleep $COMMIT_TIMEOUT + $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' + + liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') + echo "liquid tokens: $liquid_tokens" + if [[ "$liquid_tokens" -gt "0" ]]; then + echo "FAIL: Greater than zero amount in liquid tokens balance." + exit 0 + else + echo "PASS: No liquid tokens balance." + fi + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 3 + + - name: Tokenize with vesting wallet + run: | + $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' + + echo "vesting_start_time = $vesting_start_time" + echo "vesting_end_time = $vesting_end_time" + echo "vesting_duration = $vesting_duration" + + echo "Calculating vested delegation..." + current_epoch=$(date +%s) + echo "epoch: $current_epoch" + elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) + echo "elapsed_time: $elapsed_time" + vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) + echo "vested ratio: $vested_ratio" + vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) + echo "vested amount: $vested_amount" + + # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') + echo "txhash: $txhash" + + sleep $COMMIT_TIMEOUT + $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1")' + liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') + echo "liquid tokens: $liquid_tokens" + if [[ "$liquid_tokens" -gt "0" ]]; then + echo "PASS: Greater than zero amount in liquid tokens balance." + else + echo "FAIL: No liquid tokens balance." + exit 0 + fi - v16-4-IBC-fee-middleware: + v16-2-IBC-rate-limit: runs-on: ubuntu-22.04 needs: set-version-matrix strategy: @@ -979,12 +484,11 @@ echo "COSMOVISOR=true" >> $GITHUB_ENV echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - name: Set up relayer - run: scripts/gaia-v16/setup_relayer_ibc_fee.sh + run: scripts/gaia-v16/setup_relayer_rate_limit.sh - name: Start chain env: START_VERSION: ${{matrix.gaia_version}} - GAS_PRICE: 0 run: | export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 scripts/start_chain_single_val.sh @@ -1000,31 +504,191 @@ START_VERSION: ${{matrix.gaia_version}} run: | export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - export DOWNLOAD_URL=https://github.com/cosmos/gaia/releases/download/v16.0.0-rc0/gaiad-v16.0.0-rc0-linux-amd64 echo "Chain binary URL: $CHAIN_BINARY_URL" echo "Installing secondary chain binary..." - wget $DOWNLOAD_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q + wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY - - name: Start secondary chain + - name: Start osmosis-1 chain env: - CHAIN_SERVICE: two.service - CHAIN_HOME: /home/runner/.two - CHAIN_ID: two + CHAIN_SERVICE: osmosis.service + CHAIN_HOME: /home/runner/.osmosis + CHAIN_ID: osmosis-1 API_PORT: 25011 GRPC_PORT: 26011 RPC_PORT: 27011 P2P_PORT: 28011 PPROF_PORT: 29011 - GAS_PRICE: 0 run: | scripts/start_chain_secondary.sh - - name: Generate IBC connection + - name: Generate osmosis-1 channels env: - TARGET_CHAIN_ID: two + TARGET_CHAIN_ID: osmosis-1 CLIENT_COUNT: 0 + CHANNEL_START: 0 + CHANNEL_END: 141 + TRANSFER_CHANNEL: channel-141 RPC_PORT: 27011 run: | - scripts/gaia-v16/setup_connection_ica_controller.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start core-1 chain + env: + CHAIN_SERVICE: core.service + CHAIN_HOME: /home/runner/.core + CHAIN_ID: core-1 + API_PORT: 25021 + GRPC_PORT: 26021 + RPC_PORT: 27021 + P2P_PORT: 28021 + PPROF_PORT: 29021 + run: | + scripts/start_chain_secondary.sh + - name: Generate core-1 channels + env: + TARGET_CHAIN_ID: core-1 + CLIENT_COUNT: 1 + CHANNEL_START: 142 + CHANNEL_END: 190 + TRANSFER_CHANNEL: channel-190 + RPC_PORT: 27021 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start injective-1 chain + env: + CHAIN_SERVICE: injective.service + CHAIN_HOME: /home/runner/.injective + CHAIN_ID: injective-1 + API_PORT: 25031 + GRPC_PORT: 26031 + RPC_PORT: 27031 + P2P_PORT: 28031 + PPROF_PORT: 29031 + run: | + scripts/start_chain_secondary.sh + - name: Generate injective-1 channels + env: + TARGET_CHAIN_ID: injective-1 + CLIENT_COUNT: 2 + CHANNEL_START: 191 + CHANNEL_END: 220 + TRANSFER_CHANNEL: channel-220 + RPC_PORT: 27031 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start secret-4 chain + env: + CHAIN_SERVICE: secret.service + CHAIN_HOME: /home/runner/.secret + CHAIN_ID: secret-4 + API_PORT: 25041 + GRPC_PORT: 26041 + RPC_PORT: 27041 + P2P_PORT: 28041 + PPROF_PORT: 29041 + run: | + scripts/start_chain_secondary.sh + - name: Generate secret-4 channels + env: + TARGET_CHAIN_ID: secret-4 + CLIENT_COUNT: 3 + CHANNEL_START: 221 + CHANNEL_END: 235 + TRANSFER_CHANNEL: channel-235 + RPC_PORT: 27041 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start kaiyo-1 chain + env: + CHAIN_SERVICE: kaiyo.service + CHAIN_HOME: /home/runner/.kaiyo + CHAIN_ID: kaiyo-1 + API_PORT: 25051 + GRPC_PORT: 26051 + RPC_PORT: 27051 + P2P_PORT: 28051 + PPROF_PORT: 29051 + run: | + scripts/start_chain_secondary.sh + - name: Generate kaiyo-1 channels + env: + TARGET_CHAIN_ID: kaiyo-1 + CLIENT_COUNT: 4 + CHANNEL_START: 236 + CHANNEL_END: 343 + TRANSFER_CHANNEL: channel-343 + RPC_PORT: 27051 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start stride-1 chain + env: + CHAIN_SERVICE: stride.service + CHAIN_HOME: /home/runner/.stride + CHAIN_ID: stride-1 + API_PORT: 25061 + GRPC_PORT: 26061 + RPC_PORT: 27061 + P2P_PORT: 28061 + PPROF_PORT: 29061 + run: | + scripts/start_chain_secondary.sh + - name: Generate stride-1 channels + env: + TARGET_CHAIN_ID: stride-1 + CLIENT_COUNT: 5 + CHANNEL_START: 344 + CHANNEL_END: 391 + TRANSFER_CHANNEL: channel-391 + RPC_PORT: 27061 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT + + - name: Start neutron-1 chain + env: + CHAIN_SERVICE: neutron.service + CHAIN_HOME: /home/runner/.neutron + CHAIN_ID: neutron-1 + API_PORT: 25071 + GRPC_PORT: 26071 + RPC_PORT: 27071 + P2P_PORT: 28071 + PPROF_PORT: 29071 + run: | + scripts/start_chain_secondary.sh + - name: Generate neutron-1 channels + env: + TARGET_CHAIN_ID: neutron-1 + CLIENT_COUNT: 6 + CHANNEL_START: 392 + CHANNEL_END: 569 + TRANSFER_CHANNEL: channel-569 + RPC_PORT: 27071 + run: | + scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 10 + $CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT - name: Test software upgrade for published releases if: ${{ matrix.upgrade_version != 'main' }} @@ -1049,1781 +713,2116 @@ sudo systemctl restart $RELAYER sleep 1m - - name: _Test IBC fee middleware + - name: _Test IBC rate limits - osmosis-1 env: - HOME_IBC: /home/runner/.two + TRANSFER_CHANNEL: channel-141 + RATE: 0.05 + RPC_PORT: 27011 run: | - tests/gaia-v16/test_ibc_fee.sh - - - # Baseline-1-upgrade: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-cosmovisor - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-cosmovisor.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _Transactions verified> bank send, delegate, and withdraw rewards - # run: tests/test_tx_fresh.sh - # - name: _API endpoints check - # run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT - # - name: _RPC endpoints check - # run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT - - # Baseline-2-globalfee: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Test globalfee module - # run: | - # tests/test_globalfee.sh - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _Transactions verified> bank send, delegate, and withdraw rewards - # run: tests/test_tx_fresh.sh - # - name: _API endpoints check - # run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT - # - name: _RPC endpoints check - # run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT - - # - name: Test globalfee module - # env: - # COSMOS_SDK: v47 - # run: | - # tests/test_globalfee.sh - - # Baseline-3-icsv330: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-relayer - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # # Consumer chain variables - # RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl - # CONSUMER_ICS: v3.3.0 - # PROVIDER_ICS: v3.3.0 - # # Reference ICS chain variables - # CONSUMER_DENOM: ucon - # CONSUMER_FEES: 500 - # CONSUMER_CHAIN_V330_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.3.0/interchain-security-cd-linux - # CONSUMER_CHAIN_V330_BINARY: consumerd_v3.3.0 - # ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd - # ICS_TRANSFORM_BINARY: cd-transform - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Select Hermes - # if: ${{ matrix.relayer == 'hermes' }} - # run: echo "RELAYER=hermes" >> $GITHUB_ENV - # - name: Select Go Relayer - # if: ${{ matrix.relayer == 'rly' }} - # run: echo "RELAYER=rly" >> $GITHUB_ENV - # - name: Set up relayer - # run: scripts/setup_relayer.sh - # - name: Download consumer chain binaries - # run: | - # wget $CONSUMER_CHAIN_V330_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY -q - # chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY - # wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q - # chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY - # - name: Consumer chain binary URLs - # run: | - # echo "$CONSUMER_CHAIN_V330_BINARY runs off $CONSUMER_CHAIN_V330_BINARY_URL" - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Add consumer chain with ICS v3.3.0 - # env: - # CONSUMER_CHAIN_ID: v330-one - # run: | - # scripts/add_consumer.sh - # - name: Initialize consumer chain with ICS v3.3.0 - # env: - # CONSUMER_CHAIN_ID: v330-one - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # CONSUMER_HOME_2: /home/runner/.v330-1-2 - # CONSUMER_HOME_3: /home/runner/.v330-1-3 - # CONSUMER_SERVICE_1: v330-1-1.service - # CONSUMER_SERVICE_2: v330-1-2.service - # CONSUMER_SERVICE_3: v330-1-3.service - # CON1_API_PORT: 33101 - # CON2_API_PORT: 33102 - # CON3_API_PORT: 33103 - # CON1_GRPC_PORT: 33111 - # CON2_GRPC_PORT: 33112 - # CON3_GRPC_PORT: 33113 - # CON1_RPC_PORT: 33121 - # CON2_RPC_PORT: 33122 - # CON3_RPC_PORT: 33123 - # CON1_P2P_PORT: 33131 - # CON2_P2P_PORT: 33132 - # CON3_P2P_PORT: 33133 - # CON1_PPROF_PORT: 33141 - # CON2_PPROF_PORT: 33142 - # CON3_PPROF_PORT: 33143 - # DOWNTIME_BLOCKS: 100000 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain v330-one - # env: - # CONSUMER_CHAIN_ID: v330-one - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # CONSUMER_HOME_2: /home/runner/.v330-1-2 - # CONSUMER_HOME_3: /home/runner/.v330-1-3 - # CONSUMER_ICS: v3.3.0 - # PROVIDER_ICS: v3.3.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain v330-one - # env: - # CONSUMER_CHAIN_ID: v330-one - # CONSUMER_SERVICE_1: v330-1-1.service - # CONSUMER_SERVICE_2: v330-1-2.service - # CONSUMER_SERVICE_3: v330-1-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Pre-upgrade consumer chain produces blocks> ICS v3.3.0 chain 1 - # env: - # CON1_RPC_PORT: 33121 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for v330-one - # env: - # CONSUMER_CHAIN_ID: v330-one - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-1 --file v330-2.json - # rly transact connection v330-1 - # rly transact channel v330-1 --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _Pre-upgrade CCV channel verified> ICS v3.3.0 chain 1 - # env: - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # CON1_RPC_PORT: 33121 - # run: tests/test_ccv_key_assignment.sh - # - name: _Pre-upgrade IBC transfer successful> ICS v3.3.0 chain 1 - # env: - # CONSUMER_CHAIN_ID: v330-one - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Set blocks_per_epoch to 1 - # run: | - # scripts/param_change.sh templates/proposal-blocks-per-epoch.json - - # - name: Restart relayer - # run: sudo systemctl restart $RELAYER - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _CCV channel verified> ICS v3.3.0 chain 1 - # env: - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # CON1_RPC_PORT: 33121 - # run: tests/test_ccv_key_assignment.sh - # - name: _IBC transfer successful> ICS v3.3.0 chain 1 - # env: - # CONSUMER_CHAIN_ID: v330-one - # CONSUMER_HOME_1: /home/runner/.v330-1-1 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Add consumer chain with ICS v3.3.0 - # env: - # CONSUMER_CHAIN_ID: v330-two - # run: | - # scripts/add_consumer.sh - # - name: Initialize consumer chain with ICS v3.3.0 - # env: - # CONSUMER_CHAIN_ID: v330-two - # CONSUMER_HOME_1: /home/runner/.v330-2-1 - # CONSUMER_HOME_2: /home/runner/.v330-2-2 - # CONSUMER_HOME_3: /home/runner/.v330-2-3 - # CONSUMER_SERVICE_1: v330-2-1.service - # CONSUMER_SERVICE_2: v330-2-2.service - # CONSUMER_SERVICE_3: v330-2-3.service - # CON1_API_PORT: 33201 - # CON2_API_PORT: 33202 - # CON3_API_PORT: 33203 - # CON1_GRPC_PORT: 33211 - # CON2_GRPC_PORT: 33212 - # CON3_GRPC_PORT: 33213 - # CON1_RPC_PORT: 33221 - # CON2_RPC_PORT: 33222 - # CON3_RPC_PORT: 33223 - # CON1_P2P_PORT: 33231 - # CON2_P2P_PORT: 33232 - # CON3_P2P_PORT: 33233 - # CON1_PPROF_PORT: 33241 - # CON2_PPROF_PORT: 33242 - # CON3_PPROF_PORT: 33243 - # DOWNTIME_BLOCKS: 20 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain v330-two - # env: - # CONSUMER_CHAIN_ID: v330-two - # CONSUMER_HOME_1: /home/runner/.v330-2-1 - # CONSUMER_HOME_2: /home/runner/.v330-2-2 - # CONSUMER_HOME_3: /home/runner/.v330-2-3 - # ICS_330: true - # CONSUMER_ICS: v3.3.0 - # PROVIDER_ICS: v4.1.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain v330-two - # env: - # CONSUMER_CHAIN_ID: v330-two - # CONSUMER_SERVICE_1: v330-2-1.service - # CONSUMER_SERVICE_2: v330-2-2.service - # CONSUMER_SERVICE_3: v330-2-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Consumer chain produces blocks> ICS v3.3.0 chain 2 - # env: - # CON1_RPC_PORT: 33221 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for v330-two - # env: - # CONSUMER_CHAIN_ID: v330-two - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-2 --file v330-2.json - # rly transact connection v330-2 - # rly transact channel v330-2 --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _CCV channel verified> ICS v3.3.0 chain 2 - # env: - # CONSUMER_HOME_1: /home/runner/.v330-2-1 - # CON1_RPC_PORT: 33221 - # run: tests/test_ccv_key_assignment.sh - # - name: _IBC transfer successful> ICS v3.3.0 chain 2 - # env: - # CONSUMER_CHAIN_ID: v330-two - # CONSUMER_HOME_1: /home/runner/.v330-2-1 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # echo "client id: $client_id" - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # echo "connection id: $connection_id" - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # echo "Provider channel id: $channel_id" - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Stop validator services - # env: - # CONSUMER_SERVICE_2: v330-2-2.service - # CONSUMER_SERVICE_3: v330-2-3.service - # run: | - # sudo systemctl disable $CONSUMER_SERVICE_2 --now - # sudo systemctl disable $CONSUMER_SERVICE_3 --now - # sleep $(($COMMIT_TIMEOUT*30)) - # - name: _Soft opt-out test> Validator must be jailed - 1 - # run: tests/test_validator_jailed.sh $VALOPER_2 true - # - name: _Soft opt-out test> Validator must not be jailed - # run: tests/test_validator_jailed.sh $VALOPER_3 false - # - name: Unjail validator - # env: - # CONSUMER_SERVICE_2: v330-2-2.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_2 --now - # sleep $(($COMMIT_TIMEOUT*10)) - # $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 - # sleep $(($COMMIT_TIMEOUT*2)) - # - name: _Soft opt-out test> Validator must be unjailed - # run: tests/test_validator_jailed.sh $VALOPER_2 false - - # Baseline-4-icsv400: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-relayer - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # # Consumer chain variables - # RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl - # ICS_400: true - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # # Reference ICS chain variables - # CONSUMER_DENOM: ucon - # CONSUMER_FEES: 500 - # ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd - # ICS_TRANSFORM_BINARY: cd-transform - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Select Hermes - # if: ${{ matrix.relayer == 'hermes' }} - # run: echo "RELAYER=hermes" >> $GITHUB_ENV - # - name: Select Go Relayer - # if: ${{ matrix.relayer == 'rly' }} - # run: echo "RELAYER=rly" >> $GITHUB_ENV - # - name: Set up relayer - # run: scripts/setup_relayer.sh - # - name: Download consumer chain binaries - # run: | - # wget $CONSUMER_CHAIN_V400_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY -q - # chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY - # wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q - # chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY - # - name: Consumer chain binary URLs - # run: | - # echo "$CONSUMER_CHAIN_V400_BINARY runs off $CONSUMER_CHAIN_V400_BINARY_URL" - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Add consumer chain with ICS v4.0.0 - # env: - # CONSUMER_CHAIN_ID: v400-one - # run: | - # scripts/add_consumer.sh - # - name: Initialize consumer chain with ICS v4.0.0 - # env: - # CONSUMER_CHAIN_ID: v400-one - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # CONSUMER_HOME_2: /home/runner/.v400-1-2 - # CONSUMER_HOME_3: /home/runner/.v400-1-3 - # CONSUMER_SERVICE_1: v400-1-1.service - # CONSUMER_SERVICE_2: v400-1-2.service - # CONSUMER_SERVICE_3: v400-1-3.service - # CON1_API_PORT: 40101 - # CON2_API_PORT: 40102 - # CON3_API_PORT: 40103 - # CON1_GRPC_PORT: 40111 - # CON2_GRPC_PORT: 40112 - # CON3_GRPC_PORT: 40113 - # CON1_RPC_PORT: 40121 - # CON2_RPC_PORT: 40122 - # CON3_RPC_PORT: 40123 - # CON1_P2P_PORT: 40131 - # CON2_P2P_PORT: 40132 - # CON3_P2P_PORT: 40133 - # CON1_PPROF_PORT: 40141 - # CON2_PPROF_PORT: 40142 - # CON3_PPROF_PORT: 40143 - # DOWNTIME_BLOCKS: 100000 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain v400-one - # env: - # CONSUMER_CHAIN_ID: v400-one - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # CONSUMER_HOME_2: /home/runner/.v400-1-2 - # CONSUMER_HOME_3: /home/runner/.v400-1-3 - # ICS_400: true - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain v400-one - # env: - # CONSUMER_CHAIN_ID: v400-one - # CONSUMER_SERVICE_1: v400-1-1.service - # CONSUMER_SERVICE_2: v400-1-2.service - # CONSUMER_SERVICE_3: v400-1-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Pre-upgrade consumer chain produces blocks> ICS v4.0.0 chain 1 - # env: - # CON1_RPC_PORT: 40121 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for v400-one - # env: - # CONSUMER_CHAIN_ID: v400-one - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json - # rly transact connection v400-1 - # rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _Pre-upgrade CCV channel verified> ICS v4.0.0 chain 1 - # env: - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # CON1_RPC_PORT: 40121 - # run: tests/test_ccv_key_assignment.sh - # - name: _Pre-upgrade IBC transfer successful> ICS v4.0.0 chain 1 - # env: - # CONSUMER_CHAIN_ID: v400-one - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Set blocks_per_epoch to 1 - # run: | - # scripts/param_change.sh templates/proposal-blocks-per-epoch.json + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT + + - name: _Test IBC rate limits - core-1 + env: + TRANSFER_CHANNEL: channel-190 + RATE: 0.01 + RPC_PORT: 27021 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT + - name: _Test IBC rate limits - injective-1 + env: + TRANSFER_CHANNEL: channel-220 + RATE: 0.01 + RPC_PORT: 27031 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: Restart relayer - # run: sudo systemctl restart $RELAYER - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _CCV channel verified> ICS v4.0.0 chain 1 - # env: - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # CON1_RPC_PORT: 40121 - # run: tests/test_ccv_key_assignment.sh - # - name: _IBC transfer successful> ICS v4.0.0 chain 1 - # env: - # CONSUMER_CHAIN_ID: v400-one - # CONSUMER_HOME_1: /home/runner/.v400-1-1 - # RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Add consumer chain with ICS v4.0.0 - # env: - # CONSUMER_CHAIN_ID: v400-two - # run: | - # scripts/add_consumer.sh - # - name: Initialize consumer chain with ICS v4.0.0 - # env: - # CONSUMER_CHAIN_ID: v400-two - # CONSUMER_HOME_1: /home/runner/.v400-2-1 - # CONSUMER_HOME_2: /home/runner/.v400-2-2 - # CONSUMER_HOME_3: /home/runner/.v400-2-3 - # CONSUMER_SERVICE_1: v400-2-1.service - # CONSUMER_SERVICE_2: v400-2-2.service - # CONSUMER_SERVICE_3: v400-2-3.service - # CON1_API_PORT: 40201 - # CON2_API_PORT: 40202 - # CON3_API_PORT: 40203 - # CON1_GRPC_PORT: 40211 - # CON2_GRPC_PORT: 40212 - # CON3_GRPC_PORT: 40213 - # CON1_RPC_PORT: 40221 - # CON2_RPC_PORT: 40222 - # CON3_RPC_PORT: 40223 - # CON1_P2P_PORT: 40231 - # CON2_P2P_PORT: 40232 - # CON3_P2P_PORT: 40233 - # CON1_PPROF_PORT: 40241 - # CON2_PPROF_PORT: 40242 - # CON3_PPROF_PORT: 40243 - # DOWNTIME_BLOCKS: 20 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain v400-two - # env: - # CONSUMER_CHAIN_ID: v400-two - # CONSUMER_HOME_1: /home/runner/.v400-2-1 - # CONSUMER_HOME_2: /home/runner/.v400-2-2 - # CONSUMER_HOME_3: /home/runner/.v400-2-3 - # ICS_400: true - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v4.1.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain v400-two - # env: - # CONSUMER_CHAIN_ID: v330-two - # CONSUMER_SERVICE_1: v400-2-1.service - # CONSUMER_SERVICE_2: v400-2-2.service - # CONSUMER_SERVICE_3: v400-2-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Consumer chain produces blocks> ICS v4.0.0 chain 2 - # env: - # CON1_RPC_PORT: 40221 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for v400-two - # env: - # CONSUMER_CHAIN_ID: v400-two - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json - # rly transact connection v400-1 - # rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _CCV channel verified> ICS v4.0.0 chain 2 - # env: - # CONSUMER_HOME_1: /home/runner/.v400-2-1 - # CON1_RPC_PORT: 40221 - # run: tests/test_ccv_key_assignment.sh - # - name: _IBC transfer successful> ICS v4.0.0 chain 2 - # env: - # CONSUMER_CHAIN_ID: v400-two - # CONSUMER_HOME_1: /home/runner/.v400-2-1 - # RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc - # run: | - # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Stop validator services - # env: - # CONSUMER_SERVICE_2: v400-2-2.service - # CONSUMER_SERVICE_3: v400-2-3.service - # run: | - # sudo systemctl disable $CONSUMER_SERVICE_2 --now - # sudo systemctl disable $CONSUMER_SERVICE_3 --now - # sleep $(($COMMIT_TIMEOUT*30)) - # - name: _Soft opt-out test> Validator must be jailed - 1 - # run: tests/test_validator_jailed.sh $VALOPER_2 true - # - name: _Soft opt-out test> Validator must not be jailed - # run: tests/test_validator_jailed.sh $VALOPER_3 false - # - name: Unjail validator - # env: - # CONSUMER_SERVICE_2: v400-2-2.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_2 --now - # sleep $(($COMMIT_TIMEOUT*10)) - # $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 - # sleep $(($COMMIT_TIMEOUT*2)) - # - name: _Soft opt-out test> Validator must be unjailed - # run: tests/test_validator_jailed.sh $VALOPER_2 false - - # Baseline-5-pfm: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-relayer - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Select Hermes - # if: ${{ matrix.relayer == 'hermes' }} - # run: echo "RELAYER=hermes" >> $GITHUB_ENV - # - name: Select Go Relayer - # if: ${{ matrix.relayer == 'rly' }} - # run: echo "RELAYER=rly" >> $GITHUB_ENV - # - name: Set up relayer - # run: scripts/setup_relayer.sh - # - name: Start PFM chain 1 - # env: - # START_VERSION: ${{matrix.gaia_version}} - # PFM_SERVICE: pfm_1.service - # PFM_HOME: /home/runner/.pfm1 - # PFM_CHAIN_ID: pfm1 - # PFM_API_PORT: 25011 - # PFM_GRPC_PORT: 26011 - # PFM_RPC_PORT: 27011 - # PFM_P2P_PORT: 28011 - # PFM_PPROF_PORT: 29011 - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_pfm_chain.sh - # sleep 5 - # - name: Block production check - # env: - # PFM_RPC_PORT: 27011 - # run: | - # journalctl -u pfm_1.service | tail -n 100 - # tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks - - # - name: Start PFM chain 2 - # env: - # START_VERSION: ${{matrix.gaia_version}} - # PFM_SERVICE: pfm_2.service - # PFM_HOME: /home/runner/.pfm2 - # PFM_CHAIN_ID: pfm2 - # PFM_API_PORT: 25012 - # PFM_GRPC_PORT: 26012 - # PFM_RPC_PORT: 27012 - # PFM_P2P_PORT: 28012 - # PFM_PPROF_PORT: 29012 - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_pfm_chain.sh - # sleep 5 - # - name: Block production check - # env: - # PFM_RPC_PORT: 27012 - # run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks - - # - name: Start PFM chain 3 - # env: - # START_VERSION: ${{matrix.gaia_version}} - # PFM_SERVICE: pfm_3.service - # PFM_HOME: /home/runner/.pfm3 - # PFM_CHAIN_ID: pfm3 - # PFM_API_PORT: 25013 - # PFM_GRPC_PORT: 26013 - # PFM_RPC_PORT: 27013 - # PFM_P2P_PORT: 28013 - # PFM_PPROF_PORT: 29013 - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_pfm_chain.sh - # sleep 5 - # - name: Block production check - # env: - # PFM_RPC_PORT: 27013 - # run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks - - # - name: Create transfer channels for PFM test - # run: | - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channels with Hermes..." - # hermes create channel --new-client-connection --a-chain $CHAIN_ID --b-chain pfm1 --a-port transfer --b-port transfer --yes - # hermes create channel --new-client-connection --a-chain pfm1 --b-chain pfm2 --a-port transfer --b-port transfer --yes - # hermes create channel --new-client-connection --a-chain pfm2 --b-chain pfm3 --a-port transfer --b-port transfer --yes - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # echo "Paths" - # rly paths new testnet pfm1 pfm-path-1 - # rly paths new pfm1 pfm2 pfm-path-2 - # rly paths new pfm2 pfm3 pfm-path-3 - # echo "Clients" - # rly transact client testnet pfm1 pfm-path-1 - # rly transact client pfm1 pfm2 pfm-path-2 - # rly transact client pfm2 pfm3 pfm-path-3 - # sleep 5 - # echo "Connections" - # rly transact connection pfm-path-1 - # rly transact connection pfm-path-2 - # rly transact connection pfm-path-3 - # sleep 5 - # echo "Channels" - # rly transact channel pfm-path-1 - # rly transact channel pfm-path-2 - # rly transact channel pfm-path-3 - # fi - # sudo systemctl restart $RELAYER - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json - # # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json - # - name: _Test PFM transfers - # env: - # PFM_HOME: /home/runner/.pfm3 - # run: | - # tests/test_pfm_transfers.sh - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - # - name: Restart relayer - # run: sudo systemctl restart $RELAYER - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - # - name: _Transactions verified> bank send, delegate, and withdraw rewards - # run: tests/test_tx_fresh.sh - # - name: _API endpoints check - # run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT - # - name: _RPC endpoints check - # run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT - # - name: _Test PFM transfers - # env: - # PFM_HOME: /home/runner/.pfm3 - # run: | - # tests/test_pfm_transfers.sh - - # Baseline-6-lsm: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-relayer - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # # Consumer chain variables - # RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # # Reference ICS chain variables - # ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd - # ICS_TRANSFORM_BINARY: cd-transform - # STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Select Hermes - # if: ${{ matrix.relayer == 'hermes' }} - # run: echo "RELAYER=hermes" >> $GITHUB_ENV - # - name: Select Go Relayer - # if: ${{ matrix.relayer == 'rly' }} - # run: echo "RELAYER=rly" >> $GITHUB_ENV - # - name: Set up relayer - # run: scripts/setup_relayer.sh - # - name: Download consumer chain binaries - # run: | - # wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q - # chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY - # - name: Install Stride binary - # run: | - # go version - # git clone https://github.com/Stride-Labs/stride.git - # cd stride - # git checkout v22.0.0 - # make install - # - name: Consumer chain binary version - # run: | - # echo "$STRIDE_BINARY runs off $($STRIDE_BINARY version)" - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Add Stride consumer chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # run: | - # scripts/add_consumer.sh - # - name: Initialize Stride consumer chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_DENOM: ustrd - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_HOME_2: /home/runner/.stride-2 - # CONSUMER_HOME_3: /home/runner/.stride-3 - # CONSUMER_SERVICE_1: stride-1.service - # CONSUMER_SERVICE_2: stride-2.service - # CONSUMER_SERVICE_3: stride-3.service - # CON1_API_PORT: 32301 - # CON2_API_PORT: 32302 - # CON3_API_PORT: 32303 - # CON1_GRPC_PORT: 32311 - # CON2_GRPC_PORT: 32312 - # CON3_GRPC_PORT: 32313 - # CON1_RPC_PORT: 32321 - # CON2_RPC_PORT: 32322 - # CON3_RPC_PORT: 32323 - # CON1_P2P_PORT: 32331 - # CON2_P2P_PORT: 32332 - # CON3_P2P_PORT: 32333 - # CON1_PPROF_PORT: 32341 - # CON2_PPROF_PORT: 32342 - # CON3_PPROF_PORT: 32343 - # DOWNTIME_BLOCKS: 100000 - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain stride-test - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_HOME_2: /home/runner/.stride-2 - # CONSUMER_HOME_3: /home/runner/.stride-3 - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain stride-test - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_SERVICE_1: stride-1.service - # CONSUMER_SERVICE_2: stride-2.service - # CONSUMER_SERVICE_3: stride-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Pre-upgrade consumer chain produces blocks> Stride chain - # env: - # CON1_RPC_PORT: 32321 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > stride-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' stride-1.json > stride-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID stride --file stride-2.json - # rly transact connection stride - # rly transact channel stride --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _Pre-upgrade CCV channel verified> Stride chain - # env: - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CON1_RPC_PORT: 32321 - # run: tests/test_ccv_key_assignment.sh - # - name: _Pre-upgrade IBC transfer successful> Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_CHAIN_BINARY: strided - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_DENOM: ustrd - # RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - # - name: Register and fund ICA - # env: - # ICA_CHAIN_HOME: /home/runner/.stride-1 - # run: scripts/setup_ica.sh - # - name: Set up happy path LSM accounts - # run: | - # scripts/lsm_account_setup.sh - # - name: Set test LSM params - # run: | - # scripts/param_change.sh templates/proposal-global-liquid-cap.json - # scripts/param_change.sh templates/proposal-validator-liquid-cap.json - # scripts/param_change.sh templates/proposal-validator-bond-factor.json - # - name: Create LSM log file - # run: | - # touch lsm_log.csv - # echo "user flow,action,account,amount,balance,del_shares,del_balance,val1_tokens,val1_shares,val1_bond_shares,val1_liquid_shares,val2_tokens,val2_shares,val2_bond_shares,val2_liquid_shares" >> lsm_log.csv - # - name: _Pre-upgrade LSM happy path - # env: - # BASE_FEES: 3000 - # CONSUMER_FEES: 1000 - # CONSUMER_CHAIN_ID: stride-test - # STRIDE_HOME_1: /home/runner/.stride-1 - # VALOPER_TOKENIZATION: 1 - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # export IBC_CHANNEL=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_lsm_happy_path.sh - # - name: _Pre-upgrade LSM Liquid Staking Provider happy path - # env: - # STRIDE_HOME_1: /home/runner/.stride-1 - # LSP_COUNT: 1 - # COSMOS_SDK: v45 - # run: tests/test_ica_delegate_happy.sh - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Set blocks_per_epoch to 1 - # run: | - # scripts/param_change.sh templates/proposal-blocks-per-epoch.json + - name: _Test IBC rate limits - secret-4 + env: + TRANSFER_CHANNEL: channel-235 + RATE: 0.01 + RPC_PORT: 27041 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: Restart relayer - # run: sudo systemctl restart $RELAYER - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _CCV channel verified> Stride chain - # env: - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CON1_RPC_PORT: 32321 - # run: tests/test_ccv_key_assignment.sh - # - name: _IBC transfer successful> Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_CHAIN_BINARY: strided - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_DENOM: ustrd - # RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - # - name: _LSM happy path - # env: - # BASE_FEES: 3000 - # CONSUMER_FEES: 1000 - # CONSUMER_CHAIN_ID: stride-test - # STRIDE_HOME_1: /home/runner/.stride-1 - # VALOPER_TOKENIZATION: 2 - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # export IBC_CHANNEL=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_lsm_happy_path.sh - # - name: _LSM Liquid Staking Provider happy path - # env: - # STRIDE_HOME_1: /home/runner/.stride-1 - # LSP_COUNT: 2 - # COSMOS_SDK: v47 - # run: tests/test_ica_delegate_happy.sh - - # Baseline-7-mainnet-consumer-chains: - # runs-on: ubuntu-22.04 - # needs: set-version-matrix-relayer - # strategy: - # matrix: - # ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} - # fail-fast: false - # env: - # COSMOVISOR_VERSION: ${{ matrix.cv_version }} - # UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} - # # Consumer chain variables - # RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # # Reference ICS chain variables - # ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd - # ICS_TRANSFORM_BINARY: cd-transform - # STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 - # steps: - # - name: start-version - # run: echo ${{matrix.gaia_version}} - # - name: target-version - # run: echo ${{matrix.upgrade_version}} - # - name: target-commit - # if: ${{ matrix.upgrade_version == 'main' }} - # run: | - # BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} - # TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') - # echo TARGET_COMMIT: $TARGET_COMMIT - # - name: Update PATH - # run: | - # mkdir -p $HOME/go/bin - # echo "$HOME/go/bin" >> $GITHUB_PATH - # echo "$HOME/.hermes" >> $GITHUB_PATH - # echo "$HOME/.relayer" >> $GITHUB_PATH - # - name: Bypass the grub-efi-amd64-signed package - # run: sudo apt-mark hold grub-efi-amd64-signed - # - name: Check out repository code - # uses: actions/checkout@v3 - # - name: Set up Python - # uses: actions/setup-python@v3 - # with: - # python-version: '3.10' - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # python -m pip install toml-cli - # - name: Install Cosmovisor > v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} - # run: | - # go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Install Cosmovisor v1.3.0 - # if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} - # run: | - # go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION - # echo "COSMOVISOR=true" >> $GITHUB_ENV - # echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH - # - name: Select Hermes - # if: ${{ matrix.relayer == 'hermes' }} - # run: echo "RELAYER=hermes" >> $GITHUB_ENV - # - name: Select Go Relayer - # if: ${{ matrix.relayer == 'rly' }} - # run: echo "RELAYER=rly" >> $GITHUB_ENV - # - name: Set up relayer - # run: scripts/setup_relayer.sh - # - name: Download consumer chain binaries - # run: | - # wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q - # chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY - # - name: Install Neutron binary - # run: | - # go version - # git clone https://github.com/neutron-org/neutron.git - # cd neutron - # git checkout v3.0.2 - # make install - # - name: Install Stride binary - # run: | - # go version - # git clone https://github.com/Stride-Labs/stride.git - # cd stride - # git checkout v22.0.0 - # make install + - name: _Test IBC rate limits - kaiyo-1 + env: + TRANSFER_CHANNEL: channel-343 + RATE: 0.01 + RPC_PORT: 27051 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT + - name: _Test IBC rate limits - stride-1 + env: + TRANSFER_CHANNEL: channel-391 + RATE: 0.01 + RPC_PORT: 27061 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: Consumer chain binary URLs - # run: | - # echo "$NEUTRON_BINARY runs $($NEUTRON_BINARY version)" - # echo "$STRIDE_BINARY runs off $($STRIDE_BINARY version)" - # - name: Start chain - # env: - # START_VERSION: ${{matrix.gaia_version}} - # run: | - # export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 - # scripts/start_chain.sh - # - name: Check Gaia log - # run: sudo journalctl -u $PROVIDER_SERVICE_1 - # - name: Print Gaia version - # run: $CHAIN_BINARY version --long - # - name: Block production check - # run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks - - # - name: Add Neutron consumer chain - # env: - # CONSUMER_CHAIN_ID: neutron-test - # run: | - # scripts/add_consumer.sh - # - name: Initialize Neutron consumer chain - # env: - # CONSUMER_CHAIN_ID: neutron-test - # CONSUMER_DENOM: untrn - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CONSUMER_HOME_2: /home/runner/.neutron-2 - # CONSUMER_HOME_3: /home/runner/.neutron-3 - # CONSUMER_SERVICE_1: neutron-1.service - # CONSUMER_SERVICE_2: neutron-2.service - # CONSUMER_SERVICE_3: neutron-3.service - # CON1_API_PORT: 31301 - # CON2_API_PORT: 31302 - # CON3_API_PORT: 31303 - # CON1_GRPC_PORT: 31311 - # CON2_GRPC_PORT: 31312 - # CON3_GRPC_PORT: 31313 - # CON1_RPC_PORT: 31321 - # CON2_RPC_PORT: 31322 - # CON3_RPC_PORT: 31323 - # CON1_P2P_PORT: 31331 - # CON2_P2P_PORT: 31332 - # CON3_P2P_PORT: 31333 - # CON1_PPROF_PORT: 31341 - # CON2_PPROF_PORT: 31342 - # CON3_PPROF_PORT: 31343 - # DOWNTIME_BLOCKS: 100000 - # run: | - # export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain neutron-test - # env: - # CONSUMER_CHAIN_ID: neutron-test - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CONSUMER_HOME_2: /home/runner/.neutron-2 - # CONSUMER_HOME_3: /home/runner/.neutron-3 - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain neutron-test - # env: - # CONSUMER_CHAIN_ID: neutron-test - # CONSUMER_SERVICE_1: neutron-1.service - # CONSUMER_SERVICE_2: neutron-2.service - # CONSUMER_SERVICE_3: neutron-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Pre-upgrade consumer chain produces blocks> Neutron chain - # env: - # CON1_RPC_PORT: 31321 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for Neutron chain - # env: - # CONSUMER_CHAIN_ID: neutron-test - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > neutron-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' neutron-1.json > neutron-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID neutron --file neutron-2.json - # rly transact connection neutron - # rly transact channel neutron --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _Pre-upgrade CCV channel verified> Neutron chain - # env: - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CON1_RPC_PORT: 31321 - # run: tests/test_ccv_key_assignment.sh - # - name: _Pre-upgrade IBC transfer successful> Neutron chain - # env: - # CONSUMER_CHAIN_ID: neutron-test - # CONSUMER_CHAIN_BINARY: neutrond - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CONSUMER_DENOM: untrn - # RECIPIENT: neutron1r5v5srda7xfth3hn2s26txvrcrntldjul5wedc - # GAS_PRICE: 0.02 - # run: | - # export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Add Stride consumer chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # run: | - # scripts/add_consumer.sh - # - name: Initialize Stride consumer chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_DENOM: ustrd - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_HOME_2: /home/runner/.stride-2 - # CONSUMER_HOME_3: /home/runner/.stride-3 - # CONSUMER_SERVICE_1: stride-1.service - # CONSUMER_SERVICE_2: stride-2.service - # CONSUMER_SERVICE_3: stride-3.service - # CON1_API_PORT: 32301 - # CON2_API_PORT: 32302 - # CON3_API_PORT: 32303 - # CON1_GRPC_PORT: 32311 - # CON2_GRPC_PORT: 32312 - # CON3_GRPC_PORT: 32313 - # CON1_RPC_PORT: 32321 - # CON2_RPC_PORT: 32322 - # CON3_RPC_PORT: 32323 - # CON1_P2P_PORT: 32331 - # CON2_P2P_PORT: 32332 - # CON3_P2P_PORT: 32333 - # CON1_PPROF_PORT: 32341 - # CON2_PPROF_PORT: 32342 - # CON3_PPROF_PORT: 32343 - # DOWNTIME_BLOCKS: 100000 - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # scripts/init_consumer_assign_keys.sh - # sleep 20 - # - name: Prepare consumer chain stride-test - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_HOME_2: /home/runner/.stride-2 - # CONSUMER_HOME_3: /home/runner/.stride-3 - # CONSUMER_ICS: v4.0.0 - # PROVIDER_ICS: v3.3.0 - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # scripts/prepare_consumer.sh - # - name: Start consumer chain stride-test - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_SERVICE_1: stride-1.service - # CONSUMER_SERVICE_2: stride-2.service - # CONSUMER_SERVICE_3: stride-3.service - # run: | - # sudo systemctl enable $CONSUMER_SERVICE_1 --now - # sleep 5 - # journalctl -u $CONSUMER_SERVICE_1 - # - name: _Pre-upgrade consumer chain produces blocks> Stride chain - # env: - # CON1_RPC_PORT: 32321 - # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 - # - name: Establish CCV channel for Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # run: | - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # if [ $RELAYER == "hermes" ]; then - # echo "Creating channel with Hermes..." - # hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id - # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 - # elif [ $RELAYER == "rly" ]; then - # echo "Creating channel with Go relayer..." - # jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > stride-1.json - # jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' stride-1.json > stride-2.json - # rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID stride --file stride-2.json - # rly transact connection stride - # rly transact channel stride --src-port consumer --dst-port provider --order ordered --version 1 - # fi - # sudo systemctl restart $RELAYER - # sleep 10 - # - name: _Pre-upgrade CCV channel verified> Stride chain - # env: - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CON1_RPC_PORT: 32321 - # run: tests/test_ccv_key_assignment.sh - # - name: _Pre-upgrade IBC transfer successful> Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_CHAIN_BINARY: strided - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_DENOM: ustrd - # RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: Test software upgrade for published releases - # if: ${{ matrix.upgrade_version != 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 - # run: | - # echo $DOWNLOAD_URL - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - # - name: Test software upgrade for main branch - # if: ${{ matrix.upgrade_version == 'main' }} - # env: - # DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux - # run: | - # scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION - - # - name: _Blocks produced after upgrade - # run: | - # tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 - - # - name: Set blocks_per_epoch to 1 - # run: | - # scripts/param_change.sh templates/proposal-blocks-per-epoch.json + - name: _Test IBC rate limits - neutron-1 + env: + TRANSFER_CHANNEL: channel-569 + RATE: 0.01 + RPC_PORT: 27071 + run: | + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + $CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y + sleep 3 + tests/gaia-v16/test_rate_limits.sh $TRANSFER_CHANNEL $RATE $RPC_PORT - # - name: Restart relayer - # run: sudo systemctl restart $RELAYER - - # - name: Flush "migration successful" lines - # run: | - # $CHAIN_BINARY keys list --home $HOME_1 - - # - name: _CCV channel verified> Neutron chain - # env: - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CON1_RPC_PORT: 31321 - # run: tests/test_ccv_key_assignment.sh - - # - name: _CCV channel verified> Stride chain - # env: - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CON1_RPC_PORT: 32321 - # run: tests/test_ccv_key_assignment.sh - - # - name: _IBC transfer successful> Neutron chain - # env: - # CONSUMER_CHAIN_ID: neutron-test - # CONSUMER_CHAIN_BINARY: neutrond - # CONSUMER_HOME_1: /home/runner/.neutron-1 - # CONSUMER_DENOM: untrn - # RECIPIENT: neutron1r5v5srda7xfth3hn2s26txvrcrntldjul5wedc - # GAS_PRICE: 0.02 - # run: | - # export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id - - # - name: _IBC transfer successful> Stride chain - # env: - # CONSUMER_CHAIN_ID: stride-test - # CONSUMER_CHAIN_BINARY: strided - # CONSUMER_HOME_1: /home/runner/.stride-1 - # CONSUMER_DENOM: ustrd - # RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn - # run: | - # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY - # client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') - # connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') - # channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') - # tests/test_consumer_ibc_transfer.sh $channel_id + v16-3-ICA-controller: + runs-on: ubuntu-22.04 + needs: set-version-matrix + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + CHAIN_BINARY_SECONDARY: gaiad-ibc + COMMIT_TIMEOUT: 1 + RELAYER: hermes + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Set up relayer + run: scripts/gaia-v16/setup_relayer_ica_controller.sh + + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain_single_val.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Installing secondary chain binaries + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + echo "Chain binary URL: $CHAIN_BINARY_URL" + echo "Installing secondary chain binary..." + wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q + chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY + - name: Start host chain + env: + CHAIN_SERVICE: host.service + CHAIN_HOME: /home/runner/.host + CHAIN_ID: host + API_PORT: 25011 + GRPC_PORT: 26011 + RPC_PORT: 27011 + P2P_PORT: 28011 + PPROF_PORT: 29011 + run: | + scripts/start_chain_secondary.sh + - name: Generate host connection + env: + TARGET_CHAIN_ID: host + CLIENT_COUNT: 0 + RPC_PORT: 27011 + run: | + scripts/gaia-v16/setup_connection_ica_controller.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Restart relayer + run: | + sudo systemctl restart $RELAYER + sleep 1m + + - name: _Test ICA controller + env: + CONTROLLER_HOME: /home/runner/.val1 + HOST_HOME: /home/runner/.host + run: | + tests/gaia-v16/test_ica_controller.sh + + v16-4-IBC-fee-middleware: + runs-on: ubuntu-22.04 + needs: set-version-matrix + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + CHAIN_BINARY_SECONDARY: gaiad-ibc + COMMIT_TIMEOUT: 1 + RELAYER: hermes + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Set up relayer + run: scripts/gaia-v16/setup_relayer_ibc_fee.sh + + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + GAS_PRICE: 0 + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain_single_val.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Installing secondary chain binaries + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + export DOWNLOAD_URL=https://github.com/cosmos/gaia/releases/download/v16.0.0-rc0/gaiad-v16.0.0-rc0-linux-amd64 + echo "Chain binary URL: $CHAIN_BINARY_URL" + echo "Installing secondary chain binary..." + wget $DOWNLOAD_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q + chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY + - name: Start secondary chain + env: + CHAIN_SERVICE: two.service + CHAIN_HOME: /home/runner/.two + CHAIN_ID: two + API_PORT: 25011 + GRPC_PORT: 26011 + RPC_PORT: 27011 + P2P_PORT: 28011 + PPROF_PORT: 29011 + GAS_PRICE: 0 + run: | + scripts/start_chain_secondary.sh + - name: Generate IBC connection + env: + TARGET_CHAIN_ID: two + CLIENT_COUNT: 0 + RPC_PORT: 27011 + run: | + scripts/gaia-v16/setup_connection_ica_controller.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Restart relayer + run: | + sudo systemctl restart $RELAYER + sleep 1m + + - name: _Test IBC fee middleware + env: + HOME_IBC: /home/runner/.two + run: | + tests/gaia-v16/test_ibc_fee.sh + + Baseline-1-upgrade: + runs-on: ubuntu-22.04 + needs: set-version-matrix-cosmovisor + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-cosmovisor.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _Transactions verified> bank send, delegate, and withdraw rewards + run: tests/test_tx_fresh.sh + - name: _API endpoints check + run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT + - name: _RPC endpoints check + run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT + + Baseline-2-globalfee: + runs-on: ubuntu-22.04 + needs: set-version-matrix + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Test globalfee module + run: | + tests/test_globalfee.sh + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _Transactions verified> bank send, delegate, and withdraw rewards + run: tests/test_tx_fresh.sh + - name: _API endpoints check + run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT + - name: _RPC endpoints check + run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT + + - name: Test globalfee module + env: + COSMOS_SDK: v47 + run: | + tests/test_globalfee.sh + + Baseline-3-icsv330: + runs-on: ubuntu-22.04 + needs: set-version-matrix-relayer + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + # Consumer chain variables + RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl + CONSUMER_ICS: v3.3.0 + PROVIDER_ICS: v3.3.0 + # Reference ICS chain variables + CONSUMER_DENOM: ucon + CONSUMER_FEES: 500 + CONSUMER_CHAIN_V330_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.3.0/interchain-security-cd-linux + CONSUMER_CHAIN_V330_BINARY: consumerd_v3.3.0 + ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd + ICS_TRANSFORM_BINARY: cd-transform + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Select Hermes + if: ${{ matrix.relayer == 'hermes' }} + run: echo "RELAYER=hermes" >> $GITHUB_ENV + - name: Select Go Relayer + if: ${{ matrix.relayer == 'rly' }} + run: echo "RELAYER=rly" >> $GITHUB_ENV + - name: Set up relayer + run: scripts/setup_relayer.sh + - name: Download consumer chain binaries + run: | + wget $CONSUMER_CHAIN_V330_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY -q + chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY + wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q + chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY + - name: Consumer chain binary URLs + run: | + echo "$CONSUMER_CHAIN_V330_BINARY runs off $CONSUMER_CHAIN_V330_BINARY_URL" + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Add consumer chain with ICS v3.3.0 + env: + CONSUMER_CHAIN_ID: v330-one + run: | + scripts/add_consumer.sh + - name: Initialize consumer chain with ICS v3.3.0 + env: + CONSUMER_CHAIN_ID: v330-one + CONSUMER_HOME_1: /home/runner/.v330-1-1 + CONSUMER_HOME_2: /home/runner/.v330-1-2 + CONSUMER_HOME_3: /home/runner/.v330-1-3 + CONSUMER_SERVICE_1: v330-1-1.service + CONSUMER_SERVICE_2: v330-1-2.service + CONSUMER_SERVICE_3: v330-1-3.service + CON1_API_PORT: 33101 + CON2_API_PORT: 33102 + CON3_API_PORT: 33103 + CON1_GRPC_PORT: 33111 + CON2_GRPC_PORT: 33112 + CON3_GRPC_PORT: 33113 + CON1_RPC_PORT: 33121 + CON2_RPC_PORT: 33122 + CON3_RPC_PORT: 33123 + CON1_P2P_PORT: 33131 + CON2_P2P_PORT: 33132 + CON3_P2P_PORT: 33133 + CON1_PPROF_PORT: 33141 + CON2_PPROF_PORT: 33142 + CON3_PPROF_PORT: 33143 + DOWNTIME_BLOCKS: 100000 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain v330-one + env: + CONSUMER_CHAIN_ID: v330-one + CONSUMER_HOME_1: /home/runner/.v330-1-1 + CONSUMER_HOME_2: /home/runner/.v330-1-2 + CONSUMER_HOME_3: /home/runner/.v330-1-3 + CONSUMER_ICS: v3.3.0 + PROVIDER_ICS: v3.3.0 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain v330-one + env: + CONSUMER_CHAIN_ID: v330-one + CONSUMER_SERVICE_1: v330-1-1.service + CONSUMER_SERVICE_2: v330-1-2.service + CONSUMER_SERVICE_3: v330-1-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Pre-upgrade consumer chain produces blocks> ICS v3.3.0 chain 1 + env: + CON1_RPC_PORT: 33121 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for v330-one + env: + CONSUMER_CHAIN_ID: v330-one + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-1 --file v330-2.json + rly transact connection v330-1 + rly transact channel v330-1 --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _Pre-upgrade CCV channel verified> ICS v3.3.0 chain 1 + env: + CONSUMER_HOME_1: /home/runner/.v330-1-1 + CON1_RPC_PORT: 33121 + run: tests/test_ccv_key_assignment.sh + - name: _Pre-upgrade IBC transfer successful> ICS v3.3.0 chain 1 + env: + CONSUMER_CHAIN_ID: v330-one + CONSUMER_HOME_1: /home/runner/.v330-1-1 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Set blocks_per_epoch to 1 + run: | + scripts/param_change.sh templates/proposal-blocks-per-epoch.json + + - name: Restart relayer + run: sudo systemctl restart $RELAYER + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _CCV channel verified> ICS v3.3.0 chain 1 + env: + CONSUMER_HOME_1: /home/runner/.v330-1-1 + CON1_RPC_PORT: 33121 + run: tests/test_ccv_key_assignment.sh + - name: _IBC transfer successful> ICS v3.3.0 chain 1 + env: + CONSUMER_CHAIN_ID: v330-one + CONSUMER_HOME_1: /home/runner/.v330-1-1 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Add consumer chain with ICS v3.3.0 + env: + CONSUMER_CHAIN_ID: v330-two + run: | + scripts/add_consumer.sh + - name: Initialize consumer chain with ICS v3.3.0 + env: + CONSUMER_CHAIN_ID: v330-two + CONSUMER_HOME_1: /home/runner/.v330-2-1 + CONSUMER_HOME_2: /home/runner/.v330-2-2 + CONSUMER_HOME_3: /home/runner/.v330-2-3 + CONSUMER_SERVICE_1: v330-2-1.service + CONSUMER_SERVICE_2: v330-2-2.service + CONSUMER_SERVICE_3: v330-2-3.service + CON1_API_PORT: 33201 + CON2_API_PORT: 33202 + CON3_API_PORT: 33203 + CON1_GRPC_PORT: 33211 + CON2_GRPC_PORT: 33212 + CON3_GRPC_PORT: 33213 + CON1_RPC_PORT: 33221 + CON2_RPC_PORT: 33222 + CON3_RPC_PORT: 33223 + CON1_P2P_PORT: 33231 + CON2_P2P_PORT: 33232 + CON3_P2P_PORT: 33233 + CON1_PPROF_PORT: 33241 + CON2_PPROF_PORT: 33242 + CON3_PPROF_PORT: 33243 + DOWNTIME_BLOCKS: 20 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain v330-two + env: + CONSUMER_CHAIN_ID: v330-two + CONSUMER_HOME_1: /home/runner/.v330-2-1 + CONSUMER_HOME_2: /home/runner/.v330-2-2 + CONSUMER_HOME_3: /home/runner/.v330-2-3 + ICS_330: true + CONSUMER_ICS: v3.3.0 + PROVIDER_ICS: v4.1.0 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain v330-two + env: + CONSUMER_CHAIN_ID: v330-two + CONSUMER_SERVICE_1: v330-2-1.service + CONSUMER_SERVICE_2: v330-2-2.service + CONSUMER_SERVICE_3: v330-2-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Consumer chain produces blocks> ICS v3.3.0 chain 2 + env: + CON1_RPC_PORT: 33221 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for v330-two + env: + CONSUMER_CHAIN_ID: v330-two + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-2 --file v330-2.json + rly transact connection v330-2 + rly transact channel v330-2 --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _CCV channel verified> ICS v3.3.0 chain 2 + env: + CONSUMER_HOME_1: /home/runner/.v330-2-1 + CON1_RPC_PORT: 33221 + run: tests/test_ccv_key_assignment.sh + - name: _IBC transfer successful> ICS v3.3.0 chain 2 + env: + CONSUMER_CHAIN_ID: v330-two + CONSUMER_HOME_1: /home/runner/.v330-2-1 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + echo "client id: $client_id" + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + echo "connection id: $connection_id" + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + echo "Provider channel id: $channel_id" + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Stop validator services + env: + CONSUMER_SERVICE_2: v330-2-2.service + CONSUMER_SERVICE_3: v330-2-3.service + run: | + sudo systemctl disable $CONSUMER_SERVICE_2 --now + sudo systemctl disable $CONSUMER_SERVICE_3 --now + sleep $(($COMMIT_TIMEOUT*30)) + - name: _Soft opt-out test> Validator must be jailed - 1 + run: tests/test_validator_jailed.sh $VALOPER_2 true + - name: _Soft opt-out test> Validator must not be jailed + run: tests/test_validator_jailed.sh $VALOPER_3 false + - name: Unjail validator + env: + CONSUMER_SERVICE_2: v330-2-2.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_2 --now + sleep $(($COMMIT_TIMEOUT*10)) + $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 + sleep $(($COMMIT_TIMEOUT*2)) + - name: _Soft opt-out test> Validator must be unjailed + run: tests/test_validator_jailed.sh $VALOPER_2 false + + Baseline-4-icsv400: + runs-on: ubuntu-22.04 + needs: set-version-matrix-relayer + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + # Consumer chain variables + RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl + ICS_400: true + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + # Reference ICS chain variables + CONSUMER_DENOM: ucon + CONSUMER_FEES: 500 + ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd + ICS_TRANSFORM_BINARY: cd-transform + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Select Hermes + if: ${{ matrix.relayer == 'hermes' }} + run: echo "RELAYER=hermes" >> $GITHUB_ENV + - name: Select Go Relayer + if: ${{ matrix.relayer == 'rly' }} + run: echo "RELAYER=rly" >> $GITHUB_ENV + - name: Set up relayer + run: scripts/setup_relayer.sh + - name: Download consumer chain binaries + run: | + wget $CONSUMER_CHAIN_V400_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY -q + chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY + wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q + chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY + - name: Consumer chain binary URLs + run: | + echo "$CONSUMER_CHAIN_V400_BINARY runs off $CONSUMER_CHAIN_V400_BINARY_URL" + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Add consumer chain with ICS v4.0.0 + env: + CONSUMER_CHAIN_ID: v400-one + run: | + scripts/add_consumer.sh + - name: Initialize consumer chain with ICS v4.0.0 + env: + CONSUMER_CHAIN_ID: v400-one + CONSUMER_HOME_1: /home/runner/.v400-1-1 + CONSUMER_HOME_2: /home/runner/.v400-1-2 + CONSUMER_HOME_3: /home/runner/.v400-1-3 + CONSUMER_SERVICE_1: v400-1-1.service + CONSUMER_SERVICE_2: v400-1-2.service + CONSUMER_SERVICE_3: v400-1-3.service + CON1_API_PORT: 40101 + CON2_API_PORT: 40102 + CON3_API_PORT: 40103 + CON1_GRPC_PORT: 40111 + CON2_GRPC_PORT: 40112 + CON3_GRPC_PORT: 40113 + CON1_RPC_PORT: 40121 + CON2_RPC_PORT: 40122 + CON3_RPC_PORT: 40123 + CON1_P2P_PORT: 40131 + CON2_P2P_PORT: 40132 + CON3_P2P_PORT: 40133 + CON1_PPROF_PORT: 40141 + CON2_PPROF_PORT: 40142 + CON3_PPROF_PORT: 40143 + DOWNTIME_BLOCKS: 100000 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain v400-one + env: + CONSUMER_CHAIN_ID: v400-one + CONSUMER_HOME_1: /home/runner/.v400-1-1 + CONSUMER_HOME_2: /home/runner/.v400-1-2 + CONSUMER_HOME_3: /home/runner/.v400-1-3 + ICS_400: true + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain v400-one + env: + CONSUMER_CHAIN_ID: v400-one + CONSUMER_SERVICE_1: v400-1-1.service + CONSUMER_SERVICE_2: v400-1-2.service + CONSUMER_SERVICE_3: v400-1-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Pre-upgrade consumer chain produces blocks> ICS v4.0.0 chain 1 + env: + CON1_RPC_PORT: 40121 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for v400-one + env: + CONSUMER_CHAIN_ID: v400-one + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json + rly transact connection v400-1 + rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _Pre-upgrade CCV channel verified> ICS v4.0.0 chain 1 + env: + CONSUMER_HOME_1: /home/runner/.v400-1-1 + CON1_RPC_PORT: 40121 + run: tests/test_ccv_key_assignment.sh + - name: _Pre-upgrade IBC transfer successful> ICS v4.0.0 chain 1 + env: + CONSUMER_CHAIN_ID: v400-one + CONSUMER_HOME_1: /home/runner/.v400-1-1 + RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Set blocks_per_epoch to 1 + run: | + scripts/param_change.sh templates/proposal-blocks-per-epoch.json + + - name: Restart relayer + run: sudo systemctl restart $RELAYER + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _CCV channel verified> ICS v4.0.0 chain 1 + env: + CONSUMER_HOME_1: /home/runner/.v400-1-1 + CON1_RPC_PORT: 40121 + run: tests/test_ccv_key_assignment.sh + - name: _IBC transfer successful> ICS v4.0.0 chain 1 + env: + CONSUMER_CHAIN_ID: v400-one + CONSUMER_HOME_1: /home/runner/.v400-1-1 + RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Add consumer chain with ICS v4.0.0 + env: + CONSUMER_CHAIN_ID: v400-two + run: | + scripts/add_consumer.sh + - name: Initialize consumer chain with ICS v4.0.0 + env: + CONSUMER_CHAIN_ID: v400-two + CONSUMER_HOME_1: /home/runner/.v400-2-1 + CONSUMER_HOME_2: /home/runner/.v400-2-2 + CONSUMER_HOME_3: /home/runner/.v400-2-3 + CONSUMER_SERVICE_1: v400-2-1.service + CONSUMER_SERVICE_2: v400-2-2.service + CONSUMER_SERVICE_3: v400-2-3.service + CON1_API_PORT: 40201 + CON2_API_PORT: 40202 + CON3_API_PORT: 40203 + CON1_GRPC_PORT: 40211 + CON2_GRPC_PORT: 40212 + CON3_GRPC_PORT: 40213 + CON1_RPC_PORT: 40221 + CON2_RPC_PORT: 40222 + CON3_RPC_PORT: 40223 + CON1_P2P_PORT: 40231 + CON2_P2P_PORT: 40232 + CON3_P2P_PORT: 40233 + CON1_PPROF_PORT: 40241 + CON2_PPROF_PORT: 40242 + CON3_PPROF_PORT: 40243 + DOWNTIME_BLOCKS: 20 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain v400-two + env: + CONSUMER_CHAIN_ID: v400-two + CONSUMER_HOME_1: /home/runner/.v400-2-1 + CONSUMER_HOME_2: /home/runner/.v400-2-2 + CONSUMER_HOME_3: /home/runner/.v400-2-3 + ICS_400: true + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v4.1.0 + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain v400-two + env: + CONSUMER_CHAIN_ID: v330-two + CONSUMER_SERVICE_1: v400-2-1.service + CONSUMER_SERVICE_2: v400-2-2.service + CONSUMER_SERVICE_3: v400-2-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Consumer chain produces blocks> ICS v4.0.0 chain 2 + env: + CON1_RPC_PORT: 40221 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for v400-two + env: + CONSUMER_CHAIN_ID: v400-two + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json + rly transact connection v400-1 + rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _CCV channel verified> ICS v4.0.0 chain 2 + env: + CONSUMER_HOME_1: /home/runner/.v400-2-1 + CON1_RPC_PORT: 40221 + run: tests/test_ccv_key_assignment.sh + - name: _IBC transfer successful> ICS v4.0.0 chain 2 + env: + CONSUMER_CHAIN_ID: v400-two + CONSUMER_HOME_1: /home/runner/.v400-2-1 + RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc + run: | + export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Stop validator services + env: + CONSUMER_SERVICE_2: v400-2-2.service + CONSUMER_SERVICE_3: v400-2-3.service + run: | + sudo systemctl disable $CONSUMER_SERVICE_2 --now + sudo systemctl disable $CONSUMER_SERVICE_3 --now + sleep $(($COMMIT_TIMEOUT*30)) + - name: _Soft opt-out test> Validator must be jailed - 1 + run: tests/test_validator_jailed.sh $VALOPER_2 true + - name: _Soft opt-out test> Validator must not be jailed + run: tests/test_validator_jailed.sh $VALOPER_3 false + - name: Unjail validator + env: + CONSUMER_SERVICE_2: v400-2-2.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_2 --now + sleep $(($COMMIT_TIMEOUT*10)) + $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 + sleep $(($COMMIT_TIMEOUT*2)) + - name: _Soft opt-out test> Validator must be unjailed + run: tests/test_validator_jailed.sh $VALOPER_2 false + + Baseline-5-pfm: + runs-on: ubuntu-22.04 + needs: set-version-matrix-relayer + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Select Hermes + if: ${{ matrix.relayer == 'hermes' }} + run: echo "RELAYER=hermes" >> $GITHUB_ENV + - name: Select Go Relayer + if: ${{ matrix.relayer == 'rly' }} + run: echo "RELAYER=rly" >> $GITHUB_ENV + - name: Set up relayer + run: scripts/setup_relayer.sh + - name: Start PFM chain 1 + env: + START_VERSION: ${{matrix.gaia_version}} + PFM_SERVICE: pfm_1.service + PFM_HOME: /home/runner/.pfm1 + PFM_CHAIN_ID: pfm1 + PFM_API_PORT: 25011 + PFM_GRPC_PORT: 26011 + PFM_RPC_PORT: 27011 + PFM_P2P_PORT: 28011 + PFM_PPROF_PORT: 29011 + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_pfm_chain.sh + sleep 5 + - name: Block production check + env: + PFM_RPC_PORT: 27011 + run: | + journalctl -u pfm_1.service | tail -n 100 + tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks + + - name: Start PFM chain 2 + env: + START_VERSION: ${{matrix.gaia_version}} + PFM_SERVICE: pfm_2.service + PFM_HOME: /home/runner/.pfm2 + PFM_CHAIN_ID: pfm2 + PFM_API_PORT: 25012 + PFM_GRPC_PORT: 26012 + PFM_RPC_PORT: 27012 + PFM_P2P_PORT: 28012 + PFM_PPROF_PORT: 29012 + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_pfm_chain.sh + sleep 5 + - name: Block production check + env: + PFM_RPC_PORT: 27012 + run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks + + - name: Start PFM chain 3 + env: + START_VERSION: ${{matrix.gaia_version}} + PFM_SERVICE: pfm_3.service + PFM_HOME: /home/runner/.pfm3 + PFM_CHAIN_ID: pfm3 + PFM_API_PORT: 25013 + PFM_GRPC_PORT: 26013 + PFM_RPC_PORT: 27013 + PFM_P2P_PORT: 28013 + PFM_PPROF_PORT: 29013 + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_pfm_chain.sh + sleep 5 + - name: Block production check + env: + PFM_RPC_PORT: 27013 + run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks + + - name: Create transfer channels for PFM test + run: | + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json + if [ $RELAYER == "hermes" ]; then + echo "Creating channels with Hermes..." + hermes create channel --new-client-connection --a-chain $CHAIN_ID --b-chain pfm1 --a-port transfer --b-port transfer --yes + hermes create channel --new-client-connection --a-chain pfm1 --b-chain pfm2 --a-port transfer --b-port transfer --yes + hermes create channel --new-client-connection --a-chain pfm2 --b-chain pfm3 --a-port transfer --b-port transfer --yes + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + echo "Paths" + rly paths new testnet pfm1 pfm-path-1 + rly paths new pfm1 pfm2 pfm-path-2 + rly paths new pfm2 pfm3 pfm-path-3 + echo "Clients" + rly transact client testnet pfm1 pfm-path-1 + rly transact client pfm1 pfm2 pfm-path-2 + rly transact client pfm2 pfm3 pfm-path-3 + sleep 5 + echo "Connections" + rly transact connection pfm-path-1 + rly transact connection pfm-path-2 + rly transact connection pfm-path-3 + sleep 5 + echo "Channels" + rly transact channel pfm-path-1 + rly transact channel pfm-path-2 + rly transact channel pfm-path-3 + fi + sudo systemctl restart $RELAYER + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json + # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json + - name: _Test PFM transfers + env: + PFM_HOME: /home/runner/.pfm3 + run: | + tests/test_pfm_transfers.sh + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + - name: Restart relayer + run: sudo systemctl restart $RELAYER + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + - name: _Transactions verified> bank send, delegate, and withdraw rewards + run: tests/test_tx_fresh.sh + - name: _API endpoints check + run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT + - name: _RPC endpoints check + run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT + - name: _Test PFM transfers + env: + PFM_HOME: /home/runner/.pfm3 + run: | + tests/test_pfm_transfers.sh + + Baseline-6-lsm: + runs-on: ubuntu-22.04 + needs: set-version-matrix-relayer + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + # Consumer chain variables + RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + # Reference ICS chain variables + ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd + ICS_TRANSFORM_BINARY: cd-transform + STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Select Hermes + if: ${{ matrix.relayer == 'hermes' }} + run: echo "RELAYER=hermes" >> $GITHUB_ENV + - name: Select Go Relayer + if: ${{ matrix.relayer == 'rly' }} + run: echo "RELAYER=rly" >> $GITHUB_ENV + - name: Set up relayer + run: scripts/setup_relayer.sh + - name: Download consumer chain binaries + run: | + wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q + chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY + - name: Install Stride binary + run: | + go version + git clone https://github.com/Stride-Labs/stride.git + cd stride + git checkout v22.0.0 + make install + - name: Consumer chain binary version + run: | + echo "$STRIDE_BINARY runs off $($STRIDE_BINARY version)" + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Add Stride consumer chain + env: + CONSUMER_CHAIN_ID: stride-test + run: | + scripts/add_consumer.sh + - name: Initialize Stride consumer chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_DENOM: ustrd + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_HOME_2: /home/runner/.stride-2 + CONSUMER_HOME_3: /home/runner/.stride-3 + CONSUMER_SERVICE_1: stride-1.service + CONSUMER_SERVICE_2: stride-2.service + CONSUMER_SERVICE_3: stride-3.service + CON1_API_PORT: 32301 + CON2_API_PORT: 32302 + CON3_API_PORT: 32303 + CON1_GRPC_PORT: 32311 + CON2_GRPC_PORT: 32312 + CON3_GRPC_PORT: 32313 + CON1_RPC_PORT: 32321 + CON2_RPC_PORT: 32322 + CON3_RPC_PORT: 32323 + CON1_P2P_PORT: 32331 + CON2_P2P_PORT: 32332 + CON3_P2P_PORT: 32333 + CON1_PPROF_PORT: 32341 + CON2_PPROF_PORT: 32342 + CON3_PPROF_PORT: 32343 + DOWNTIME_BLOCKS: 100000 + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain stride-test + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_HOME_2: /home/runner/.stride-2 + CONSUMER_HOME_3: /home/runner/.stride-3 + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain stride-test + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_SERVICE_1: stride-1.service + CONSUMER_SERVICE_2: stride-2.service + CONSUMER_SERVICE_3: stride-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Pre-upgrade consumer chain produces blocks> Stride chain + env: + CON1_RPC_PORT: 32321 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > stride-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' stride-1.json > stride-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID stride --file stride-2.json + rly transact connection stride + rly transact channel stride --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _Pre-upgrade CCV channel verified> Stride chain + env: + CONSUMER_HOME_1: /home/runner/.stride-1 + CON1_RPC_PORT: 32321 + run: tests/test_ccv_key_assignment.sh + - name: _Pre-upgrade IBC transfer successful> Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_CHAIN_BINARY: strided + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_DENOM: ustrd + RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + - name: Register and fund ICA + env: + ICA_CHAIN_HOME: /home/runner/.stride-1 + run: scripts/setup_ica.sh + - name: Set up happy path LSM accounts + run: | + scripts/lsm_account_setup.sh + - name: Set test LSM params + run: | + scripts/param_change.sh templates/proposal-global-liquid-cap.json + scripts/param_change.sh templates/proposal-validator-liquid-cap.json + scripts/param_change.sh templates/proposal-validator-bond-factor.json + - name: Create LSM log file + run: | + touch lsm_log.csv + echo "user flow,action,account,amount,balance,del_shares,del_balance,val1_tokens,val1_shares,val1_bond_shares,val1_liquid_shares,val2_tokens,val2_shares,val2_bond_shares,val2_liquid_shares" >> lsm_log.csv + - name: _Pre-upgrade LSM happy path + env: + BASE_FEES: 3000 + CONSUMER_FEES: 1000 + CONSUMER_CHAIN_ID: stride-test + STRIDE_HOME_1: /home/runner/.stride-1 + VALOPER_TOKENIZATION: 1 + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + export IBC_CHANNEL=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_lsm_happy_path.sh + - name: _Pre-upgrade LSM Liquid Staking Provider happy path + env: + STRIDE_HOME_1: /home/runner/.stride-1 + LSP_COUNT: 1 + COSMOS_SDK: v45 + run: tests/test_ica_delegate_happy.sh + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Set blocks_per_epoch to 1 + run: | + scripts/param_change.sh templates/proposal-blocks-per-epoch.json + + - name: Restart relayer + run: sudo systemctl restart $RELAYER + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _CCV channel verified> Stride chain + env: + CONSUMER_HOME_1: /home/runner/.stride-1 + CON1_RPC_PORT: 32321 + run: tests/test_ccv_key_assignment.sh + - name: _IBC transfer successful> Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_CHAIN_BINARY: strided + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_DENOM: ustrd + RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + - name: _LSM happy path + env: + BASE_FEES: 3000 + CONSUMER_FEES: 1000 + CONSUMER_CHAIN_ID: stride-test + STRIDE_HOME_1: /home/runner/.stride-1 + VALOPER_TOKENIZATION: 2 + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + export IBC_CHANNEL=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_lsm_happy_path.sh + - name: _LSM Liquid Staking Provider happy path + env: + STRIDE_HOME_1: /home/runner/.stride-1 + LSP_COUNT: 2 + COSMOS_SDK: v47 + run: tests/test_ica_delegate_happy.sh + + Baseline-7-mainnet-consumer-chains: + runs-on: ubuntu-22.04 + needs: set-version-matrix-relayer + strategy: + matrix: + ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} + fail-fast: false + env: + COSMOVISOR_VERSION: ${{ matrix.cv_version }} + UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} + # Consumer chain variables + RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + # Reference ICS chain variables + ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd + ICS_TRANSFORM_BINARY: cd-transform + STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 + steps: + - name: start-version + run: echo ${{matrix.gaia_version}} + - name: target-version + run: echo ${{matrix.upgrade_version}} + - name: target-commit + if: ${{ matrix.upgrade_version == 'main' }} + run: | + BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} + TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') + echo TARGET_COMMIT: $TARGET_COMMIT + - name: Update PATH + run: | + mkdir -p $HOME/go/bin + echo "$HOME/go/bin" >> $GITHUB_PATH + echo "$HOME/.hermes" >> $GITHUB_PATH + echo "$HOME/.relayer" >> $GITHUB_PATH + - name: Bypass the grub-efi-amd64-signed package + run: sudo apt-mark hold grub-efi-amd64-signed + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install toml-cli + - name: Install Cosmovisor > v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} + run: | + go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Install Cosmovisor v1.3.0 + if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} + run: | + go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION + echo "COSMOVISOR=true" >> $GITHUB_ENV + echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH + - name: Select Hermes + if: ${{ matrix.relayer == 'hermes' }} + run: echo "RELAYER=hermes" >> $GITHUB_ENV + - name: Select Go Relayer + if: ${{ matrix.relayer == 'rly' }} + run: echo "RELAYER=rly" >> $GITHUB_ENV + - name: Set up relayer + run: scripts/setup_relayer.sh + - name: Download consumer chain binaries + run: | + wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q + chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY + - name: Install Neutron binary + run: | + go version + git clone https://github.com/neutron-org/neutron.git + cd neutron + git checkout v3.0.2 + make install + - name: Install Stride binary + run: | + go version + git clone https://github.com/Stride-Labs/stride.git + cd stride + git checkout v22.0.0 + make install + + - name: Consumer chain binary URLs + run: | + echo "$NEUTRON_BINARY runs $($NEUTRON_BINARY version)" + echo "$STRIDE_BINARY runs off $($STRIDE_BINARY version)" + - name: Start chain + env: + START_VERSION: ${{matrix.gaia_version}} + run: | + export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 + scripts/start_chain.sh + - name: Check Gaia log + run: sudo journalctl -u $PROVIDER_SERVICE_1 + - name: Print Gaia version + run: $CHAIN_BINARY version --long + - name: Block production check + run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks + + - name: Add Neutron consumer chain + env: + CONSUMER_CHAIN_ID: neutron-test + run: | + scripts/add_consumer.sh + - name: Initialize Neutron consumer chain + env: + CONSUMER_CHAIN_ID: neutron-test + CONSUMER_DENOM: untrn + CONSUMER_HOME_1: /home/runner/.neutron-1 + CONSUMER_HOME_2: /home/runner/.neutron-2 + CONSUMER_HOME_3: /home/runner/.neutron-3 + CONSUMER_SERVICE_1: neutron-1.service + CONSUMER_SERVICE_2: neutron-2.service + CONSUMER_SERVICE_3: neutron-3.service + CON1_API_PORT: 31301 + CON2_API_PORT: 31302 + CON3_API_PORT: 31303 + CON1_GRPC_PORT: 31311 + CON2_GRPC_PORT: 31312 + CON3_GRPC_PORT: 31313 + CON1_RPC_PORT: 31321 + CON2_RPC_PORT: 31322 + CON3_RPC_PORT: 31323 + CON1_P2P_PORT: 31331 + CON2_P2P_PORT: 31332 + CON3_P2P_PORT: 31333 + CON1_PPROF_PORT: 31341 + CON2_PPROF_PORT: 31342 + CON3_PPROF_PORT: 31343 + DOWNTIME_BLOCKS: 100000 + run: | + export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain neutron-test + env: + CONSUMER_CHAIN_ID: neutron-test + CONSUMER_HOME_1: /home/runner/.neutron-1 + CONSUMER_HOME_2: /home/runner/.neutron-2 + CONSUMER_HOME_3: /home/runner/.neutron-3 + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + run: | + export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain neutron-test + env: + CONSUMER_CHAIN_ID: neutron-test + CONSUMER_SERVICE_1: neutron-1.service + CONSUMER_SERVICE_2: neutron-2.service + CONSUMER_SERVICE_3: neutron-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Pre-upgrade consumer chain produces blocks> Neutron chain + env: + CON1_RPC_PORT: 31321 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for Neutron chain + env: + CONSUMER_CHAIN_ID: neutron-test + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > neutron-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' neutron-1.json > neutron-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID neutron --file neutron-2.json + rly transact connection neutron + rly transact channel neutron --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _Pre-upgrade CCV channel verified> Neutron chain + env: + CONSUMER_HOME_1: /home/runner/.neutron-1 + CON1_RPC_PORT: 31321 + run: tests/test_ccv_key_assignment.sh + - name: _Pre-upgrade IBC transfer successful> Neutron chain + env: + CONSUMER_CHAIN_ID: neutron-test + CONSUMER_CHAIN_BINARY: neutrond + CONSUMER_HOME_1: /home/runner/.neutron-1 + CONSUMER_DENOM: untrn + RECIPIENT: neutron1r5v5srda7xfth3hn2s26txvrcrntldjul5wedc + GAS_PRICE: 0.02 + run: | + export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Add Stride consumer chain + env: + CONSUMER_CHAIN_ID: stride-test + run: | + scripts/add_consumer.sh + - name: Initialize Stride consumer chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_DENOM: ustrd + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_HOME_2: /home/runner/.stride-2 + CONSUMER_HOME_3: /home/runner/.stride-3 + CONSUMER_SERVICE_1: stride-1.service + CONSUMER_SERVICE_2: stride-2.service + CONSUMER_SERVICE_3: stride-3.service + CON1_API_PORT: 32301 + CON2_API_PORT: 32302 + CON3_API_PORT: 32303 + CON1_GRPC_PORT: 32311 + CON2_GRPC_PORT: 32312 + CON3_GRPC_PORT: 32313 + CON1_RPC_PORT: 32321 + CON2_RPC_PORT: 32322 + CON3_RPC_PORT: 32323 + CON1_P2P_PORT: 32331 + CON2_P2P_PORT: 32332 + CON3_P2P_PORT: 32333 + CON1_PPROF_PORT: 32341 + CON2_PPROF_PORT: 32342 + CON3_PPROF_PORT: 32343 + DOWNTIME_BLOCKS: 100000 + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + scripts/init_consumer_assign_keys.sh + sleep 20 + - name: Prepare consumer chain stride-test + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_HOME_2: /home/runner/.stride-2 + CONSUMER_HOME_3: /home/runner/.stride-3 + CONSUMER_ICS: v4.0.0 + PROVIDER_ICS: v3.3.0 + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + scripts/prepare_consumer.sh + - name: Start consumer chain stride-test + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_SERVICE_1: stride-1.service + CONSUMER_SERVICE_2: stride-2.service + CONSUMER_SERVICE_3: stride-3.service + run: | + sudo systemctl enable $CONSUMER_SERVICE_1 --now + sleep 5 + journalctl -u $CONSUMER_SERVICE_1 + - name: _Pre-upgrade consumer chain produces blocks> Stride chain + env: + CON1_RPC_PORT: 32321 + run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 + - name: Establish CCV channel for Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + run: | + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + if [ $RELAYER == "hermes" ]; then + echo "Creating channel with Hermes..." + hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id + hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 + elif [ $RELAYER == "rly" ]; then + echo "Creating channel with Go relayer..." + jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > stride-1.json + jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' stride-1.json > stride-2.json + rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID stride --file stride-2.json + rly transact connection stride + rly transact channel stride --src-port consumer --dst-port provider --order ordered --version 1 + fi + sudo systemctl restart $RELAYER + sleep 10 + - name: _Pre-upgrade CCV channel verified> Stride chain + env: + CONSUMER_HOME_1: /home/runner/.stride-1 + CON1_RPC_PORT: 32321 + run: tests/test_ccv_key_assignment.sh + - name: _Pre-upgrade IBC transfer successful> Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_CHAIN_BINARY: strided + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_DENOM: ustrd + RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: Test software upgrade for published releases + if: ${{ matrix.upgrade_version != 'main' }} + env: + DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 + run: | + echo $DOWNLOAD_URL + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + - name: Test software upgrade for main branch + if: ${{ matrix.upgrade_version == 'main' }} + env: + DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux + run: | + scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION + + - name: _Blocks produced after upgrade + run: | + tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 + + - name: Set blocks_per_epoch to 1 + run: | + scripts/param_change.sh templates/proposal-blocks-per-epoch.json + + - name: Restart relayer + run: sudo systemctl restart $RELAYER + + - name: Flush "migration successful" lines + run: | + $CHAIN_BINARY keys list --home $HOME_1 + + - name: _CCV channel verified> Neutron chain + env: + CONSUMER_HOME_1: /home/runner/.neutron-1 + CON1_RPC_PORT: 31321 + run: tests/test_ccv_key_assignment.sh + + - name: _CCV channel verified> Stride chain + env: + CONSUMER_HOME_1: /home/runner/.stride-1 + CON1_RPC_PORT: 32321 + run: tests/test_ccv_key_assignment.sh + + - name: _IBC transfer successful> Neutron chain + env: + CONSUMER_CHAIN_ID: neutron-test + CONSUMER_CHAIN_BINARY: neutrond + CONSUMER_HOME_1: /home/runner/.neutron-1 + CONSUMER_DENOM: untrn + RECIPIENT: neutron1r5v5srda7xfth3hn2s26txvrcrntldjul5wedc + GAS_PRICE: 0.02 + run: | + export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id + + - name: _IBC transfer successful> Stride chain + env: + CONSUMER_CHAIN_ID: stride-test + CONSUMER_CHAIN_BINARY: strided + CONSUMER_HOME_1: /home/runner/.stride-1 + CONSUMER_DENOM: ustrd + RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn + run: | + export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY + client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') + connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') + channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') + tests/test_consumer_ibc_transfer.sh $channel_id diff --git a/tests/gaia-v16/test_ibc_fee.sh b/tests/gaia-v16/test_ibc_fee.sh index 365cc799..4e0cc873 100755 --- a/tests/gaia-v16/test_ibc_fee.sh +++ b/tests/gaia-v16/test_ibc_fee.sh @@ -4,7 +4,7 @@ ACK_FEE=456 balance_before=$($CHAIN_BINARY q bank balances $WALLET_RELAYER --home $HOME_1 -o json | jq -r --arg DENOM "$DENOM" '.balances[] | select(.denom == $DENOM).amount') -$RELAYER --json create channel --order unordered --a-chain $CHAIN_ID --a-port transfer --b-port transfer --a-connection connection-0 --channel-version "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}" +hermes --json create channel --order unordered --a-chain $CHAIN_ID --a-port transfer --b-port transfer --a-connection connection-0 --channel-version "{\"fee_version\":\"ics29-1\",\"app_version\":\"ics20-1\"}" txhash=$($CHAIN_BINARY tx ibc-transfer transfer transfer channel-0 $WALLET_1 1$DENOM --gas $GAS --gas-prices $GAS_PRICE$DENOM --gas-adjustment $GAS_ADJUSTMENT --from $WALLET_1 --output json -y --home $HOME_1 | jq -r '.txhash') sleep $COMMIT_TIMEOUT @@ -18,8 +18,8 @@ difference=$(echo "$balance_after - $balance_before" | bc) echo "Difference: ${difference}$DENOM" if [ $difference == $ACK_FEE ]; then - echo "PASS: Relayer balance increased by the ACK FEE." + echo "PASS: Relayer balance increased by ACK_FEE." else - echo "FAIL: Relayer balance did not increase by the ACK FEE." + echo "FAIL: Relayer balance did not increase by ACK_FEE." exit 1 fi \ No newline at end of file