start node in tmux session #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Gaia v22 Upgrade - Serviceless | |
on: | |
# repository_dispatch: | |
# types: [new_main_build] | |
# schedule: | |
# - cron: '0 6,14 * * 1-6' | |
workflow_dispatch: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
# Versions | |
VERSION_CUTOFF: v21.0.1 | |
TARGET_VERSION: v22 | |
# # All chain variables | |
# COMMIT_TIMEOUT: 5 | |
# DOWNTIME_BLOCKS: 10000 | |
# # Provider chain variables | |
# CHAIN_BINARY: gaiad | |
# BINARY_SOURCE: BUILD | |
# # BINARY_SOURCE: DOWNLOAD | |
# BUILD_TAG: main | |
# CHAIN_ID: testnet | |
# DENOM: uatom | |
# BASE_FEES: 2000 | |
# HIGH_FEES: 10000 | |
# GAS: auto | |
# GAS_ADJUSTMENT: 2 | |
# GAS_PRICE: 0.005 | |
# VOTING_PERIOD: 10s | |
# COSMOS_SDK: v50 | |
# COSMOVISOR: false | |
# # Provider nodes variables | |
# HOME_1: /home/runner/.val1 | |
# HOME_2: /home/runner/.val2 | |
# HOME_3: /home/runner/.val3 | |
# PROVIDER_SERVICE_1: gaia1.service | |
# PROVIDER_SERVICE_2: gaia2.service | |
# PROVIDER_SERVICE_3: gaia3.service | |
# MNEMONIC_1: abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art | |
# MNEMONIC_2: abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon cabbage abandon garage | |
# MNEMONIC_3: abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon cash abandon earth | |
# MNEMONIC_RELAYER: abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon success | |
# MNEMONIC_4: abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon property abandon success | |
# MNEMONIC_5: abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon fame abandon claim | |
# MONIKER_1: val1 | |
# MONIKER_2: val2 | |
# MONIKER_3: val3 | |
# MONIKER_RELAYER: relayer | |
# MONIKER_4: relayer | |
# MONIKER_5: wallet5 | |
# VALOPER_1: cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv | |
# VALOPER_2: cosmosvaloper1ay4dpm0kjmvtpug28vgw5w32yyjxa5spq248vn | |
# VALOPER_3: cosmosvaloper1v8zgdpzqfazvk6fgwhqqhzx0hfannrajukgdkc | |
# WALLET_1: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl | |
# WALLET_2: cosmos1ay4dpm0kjmvtpug28vgw5w32yyjxa5sp97pjqq | |
# WALLET_3: cosmos1v8zgdpzqfazvk6fgwhqqhzx0hfannrajezuc6t | |
# WALLET_4: cosmos1ty2qlurqsxj6sgs378hxmzyxh0ds8ukc70w844 | |
# WALLET_5: cosmos17n3vkvg6lwf98p3kanlhlyjk6zkrfla9pgh8fk | |
# WALLET_6: cosmos1jf7j9nvjmnflal5ehaj25p7nsk2t3lkd3tj7zp | |
# WALLET_RELAYER: cosmos1ty2qlurqsxj6sgs378hxmzyxh0ds8ukc70w844 | |
# VAL1_STAKE: 800000000 | |
# VAL2_STAKE: 200000000 | |
# VAL3_STAKE: 10000000 | |
# VAL_FUNDS: 11000000000 | |
# VAL_STAKE: 1000000000 | |
# VAL_STAKE_STEP: 1000000 | |
# VAL1_API_PORT: 25001 | |
# VAL2_API_PORT: 25002 | |
# VAL3_API_PORT: 25003 | |
# VAL1_GRPC_PORT: 26001 | |
# VAL2_GRPC_PORT: 26002 | |
# VAL3_GRPC_PORT: 26003 | |
# VAL1_RPC_PORT: 27001 | |
# VAL2_RPC_PORT: 27002 | |
# VAL3_RPC_PORT: 27003 | |
# VAL1_P2P_PORT: 28001 | |
# VAL2_P2P_PORT: 28002 | |
# VAL3_P2P_PORT: 28003 | |
# VAL1_PPROF_PORT: 29001 | |
# VAL2_PPROF_PORT: 29002 | |
# VAL3_PPROF_PORT: 29003 | |
# # Consumer chain variables | |
# ICS_120: false | |
# ICS_200: false | |
# ICS_310: false | |
# ICS_320: false | |
# ICS_330: false | |
# ICS_400: false | |
# RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl | |
# PSS_ENABLED: true | |
# PROVIDER_ICS: v4.2.0 | |
# TOPN: 0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_GAS_PRICE: 0.005 | |
# 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_v4.0.0 | |
# CONSUMER_CHAIN_V400_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v4.0.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V400_BINARY: consumerd_v4.0.0 | |
# CONSUMER_CHAIN_V450_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v4.5.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V450_BINARY: consumerd_v4.5.0 | |
# SOVEREIGN_CHAIN_V450_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v4.5.0/interchain-security-sd-linux | |
# SOVEREIGN_CHAIN_V450_BINARY: consumersd_v4.5.0 | |
# CHANGEOVER_CHAIN_V450_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v4.5.0/interchain-security-cdd-linux | |
# CHANGEOVER_CHAIN_V450_BINARY: consumerdd_v4.5.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 | |
# # Stride chain variables | |
# STRIDE_CHAIN_BINARY: strided | |
# STRIDE_VERSION: v24.0.0 | |
# STRIDE_CHAIN_ID: stride-test | |
# STRIDE_DENOM: ustrd | |
# STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 | |
# # Neutron chain variables | |
# NEUTRON_CHAIN_BINARY: neutrond | |
# NEUTRON_VERSION: v4.2.4 | |
# NEUTRON_CHAIN_ID: neutron-test | |
# NEUTRON_DENOM: untrn | |
# # Relayer variables | |
# RELAYER: hermes | |
# HERMES_VERSION: v1.10.2 | |
# RLY_VERSION: "2.5.0" | |
jobs: | |
set-version-matrix: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Get system info | |
- run: ifconfig | |
- run: arp -a | |
- run: sudo dmidecode | |
- run: df -h | |
- run: free -m | |
- run: uname -a | |
- run: lsb_release -a | |
- run: echo "GitHub branch is ${{ github.ref }}" | |
- run: whoami | |
- run: pwd | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install requests | |
- name: Generate starting versions | |
id: generate-start | |
run: | | |
start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF) | |
echo $start | |
echo "start_versions=$start" >> $GITHUB_OUTPUT | |
- name: Generate upgrade versions | |
id: generate-upgrade | |
run: | | |
upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF) | |
echo $upgrade | |
echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT | |
outputs: | |
upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }} | |
# set-version-matrix-cosmovisor: | |
# runs-on: ubuntu-22.04 | |
# steps: | |
# # Get system info | |
# - run: ifconfig | |
# - run: arp -a | |
# - run: sudo dmidecode | |
# - run: df -h | |
# - run: free -m | |
# - run: uname -a | |
# - run: lsb_release -a | |
# - run: echo "GitHub branch is ${{ github.ref }}" | |
# - run: whoami | |
# - run: pwd | |
# - name: Check out repository code | |
# uses: actions/checkout@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install requests | |
# - name: Generate starting versions | |
# id: generate-start | |
# run: | | |
# start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF) | |
# echo $start | |
# echo "start_versions=$start" >> $GITHUB_OUTPUT | |
# - name: Generate upgrade versions | |
# id: generate-upgrade | |
# run: | | |
# upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF -c) | |
# echo $upgrade | |
# echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT | |
# outputs: | |
# upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }} | |
# set-version-matrix-relayer: | |
# runs-on: ubuntu-22.04 | |
# steps: | |
# # Get system info | |
# - run: ifconfig | |
# - run: arp -a | |
# - run: sudo dmidecode | |
# - run: df -h | |
# - run: free -m | |
# - run: uname -a | |
# - run: lsb_release -a | |
# - run: echo "GitHub branch is ${{ github.ref }}" | |
# - run: whoami | |
# - run: pwd | |
# - name: Check out repository code | |
# uses: actions/checkout@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install requests | |
# - name: Generate starting versions | |
# id: generate-start | |
# run: | | |
# start=$(scripts/generate_version_matrix.py $VERSION_CUTOFF) | |
# echo $start | |
# echo "start_versions=$start" >> $GITHUB_OUTPUT | |
# - name: Generate upgrade versions | |
# id: generate-upgrade | |
# run: | | |
# upgrade=$(scripts/generate_upgrade_matrix_fresh.py $VERSION_CUTOFF -r) | |
# echo $upgrade | |
# echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT | |
# outputs: | |
# upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }} | |
Baseline-1-upgrade: | |
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@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install toml-cli | |
- name: Load variables | |
env: | |
START_VERSION: ${{matrix.gaia_version}} | |
run: | | |
scripts/github_vars.sh | |
echo "CHAIN_VERSION=$START_VERSION" >> $GITHUB_ENV | |
echo "UPGRADE_VERSION=$TARGET_VERSION" >> $GITHUB_ENV | |
echo "CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64" >> $GITHUB_ENV | |
# - 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 | |
run: | | |
echo "Start version: $START_VERSION" | |
echo "Binary URL: $CHAIN_BINARY_URL" | |
scripts/setup.sh | |
./start.sh | |
sleep 5 | |
tail -n 100 log_001 | |
- name: Confirm chain is online | |
run: | | |
scripts/wait_for_block.sh 3 | |
- name: Confirm all validators are signing | |
run: | | |
scripts/check_signatures.sh | |
- name: Load state | |
run: | | |
scripts/load_state.sh | |
- name: Set source to build | |
if: ${{ matrix.upgrade_version == 'main' }} | |
run: echo "UPGRADE_BINARY_SOURCE=BUILD" >> $GITHUB_ENV | |
- 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 "UPGRADE_VERSION=${{ matrix.upgrade_version }}" >> $GITHUB_ENV | |
echo "UPGRADE_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$UPGRADE_VERSION/gaiad-$UPGRADE_VERSION-linux-amd64" >> $GITHUB_ENV | |
scripts/upgrade.sh | |
- name: Test software upgrade for main branch | |
if: ${{ matrix.upgrade_version == 'main' }} | |
run: | | |
echo "UPGRADE_VERSION=${{ matrix.upgrade_version }}" >> $GITHUB_ENV | |
# echo "UPGRADE_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$UPGRADE_VERSION/gaiad-$UPGRADE_VERSION-linux-amd64" >> $GITHUB_ENV | |
# echo "UPGRADE_BINARY_SOURCE=BUILD" >> $GITHUB_ENV | |
echo $UPGRADE_BINARY_SOURCE | |
scripts/upgrade.sh | |
- name: Confirm chain is online | |
run: | | |
height=$(curl -s http://localhost:${rpc_prefix}001/block | jq -r .result.block.header.height) | |
target_height=$(($height+5)) | |
scripts/wait_for_block.sh $target_height | |
- name: Confirm all validators are signing | |
run: | | |
scripts/check_signatures.sh | |
- name: Test snapshot sync | |
run: | | |
tests/test_snapshot_sync.sh | |
- name: Test state sync | |
run: | | |
scripts/setup_state_sync_node.sh | |
tests/test_state_sync.sh | |
# Baseline-2-ics-optin: | |
# 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: v4.1.1 | |
# # 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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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 $CONSUMER_CHAIN_V450_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V450_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V450_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 | |
# # PSS_ENABLED: true | |
# # COSMOS_SDK: v50 | |
# # run: | | |
# # scripts/add_consumer_optin.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_permissionless.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.1.1 | |
# # PROVIDER_ICS: v4.2.0 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# # scripts/prepare_consumer_permissionless.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 | |
# # $CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.' | |
# # - 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: Register consumer reward denoms | |
# # env: | |
# # CONSUMER_DENOM: ucon | |
# # CONSUMER_HOME_1: /home/runner/.v400-1-1 | |
# # run: | | |
# # CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# # echo "> Consumer rewards pool balances:" | |
# # $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# # last_channel=$($CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.channels[1].channel_id') | |
# # echo "> Last channel: $last_channel" | |
# # denom_400=$(echo -n "transfer/${last_channel}/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# # echo "> Denom: $denom_400" | |
# # scripts/change_denoms.sh $denom_400 | |
# # $CHAIN_BINARY q provider registered-consumer-reward-denoms --home $HOME_1 -o json | jq '.' | |
# # $CONSUMER_CHAIN_BINARY tx bank send consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc consumer1ay4dpm0kjmvtpug28vgw5w32yyjxa5spqtvan8 1$CONSUMER_DENOM \ | |
# # --from consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc \ | |
# # --gas auto --gas-prices $CONSUMER_GAS_PRICE$CONSUMER_DENOM --gas-adjustment 2 \ | |
# # --home $CONSUMER_HOME_1 -o json -y | jq '.' | |
# # sleep 30 | |
# # - name: Print outstanding rewards | |
# # run: | | |
# # echo "> Consumer rewards pool balances:" | |
# # $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# # echo "> Validator outstanding rewards:" | |
# # $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# - 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: _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: _Downtime test> val3 must not be jailed | |
# # run: | | |
# # tests/test_validator_jailed.sh $VALOPER_3 null | |
# - name: Add consumer chain with ICS v4.5.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# PSS_ENABLED: true | |
# COSMOS_SDK: v50 | |
# run: | | |
# $CHAIN_BINARY q ibc channel channels --home $HOME_1 | |
# export IBC_DENOM_1=ibc/$(echo -n "transfer/channel-3/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# export IBC_DENOM_2=ibc/$(echo -n "transfer/channel-4/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# scripts/add_consumer_optin_allowlist.sh | |
# - name: Initialize consumer chain with ICS v4.5.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-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_V450_BINARY | |
# scripts/init_consumer_permissionless.sh | |
# sleep 30 | |
# - name: Prepare consumer chain v450-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v4.2.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# scripts/prepare_consumer_permissionless.sh | |
# - name: Start consumer chain v450-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-2-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl enable $CONSUMER_SERVICE_3 --now | |
# sleep 10 | |
# echo "val1:" | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# echo "val2:" | |
# journalctl -u $CONSUMER_SERVICE_2 | |
# echo "val3:" | |
# journalctl -u $CONSUMER_SERVICE_3 | |
# - name: _Consumer chain produces blocks> ICS v4.5.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 v450-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# run: | | |
# $CHAIN_BINARY q ibc channel channels --home $HOME_1 | |
# 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.5.0 chain 2 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CON1_RPC_PORT: 40221 | |
# CON1_P2P_PORT: 40231 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v4.5.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc | |
# run: | | |
# $CHAIN_BINARY q ibc channel channels --home $HOME_1 | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_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: Trigger consumer rewards distribution> ICS v4.5.0 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CON1_RPC_PORT: 40221 | |
# CON1_P2P_PORT: 40231 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# echo "> Consumer rewards pool balances:" | |
# $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# echo "> Val1 outstanding rewards:" | |
# $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# echo "> Send tx with high fees in consumer chain." | |
# $CONSUMER_CHAIN_BINARY tx bank send consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc consumer1ay4dpm0kjmvtpug28vgw5w32yyjxa5spqtvan8 1$CONSUMER_DENOM \ | |
# --from consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc \ | |
# --gas auto --gas-prices $CONSUMER_GAS_PRICE$CONSUMER_DENOM --gas-adjustment 2 \ | |
# --home $CONSUMER_HOME_1 -o json -y | jq '.' | |
# sleep 30 | |
# echo "> Balance in consumer chain recipient:" | |
# $CONSUMER_CHAIN_BINARY q bank balances consumer1ay4dpm0kjmvtpug28vgw5w32yyjxa5spqtvan8 --home $CONSUMER_HOME_1 -o json | jq '.' | |
# echo "> Val1 outstanding rewards:" | |
# $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# - name: Register consumer reward denoms | |
# env: | |
# CONSUMER_DENOM: ucon | |
# run: | | |
# last_channel=$($CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.channels[-1].channel_id') | |
# echo "> Last channel: $last_channel" | |
# denom_450=$(echo -n "transfer/${last_channel}/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# echo "> Denom: $denom_450" | |
# scripts/change_denoms.sh $denom_450 | |
# $CHAIN_BINARY q provider registered-consumer-reward-denoms --home $HOME_1 -o json | jq '.' | |
# - name: _Consumer rewards distribution> ICS v4.5.0 | |
# run: | | |
# last_channel=$($CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.channels[-1].channel_id') | |
# ibc_denom=ibc/$(echo -n "transfer/${last_channel}/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# echo "> Denom: $ibc_denom" | |
# echo "> Consumer rewards pool balances:" | |
# $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# echo "> Val1 outstanding rewards:" | |
# $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# val1_rewards=$(curl -s http://localhost:$VAL1_API_PORT/cosmos/distribution/v1beta1/validators/$VALOPER_1/outstanding_rewards | jq -r '.rewards.rewards') | |
# echo "> val1_rewards: $val1_rewards" | |
# val1_consumer_rewards=$(echo $val1_rewards | jq -r --arg DENOM "$ibc_denom" '.[] | select(.denom==$DENOM).amount') | |
# echo "> val1_consumer_rewards: $val1_consumer_rewards" | |
# if [ -z "$val1_consumer_rewards" ]; then | |
# echo "FAIL: No consumer rewards distributed to val1." | |
# exit 1 | |
# else | |
# echo "PASS: Consumer rewards distributed to val1." | |
# fi | |
# - name: _Downtime test> val3 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_3 null | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-2-3.service | |
# run: | | |
# $CHAIN_BINARY tx provider opt-out $CONSUMER_ID --from $WALLET_3 --gas auto --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM --home $HOME_1 -y | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# $CHAIN_BINARY q provider consumer-opted-in-validators $CONSUMER_ID --home $HOME_1 | |
# # $CHAIN_BINARY q provider consumer-opted-in-validators v400-two --home $HOME_1 | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Downtime test> val2 must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Downtime test> val3 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_3 null | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v450-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: _Downtime test> val2 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_2 null | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Downtime test> val2 must be jailed - 2 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v450-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: _Downtime test> val2 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_2 null | |
# - name: _Test equivocation tx | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-2-3.service | |
# CON1_RPC_PORT: 40221 | |
# CON1_P2P_PORT: 40231 | |
# CON2_P2P_PORT: 40232 | |
# CON3_P2P_PORT: 40233 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# scripts/consumer-double-sign-tx.sh | |
# - name: _Test light client attack | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-2-3.service | |
# CON1_RPC_PORT: 40221 | |
# CON1_P2P_PORT: 40231 | |
# CON2_P2P_PORT: 40232 | |
# CON3_P2P_PORT: 40233 | |
# run: | | |
# cp templates/hermes-config-lc.toml /home/runner/.hermes/config-lc.toml | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# scripts/consumer-light-client-tx.sh | |
# - name: _Remove consumer chain> ICS v4.5.0 chain 2 | |
# run: | | |
# echo "Consumer chains:" | |
# $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# consumer_id=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v450-two").consumer_id') | |
# echo "Removing v450-two (consumer_id = $consumer_id):" | |
# $CHAIN_BINARY tx provider remove-consumer $consumer_id --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# echo "Consumer chains:" | |
# $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# phase=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v450-two").phase') | |
# if [[ "$phase" -eq "CONSUMER_PHASE_STOPPED" ]]; then | |
# echo "PASS: Consumer chain was stopped." | |
# else | |
# echo "FAIL: Consumer chain was not stopped." | |
# exit 1 | |
# fi | |
# # - name: _Remove consumer chain> ICS v4.0.0 chain 1 | |
# # run: | | |
# # echo "Consumer chains:" | |
# # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # consumer_id=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v400-one").consumer_id') | |
# # echo "Removing v400-one (consumer_id = $consumer_id):" | |
# # jq -r --arg CONSUMER "$consumer_id" '.messages[0].consumer_id |= $CONSUMER' templates/proposal-remove-consumer.json > remove-consumer.json | |
# # jq '.' remove-consumer.json | |
# # txhash=$($CHAIN_BINARY tx gov submit-proposal remove-consumer.json --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 -o json | jq -r '.txhash') | |
# # sleep $(($COMMIT_TIMEOUT*2)) | |
# # proposal_id=$($CHAIN_BINARY --output json q tx $txhash --home $HOME_1 | jq -r '.events[] | select(.type=="submit_proposal") | .attributes[] | select(.key=="proposal_id") | .value') | |
# # echo "Voting on consumer removal proposal $proposal_id." | |
# # $CHAIN_BINARY tx gov vote $proposal_id yes --from $WALLET_1 --gas auto --gas-prices 0.005$DENOM --gas-adjustment 3 --yes --home $HOME_1 | |
# # sleep $(($COMMIT_TIMEOUT*2)) | |
# # sleep $VOTING_PERIOD | |
# # echo "Consumer chains:" | |
# # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # phase=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v400-one").phase') | |
# # if [[ "$phase" -eq "CONSUMER_PHASE_STOPPED" ]]; then | |
# # echo "PASS: Consumer chain was stopped." | |
# # else | |
# # echo "FAIL: Consumer chain was not stopped." | |
# # exit 1 | |
# # fi | |
# Baseline-3-ics-topn: | |
# 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: v4.1.1 | |
# TOPN: 95 | |
# # 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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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 $CONSUMER_CHAIN_V450_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V450_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V450_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 | |
# # PSS_ENABLED: true | |
# # COSMOS_SDK: v50 | |
# # run: | | |
# # scripts/add_consumer_topn.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_permissionless.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.1.1 | |
# # PROVIDER_ICS: v4.2.0 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# # scripts/prepare_consumer_permissionless.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: 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.5.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# PSS_ENABLED: true | |
# COSMOS_SDK: v50 | |
# run: | | |
# scripts/add_consumer_topn.sh | |
# - name: Initialize consumer chain with ICS v4.5.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-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_V450_BINARY | |
# scripts/init_consumer_permissionless.sh | |
# sleep 60 | |
# - name: Prepare consumer chain v450-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v4.2.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# scripts/prepare_consumer_permissionless.sh | |
# - name: Start consumer chain v400-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_SERVICE_1: v450-2-1.service | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-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.5.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 v450-two | |
# env: | |
# CONSUMER_CHAIN_ID: v450-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.5.0 chain 2 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# CON1_RPC_PORT: 40221 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v4.5.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v450-two | |
# CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_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: Query consumer chains | |
# run: $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 | |
# - name: _Downtime test> val3 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_3 null | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# CONSUMER_SERVICE_3: v450-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Downtime test> val2 must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Downtime test> val3 must not be jailed | |
# run: | | |
# tests/test_validator_jailed.sh $VALOPER_3 null | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v450-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: _Downtime test> val2 must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 null | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v450-2-2.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Downtime test> val2 must be jailed - 2 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# Baseline-4-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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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: _Test PFM transfers | |
# env: | |
# PFM_HOME: /home/runner/.pfm3 | |
# run: | | |
# tests/test_pfm_transfers.sh | |
# # # Baseline-5-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@v4 | |
# # # - name: Set up Python | |
# # # uses: actions/setup-python@v5 | |
# # # 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 | |
# # # PSS_ENABLED: true | |
# # # 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: v4.2.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 | |
# # # COSMOS_SDK: v50 | |
# # # 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-6-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 | |
# # TOPN: 95 | |
# # 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@v4 | |
# # - name: Set up Python | |
# # uses: actions/setup-python@v5 | |
# # 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 $NEUTRON_VERSION | |
# # # make install | |
# # wget https://github.com/neutron-org/neutron/releases/download/$NEUTRON_VERSION/neutrond-linux-amd64 -O neutrond | |
# # chmod +x neutrond | |
# # cp neutrond $HOME/go/bin | |
# # - name: Install Stride binary | |
# # run: | | |
# # go version | |
# # git clone https://github.com/Stride-Labs/stride.git | |
# # cd stride | |
# # git checkout $STRIDE_VERSION | |
# # 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 | |
# # PSS_ENABLED: true | |
# # COSMOS_SDK: v50 | |
# # run: | | |
# # scripts/add_consumer_topn.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_permissionless.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: v4.2.0 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY | |
# # scripts/prepare_consumer_permissionless.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 10 | |
# # 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.2 | |
# # CON1_RPC_PORT: 31321 | |
# # 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_neutron_ibc_transfer.sh $channel_id | |
# # - name: Add Stride consumer chain | |
# # env: | |
# # CONSUMER_CHAIN_ID: stride-test | |
# # PSS_ENABLED: true | |
# # COSMOS_SDK: v50 | |
# # run: | | |
# # scripts/add_consumer_topn.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_permissionless.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: v4.2.0 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# # scripts/prepare_consumer_permissionless.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: 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.2 | |
# # CON1_RPC_PORT: 31321 | |
# # 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_neutron_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 | |
# Baseline-7-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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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: 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 | |
# Baseline-8-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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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-v19/setup_connection_ica_controller.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT | |
# - name: _Test ICA controller - register ICA with WALLET_1 | |
# env: | |
# CONTROLLER_HOME: /home/runner/.val1 | |
# HOST_HOME: /home/runner/.host | |
# run: | | |
# export CONTROLLER_ACCT=$WALLET_1 | |
# scripts/register_ica.sh | |
# - name: _Test ICA send | |
# env: | |
# CONTROLLER_HOME: /home/runner/.val1 | |
# HOST_HOME: /home/runner/.host | |
# run: | | |
# export CONTROLLER_ACCT=$WALLET_1 | |
# export RECIPIENT=$WALLET_3 | |
# tests/test_ica_send.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 | |
# sleep 1m | |
# - name: _Test ICA controller - register ICA with WALLET_2 | |
# env: | |
# CONTROLLER_HOME: /home/runner/.val1 | |
# HOST_HOME: /home/runner/.host | |
# run: | | |
# export CONTROLLER_ACCT=$WALLET_2 | |
# scripts/register_ica.sh | |
# - name: _Test ICA send with post-upgrade account | |
# env: | |
# CONTROLLER_HOME: /home/runner/.val1 | |
# HOST_HOME: /home/runner/.host | |
# run: | | |
# export CONTROLLER_ACCT=$WALLET_2 | |
# export RECIPIENT=$WALLET_5 | |
# tests/test_ica_send.sh | |
# - name: _Test ICA send with pre-upgrade account | |
# env: | |
# CONTROLLER_HOME: /home/runner/.val1 | |
# HOST_HOME: /home/runner/.host | |
# run: | | |
# export CONTROLLER_ACCT=$WALLET_1 | |
# export RECIPIENT=$WALLET_6 | |
# tests/test_ica_send.sh | |
# Baseline-9-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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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/setup_relayer.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 | |
# 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 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 | |
# $CHAIN_BINARY_SECONDARY version | |
# - name: Generate IBC connection | |
# env: | |
# TARGET_CHAIN_ID: two | |
# CLIENT_COUNT: 0 | |
# RPC_PORT: 27011 | |
# run: | | |
# scripts/gaia-v19/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 Hermes with dynamic gas prices | |
# # run: | | |
# # cp templates/gaia-v18/hermes-config-ibc-fee.toml ~/.hermes/config.toml | |
# # 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-10-cosmwasm: | |
# 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 }} | |
# # Consumer chain variables | |
# RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v4.1.1 | |
# VAL1_STAKE: 500000000 | |
# VAL2_STAKE: 300000000 | |
# VAL3_STAKE: 200000000 | |
# # 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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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: _Test permissioned cosmwasm | |
# run: | | |
# tests/gaia-v19/test_cosmwasm.sh | |
# Baseline-11-feemarket: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# # COMMIT_TIMEOUT: 60s | |
# 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: v4.1.1 | |
# VAL1_STAKE: 500000000 | |
# VAL2_STAKE: 300000000 | |
# VAL3_STAKE: 200000000 | |
# # 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@v4 | |
# - name: Set up Python | |
# uses: actions/setup-python@v5 | |
# 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_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: Query consensus params | |
# run: curl -s http://localhost:$VAL1_API_PORT/cosmos/consensus/v1/params | jq '.' | |
# - name: _Test feemarket | |
# run: | | |
# tests/test_feemarket.sh | |
# - name: Print consensus and feemarket params | |
# run: | | |
# echo "> consensus params:" | |
# $CHAIN_BINARY q consensus params --home $HOME_1 -o json | jq '.' | |
# echo "> feemarket params:" | |
# $CHAIN_BINARY q feemarket params --home $HOME_1 -o json | jq '.' | |
# - 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: _Test feemarket | |
# run: | | |
# tests/test_feemarket.sh | |
# - name: Print consensus and feemarket params | |
# run: | | |
# echo "> consensus params:" | |
# $CHAIN_BINARY q consensus params --home $HOME_1 -o json | jq '.' | |
# echo "> feemarket params:" | |
# $CHAIN_BINARY q feemarket params --home $HOME_1 -o json | jq '.' | |
# - name: Change consensus and feemarket params | |
# run: | | |
# txhash=$($CHAIN_BINARY tx gov submit-proposal templates/proposal-consensus-feemarket-params.json --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM --home $HOME_1 -y -o json | jq -r '.txhash') | |
# echo "tx hash: $txhash" | |
# sleep $(($COMMIT_TIMEOUT+2)) | |
# prop_id=$($CHAIN_BINARY q tx $txhash -o json --home $HOME_1 | jq -r '.events[] | select(.type=="submit_proposal") | .attributes[] | select(.key == "proposal_id") | .value') | |
# echo "> Proposal ID: $prop_id" | |
# $CHAIN_BINARY tx gov vote $prop_id yes --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM --home $HOME_1 -y | |
# sleep $VOTING_PERIOD | |
# sleep $(($COMMIT_TIMEOUT+2)) | |
# - name: Print consensus and feemarket params | |
# run: | | |
# echo "> consensus params:" | |
# $CHAIN_BINARY q consensus params --home $HOME_1 -o json | jq '.' | |
# echo "> feemarket params:" | |
# $CHAIN_BINARY q feemarket params --home $HOME_1 -o json | jq '.' | |
# # Baseline-12-ics-sovereign: | |
# # 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: v4.1.1 | |
# # # 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@v4 | |
# # - name: Set up Python | |
# # uses: actions/setup-python@v5 | |
# # 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 $CONSUMER_CHAIN_V450_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V450_BINARY -q | |
# # chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V450_BINARY | |
# # wget $SOVEREIGN_CHAIN_V450_BINARY_URL -O $HOME/go/bin/$SOVEREIGN_CHAIN_V450_BINARY -q | |
# # chmod +x $HOME/go/bin/$SOVEREIGN_CHAIN_V450_BINARY | |
# # wget $CHANGEOVER_CHAIN_V450_BINARY_URL -O $HOME/go/bin/$CHANGEOVER_CHAIN_V450_BINARY -q | |
# # chmod +x $HOME/go/bin/$CHANGEOVER_CHAIN_V450_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: Start sovereign chain | |
# # env: | |
# # CONSUMER_CHAIN_ID: v450-one | |
# # CONSUMER_HOME_1: /home/runner/.v450-1-1 | |
# # CONSUMER_HOME_2: /home/runner/.v450-1-2 | |
# # CONSUMER_HOME_3: /home/runner/.v450-1-3 | |
# # CONSUMER_SERVICE_1: v450-1-1.service | |
# # CONSUMER_SERVICE_2: v450-1-2.service | |
# # CONSUMER_SERVICE_3: v450-1-3.service | |
# # CON1_API_PORT: 45101 | |
# # CON2_API_PORT: 45102 | |
# # CON3_API_PORT: 45103 | |
# # CON1_GRPC_PORT: 45111 | |
# # CON2_GRPC_PORT: 45112 | |
# # CON3_GRPC_PORT: 45113 | |
# # CON1_RPC_PORT: 45121 | |
# # CON2_RPC_PORT: 45122 | |
# # CON3_RPC_PORT: 45123 | |
# # CON1_P2P_PORT: 45131 | |
# # CON2_P2P_PORT: 45132 | |
# # CON3_P2P_PORT: 45133 | |
# # CON1_PPROF_PORT: 45141 | |
# # CON2_PPROF_PORT: 45142 | |
# # CON3_PPROF_PORT: 45143 | |
# # DOWNTIME_BLOCKS: 100000 | |
# # run: | | |
# # export CHAIN_BINARY_URL=$SOVEREIGN_CHAIN_V450_BINARY_URL | |
# # export CONSUMER_CHAIN_BINARY=$SOVEREIGN_CHAIN_V450_BINARY | |
# # scripts/start_sovereign_chain.sh | |
# # sleep 10 | |
# # - name: Print sovereign logs | |
# # env: | |
# # CONSUMER_SERVICE_1: v450-1-1.service | |
# # run: | |
# # journalctl -u $CONSUMER_SERVICE_1 | |
# # - name: Sovereign block production check | |
# # env: | |
# # CON1_RPC_PORT: 45121 | |
# # run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 # 5 blocks | |
# # - name: Create transfer channel with sovereign chain | |
# # env: | |
# # CONSUMER_CHAIN_ID: v450-one | |
# # run: | | |
# # hermes create connection --a-chain $CHAIN_ID --b-chain $CONSUMER_CHAIN_ID | |
# # hermes create channel --a-chain $CHAIN_ID --a-connection connection-0 --a-port transfer --b-port transfer | |
# # # - name: Add consumer chain with ICS v4.0.0 | |
# # # env: | |
# # # CONSUMER_CHAIN_ID: v400-one | |
# # # PSS_ENABLED: true | |
# # # COSMOS_SDK: v50 | |
# # # run: | | |
# # # scripts/add_consumer_optin.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_permissionless.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.1.1 | |
# # # PROVIDER_ICS: v4.2.0 | |
# # # run: | | |
# # # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# # # scripts/prepare_consumer_permissionless.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: Restart relayer | |
# # run: sudo systemctl restart $RELAYER | |
# # - name: Sovereign-consumer changeover | |
# # env: | |
# # CONSUMER_CHAIN_ID: v450-one | |
# # CONSUMER_HOME_1: /home/runner/.v450-1-1 | |
# # CONSUMER_HOME_2: /home/runner/.v450-1-2 | |
# # CONSUMER_HOME_3: /home/runner/.v450-1-3 | |
# # CONSUMER_SERVICE_1: v450-1-1.service | |
# # CONSUMER_SERVICE_2: v450-1-2.service | |
# # CONSUMER_SERVICE_3: v450-1-3.service | |
# # CON1_API_PORT: 45101 | |
# # CON2_API_PORT: 45102 | |
# # CON3_API_PORT: 45103 | |
# # CON1_GRPC_PORT: 45111 | |
# # CON2_GRPC_PORT: 45112 | |
# # CON3_GRPC_PORT: 45113 | |
# # CON1_RPC_PORT: 45121 | |
# # CON2_RPC_PORT: 45122 | |
# # CON3_RPC_PORT: 45123 | |
# # CON1_P2P_PORT: 45131 | |
# # CON2_P2P_PORT: 45132 | |
# # CON3_P2P_PORT: 45133 | |
# # CON1_PPROF_PORT: 45141 | |
# # CON2_PPROF_PORT: 45142 | |
# # CON3_PPROF_PORT: 45143 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$SOVEREIGN_CHAIN_V450_BINARY | |
# # scripts/changeover.sh | |
# # journalctl -u $CONSUMER_SERVICE_1 | |
# # - name: Establish CCV channel for v450-one | |
# # env: | |
# # CONSUMER_CHAIN_ID: v450-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-1 --b-client $client_id | |
# # hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-1 --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.5.0 chain 1 | |
# # env: | |
# # CONSUMER_HOME_1: /home/runner/.v450-1-1 | |
# # CON1_RPC_PORT: 45121 | |
# # CON1_P2P_PORT: 45131 | |
# # run: tests/test_ccv_key_assignment.sh | |
# # - name: _IBC transfer successful> ICS v4.5.0 chain 1 | |
# # env: | |
# # CONSUMER_CHAIN_ID: v450-one | |
# # CONSUMER_HOME_1: /home/runner/.v450-1-1 | |
# # RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$SOVEREIGN_CHAIN_V450_BINARY | |
# # # echo "> List consumer chains:" | |
# # # $CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq '.' | |
# # # 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') | |
# # tests/test_changeover_ibc_transfer.sh | |
# # - name: Trigger consumer rewards distribution> ICS v4.5.0 | |
# # env: | |
# # CONSUMER_HOME_1: /home/runner/.v450-1-1 | |
# # CON1_RPC_PORT: 45121 | |
# # CON1_P2P_PORT: 45131 | |
# # run: | | |
# # export CONSUMER_CHAIN_BINARY=$SOVEREIGN_CHAIN_V450_BINARY | |
# # echo "> Consumer rewards pool balances:" | |
# # $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# # echo "> Val1 outstanding rewards:" | |
# # $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# # echo "> Send tx with high fees in consumer chain." | |
# # $CONSUMER_CHAIN_BINARY tx bank send consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc consumer1ay4dpm0kjmvtpug28vgw5w32yyjxa5spqtvan8 1$CONSUMER_DENOM \ | |
# # --from consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc \ | |
# # --gas auto --fees 10000ucon \ | |
# # --home $CONSUMER_HOME_1 -o json -y | jq '.' | |
# # sleep $(($COMMIT_TIMEOUT*10)) | |
# # echo "> Balance in consumer chain recipient:" | |
# # $CONSUMER_CHAIN_BINARY q bank balances consumer1ay4dpm0kjmvtpug28vgw5w32yyjxa5spqtvan8 --home $CONSUMER_HOME_1 -o json | jq '.' | |
# # echo "> Val1 outstanding rewards:" | |
# # $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# # - name: Register consumer reward denoms | |
# # env: | |
# # CONSUMER_DENOM: ucon | |
# # run: | | |
# # last_channel=$($CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.channels[-1].channel_id') | |
# # echo "> Last channel: $last_channel" | |
# # denom_450=$(echo -n "transfer/${last_channel}/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# # echo "> Denom: $denom_450" | |
# # scripts/change_denoms.sh $denom_450 | |
# # $CHAIN_BINARY q provider registered-consumer-reward-denoms --home $HOME_1 -o json | jq '.' | |
# # - name: _Consumer rewards distribution> ICS v4.5.0 | |
# # run: | | |
# # last_channel=$($CHAIN_BINARY q ibc channel channels -o json --home $HOME_1 | jq -r '.channels[-1].channel_id') | |
# # ibc_denom=ibc/$(echo -n "transfer/${last_channel}/$CONSUMER_DENOM" | shasum -a 256 | cut -d ' ' -f1 | tr 'a-z' 'A-Z') | |
# # echo "> Denom: $ibc_denom" | |
# # echo "> Consumer rewards pool balances:" | |
# # $CHAIN_BINARY q bank balances cosmos1ap0mh6xzfn8943urr84q6ae7zfnar48am2erhd --home $HOME_1 -o json | jq '.' | |
# # echo "> Val1 outstanding rewards:" | |
# # $CHAIN_BINARY q distribution validator-outstanding-rewards $VALOPER_1 --home $HOME_1 -o json | jq '.' | |
# # val1_rewards=$(curl -s http://localhost:$VAL1_API_PORT/cosmos/distribution/v1beta1/validators/$VALOPER_1/outstanding_rewards | jq -r '.rewards.rewards') | |
# # echo "> val1_rewards: $val1_rewards" | |
# # val1_consumer_rewards=$(echo $val1_rewards | jq -r --arg DENOM "$ibc_denom" '.[] | select(.denom==$DENOM).amount') | |
# # echo "> val1_consumer_rewards: $val1_consumer_rewards" | |
# # if [ -z "$val1_consumer_rewards" ]; then | |
# # echo "FAIL: No consumer rewards distributed to val1." | |
# # exit 1 | |
# # else | |
# # echo "PASS: Consumer rewards distributed to val1." | |
# # fi | |
# # # - name: _Downtime test> val3 must not be jailed | |
# # # run: | | |
# # # tests/test_validator_jailed.sh $VALOPER_3 null | |
# # # - name: Stop validator services | |
# # # env: | |
# # # CONSUMER_SERVICE_2: v450-2-2.service | |
# # # CONSUMER_SERVICE_3: v450-2-3.service | |
# # # run: | | |
# # # $CHAIN_BINARY tx provider opt-out $CONSUMER_ID --from $WALLET_3 --gas auto --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM --home $HOME_1 -y | |
# # # sleep $(($COMMIT_TIMEOUT*30)) | |
# # # $CHAIN_BINARY q provider consumer-opted-in-validators $CONSUMER_ID --home $HOME_1 | |
# # # # $CHAIN_BINARY q provider consumer-opted-in-validators v400-two --home $HOME_1 | |
# # # sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# # # sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# # # sleep $(($COMMIT_TIMEOUT*30)) | |
# # # - name: _Downtime test> val2 must be jailed - 1 | |
# # # run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# # # - name: _Downtime test> val3 must not be jailed | |
# # # run: | | |
# # # tests/test_validator_jailed.sh $VALOPER_3 null | |
# # # - name: Unjail validator | |
# # # env: | |
# # # CONSUMER_SERVICE_2: v450-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: _Downtime test> val2 must not be jailed | |
# # # run: | | |
# # # tests/test_validator_jailed.sh $VALOPER_2 null | |
# # # - name: Stop validator services | |
# # # env: | |
# # # CONSUMER_SERVICE_2: v450-2-2.service | |
# # # run: | | |
# # # sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# # # sleep $(($COMMIT_TIMEOUT*30)) | |
# # # - name: _Downtime test> val2 must be jailed - 2 | |
# # # run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# # # - name: Unjail validator | |
# # # env: | |
# # # CONSUMER_SERVICE_2: v450-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: _Downtime test> val2 must not be jailed | |
# # # run: | | |
# # # tests/test_validator_jailed.sh $VALOPER_2 null | |
# # # - name: _Test equivocation tx | |
# # # env: | |
# # # CONSUMER_CHAIN_ID: v450-two | |
# # # CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# # # CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# # # CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# # # CONSUMER_SERVICE_1: v450-2-1.service | |
# # # CONSUMER_SERVICE_2: v450-2-2.service | |
# # # CONSUMER_SERVICE_3: v450-2-3.service | |
# # # CON1_RPC_PORT: 40221 | |
# # # CON1_P2P_PORT: 40231 | |
# # # CON2_P2P_PORT: 40232 | |
# # # CON3_P2P_PORT: 40233 | |
# # # run: | | |
# # # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# # # scripts/consumer-double-sign-tx.sh | |
# # # - name: _Test light client attack | |
# # # env: | |
# # # CONSUMER_CHAIN_ID: v450-two | |
# # # CONSUMER_HOME_1: /home/runner/.v450-2-1 | |
# # # CONSUMER_HOME_2: /home/runner/.v450-2-2 | |
# # # CONSUMER_HOME_3: /home/runner/.v450-2-3 | |
# # # CONSUMER_SERVICE_1: v450-2-1.service | |
# # # CONSUMER_SERVICE_2: v450-2-2.service | |
# # # CONSUMER_SERVICE_3: v450-2-3.service | |
# # # CON1_RPC_PORT: 40221 | |
# # # CON1_P2P_PORT: 40231 | |
# # # CON2_P2P_PORT: 40232 | |
# # # CON3_P2P_PORT: 40233 | |
# # # run: | | |
# # # cp templates/hermes-config-lc.toml /home/runner/.hermes/config-lc.toml | |
# # # export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V450_BINARY | |
# # # scripts/consumer-light-client-tx.sh | |
# # # - name: _Remove consumer chain> ICS v4.5.0 chain 2 | |
# # # run: | | |
# # # echo "Consumer chains:" | |
# # # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # # consumer_id=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v450-two").consumer_id') | |
# # # echo "Removing v450-two (consumer_id = $consumer_id):" | |
# # # $CHAIN_BINARY tx provider remove-consumer $consumer_id --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# # # sleep $(($COMMIT_TIMEOUT*2)) | |
# # # echo "Consumer chains:" | |
# # # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # # phase=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v450-two").phase') | |
# # # if [[ "$phase" -eq "CONSUMER_PHASE_STOPPED" ]]; then | |
# # # echo "PASS: Consumer chain was stopped." | |
# # # else | |
# # # echo "FAIL: Consumer chain was not stopped." | |
# # # exit 1 | |
# # # fi | |
# # # - name: _Remove consumer chain> ICS v4.0.0 chain 1 | |
# # # run: | | |
# # # echo "Consumer chains:" | |
# # # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # # consumer_id=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v400-one").consumer_id') | |
# # # echo "Removing v400-one (consumer_id = $consumer_id):" | |
# # # jq -r --arg CONSUMER "$consumer_id" '.messages[0].consumer_id |= $CONSUMER' templates/proposal-remove-consumer.json > remove-consumer.json | |
# # # jq '.' remove-consumer.json | |
# # # txhash=$($CHAIN_BINARY tx gov submit-proposal remove-consumer.json --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 -o json | jq -r '.txhash') | |
# # # sleep $(($COMMIT_TIMEOUT*2)) | |
# # # proposal_id=$($CHAIN_BINARY --output json q tx $txhash --home $HOME_1 | jq -r '.events[] | select(.type=="submit_proposal") | .attributes[] | select(.key=="proposal_id") | .value') | |
# # # echo "Voting on consumer removal proposal $proposal_id." | |
# # # $CHAIN_BINARY tx gov vote $proposal_id yes --from $WALLET_1 --gas auto --gas-prices 0.005$DENOM --gas-adjustment 3 --yes --home $HOME_1 | |
# # # sleep $(($COMMIT_TIMEOUT*2)) | |
# # # sleep $VOTING_PERIOD | |
# # # echo "Consumer chains:" | |
# # # $CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq '.' | |
# # # phase=$($CHAIN_BINARY q provider list-consumer-chains --home $HOME_1 -o json | jq -r '.chains[] | select(.chain_id == "v400-one").phase') | |
# # # if [[ "$phase" -eq "CONSUMER_PHASE_STOPPED" ]]; then | |
# # # echo "PASS: Consumer chain was stopped." | |
# # # else | |
# # # echo "FAIL: Consumer chain was not stopped." | |
# # # exit 1 | |
# # # fi |