add 1000 #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 v16 Upgrade - Fresh State | |
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: v15.2.0 | |
TARGET_VERSION: v16 | |
# All chain variables | |
COMMIT_TIMEOUT: 3 | |
DOWNTIME_BLOCKS: 10000 | |
# Provider chain variables | |
CHAIN_BINARY: gaiad | |
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: v47 | |
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_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 | |
# Reference ICS chain variables | |
CONSUMER_DENOM: ucon | |
CONSUMER_FEES: 500 | |
CONSUMER_CHAIN_V12_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v1.2.0-multiden/interchain-security-cd-linux | |
CONSUMER_CHAIN_V12_BINARY: consumerd_v1.2.0 | |
CONSUMER_CHAIN_V2_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v2.0.0/interchain-security-cd-linux | |
CONSUMER_CHAIN_V2_BINARY: consumerd_v2.0.0 | |
CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux | |
CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0 | |
CONSUMER_CHAIN_V320_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.2.0/interchain-security-cd-linux | |
CONSUMER_CHAIN_V320_BINARY: consumerd_v3.2.0 | |
CONSUMER_CHAIN_V330_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.3.0/interchain-security-cd-linux | |
CONSUMER_CHAIN_V330_BINARY: consumerd_v3.3.0 | |
STRIDE_V18_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-consumer-v18.0.0/strided-consumer-linux | |
NEUTRON_V2_BINARY_URL: https://github.com/neutron-org/neutron/releases/download/v2.0.1/neutrond-linux-amd64 | |
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_CHAIN_ID: stride-test | |
STRIDE_DENOM: ustrd | |
# STRIDE_HOME_1: /home/runner/.stride1 | |
# STRIDE_HOME_2: /home/runner/.stride2 | |
# STRIDE_SERVICE_1: stride1.service | |
# STRIDE_SERVICE_2: stride2.service | |
STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 | |
# STRIDE_API_1: 35001 | |
# STRIDE_API_2: 35002 | |
# STRIDE_GRPC_1: 36001 | |
# STRIDE_GRPC_2: 36002 | |
# STRIDE_RPC_1: 37001 | |
# STRIDE_RPC_2: 37002 | |
# STRIDE_P2P_1: 38001 | |
# STRIDE_P2P_2: 38002 | |
# STRIDE_PPROF_1: 39001 | |
# STRIDE_PPROF_2: 39002 | |
# CHANGEOVER_Hv330-2-OFFSET: false | |
# Neutron chain variables | |
NEUTRON_CHAIN_BINARY: neutrond | |
NEUTRON_CHAIN_ID: neutron-test | |
NEUTRON_DENOM: untrn | |
# Relayer variables | |
RELAYER: hermes | |
HERMES_VERSION: v1.8.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@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- 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@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- 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@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- 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-cosmovisor | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix-cosmovisor.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: Test software upgrade for main branch | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux | |
# run: | | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: _Blocks produced after upgrade | |
# run: | | |
# tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 | |
# - name: Flush "migration successful" lines | |
# run: | | |
# $CHAIN_BINARY keys list --home $HOME_1 | |
# - name: _Transactions verified> bank send, delegate, and withdraw rewards | |
# run: tests/test_tx_fresh.sh | |
# - name: _API endpoints check | |
# run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT | |
# - name: _RPC endpoints check | |
# run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT | |
v16-2-ibc-rate-limit: | |
runs-on: ubuntu-22.04 | |
needs: set-version-matrix | |
strategy: | |
matrix: | |
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} | |
fail-fast: false | |
env: | |
COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
CHAIN_BINARY_SECONDARY: gaiad-ibc | |
COMMIT_TIMEOUT: 1 | |
steps: | |
- name: start-version | |
run: echo ${{matrix.gaia_version}} | |
- name: target-version | |
run: echo ${{matrix.upgrade_version}} | |
- name: target-commit | |
if: ${{ matrix.upgrade_version == 'main' }} | |
run: | | |
BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
echo TARGET_COMMIT: $TARGET_COMMIT | |
- name: Update PATH | |
run: | | |
mkdir -p $HOME/go/bin | |
echo "$HOME/go/bin" >> $GITHUB_PATH | |
echo "$HOME/.hermes" >> $GITHUB_PATH | |
echo "$HOME/.relayer" >> $GITHUB_PATH | |
- name: Bypass the grub-efi-amd64-signed package | |
run: sudo apt-mark hold grub-efi-amd64-signed | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install toml-cli | |
- name: Install Cosmovisor > v1.3.0 | |
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
run: | | |
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
echo "COSMOVISOR=true" >> $GITHUB_ENV | |
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
- name: Install Cosmovisor v1.3.0 | |
if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
run: | | |
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
echo "COSMOVISOR=true" >> $GITHUB_ENV | |
echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
- name: Set up relayer | |
run: scripts/gaia-v16/setup_relayer_rate_limit.sh | |
- name: Start chain | |
env: | |
START_VERSION: ${{matrix.gaia_version}} | |
COSMOS_SDK: v47 | |
run: | | |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
scripts/start_chain_single_val.sh | |
- name: Check Gaia log | |
run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
- name: Print Gaia version | |
run: $CHAIN_BINARY version --long | |
- name: Block production check | |
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
- name: Installing secondary chain binaries | |
env: | |
START_VERSION: ${{matrix.gaia_version}} | |
run: | | |
export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
echo "Chain binary URL: $CHAIN_BINARY_URL" | |
echo "Installing secondary chain binary..." | |
wget $CHAIN_BINARY_URL -O $HOME/go/bin/$CHAIN_BINARY_SECONDARY -q | |
chmod +x $HOME/go/bin/$CHAIN_BINARY_SECONDARY | |
- name: Start osmosis-1 chain | |
env: | |
CHAIN_SERVICE: osmosis.service | |
CHAIN_HOME: /home/runner/.osmosis | |
CHAIN_ID: osmosis-1 | |
API_PORT: 25011 | |
GRPC_PORT: 26011 | |
RPC_PORT: 27011 | |
P2P_PORT: 28011 | |
PPROF_PORT: 29011 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate osmosis-1 channels | |
env: | |
TARGET_CHAIN_ID: osmosis-1 | |
CLIENT_COUNT: 0 | |
CHANNEL_START: 0 | |
CHANNEL_END: 141 | |
TRANSFER_CHANNEL: channel-141 | |
RPC_PORT: 27011 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start core-1 chain | |
env: | |
CHAIN_SERVICE: core.service | |
CHAIN_HOME: /home/runner/.core | |
CHAIN_ID: core-1 | |
API_PORT: 25021 | |
GRPC_PORT: 26021 | |
RPC_PORT: 27021 | |
P2P_PORT: 28021 | |
PPROF_PORT: 29021 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate core-1 channels | |
env: | |
TARGET_CHAIN_ID: core-1 | |
CLIENT_COUNT: 1 | |
CHANNEL_START: 142 | |
CHANNEL_END: 190 | |
TRANSFER_CHANNEL: channel-190 | |
RPC_PORT: 27021 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start injective-1 chain | |
env: | |
CHAIN_SERVICE: injective.service | |
CHAIN_HOME: /home/runner/.injective | |
CHAIN_ID: injective-1 | |
API_PORT: 25031 | |
GRPC_PORT: 26031 | |
RPC_PORT: 27031 | |
P2P_PORT: 28031 | |
PPROF_PORT: 29031 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate injective-1 channels | |
env: | |
TARGET_CHAIN_ID: injective-1 | |
CLIENT_COUNT: 2 | |
CHANNEL_START: 191 | |
CHANNEL_END: 220 | |
TRANSFER_CHANNEL: channel-220 | |
RPC_PORT: 27031 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start secret-4 chain | |
env: | |
CHAIN_SERVICE: secret.service | |
CHAIN_HOME: /home/runner/.secret | |
CHAIN_ID: secret-4 | |
API_PORT: 25041 | |
GRPC_PORT: 26041 | |
RPC_PORT: 27041 | |
P2P_PORT: 28041 | |
PPROF_PORT: 29041 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate secret-4 channels | |
env: | |
TARGET_CHAIN_ID: secret-4 | |
CLIENT_COUNT: 3 | |
CHANNEL_START: 221 | |
CHANNEL_END: 235 | |
TRANSFER_CHANNEL: channel-235 | |
RPC_PORT: 27041 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start kaiyo-1 chain | |
env: | |
CHAIN_SERVICE: kaiyo.service | |
CHAIN_HOME: /home/runner/.kaiyo | |
CHAIN_ID: kaiyo-1 | |
API_PORT: 25051 | |
GRPC_PORT: 26051 | |
RPC_PORT: 27051 | |
P2P_PORT: 28051 | |
PPROF_PORT: 29051 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate kaiyo-1 channels | |
env: | |
TARGET_CHAIN_ID: kaiyo-1 | |
CLIENT_COUNT: 4 | |
CHANNEL_START: 236 | |
CHANNEL_END: 343 | |
TRANSFER_CHANNEL: channel-343 | |
RPC_PORT: 27051 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start stride-1 chain | |
env: | |
CHAIN_SERVICE: stride.service | |
CHAIN_HOME: /home/runner/.stride | |
CHAIN_ID: stride-1 | |
API_PORT: 25061 | |
GRPC_PORT: 26061 | |
RPC_PORT: 27061 | |
P2P_PORT: 28061 | |
PPROF_PORT: 29061 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate stride-1 channels | |
env: | |
TARGET_CHAIN_ID: stride-1 | |
CLIENT_COUNT: 5 | |
CHANNEL_START: 344 | |
CHANNEL_END: 391 | |
TRANSFER_CHANNEL: channel-391 | |
RPC_PORT: 27061 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Start neutron-1 chain | |
env: | |
CHAIN_SERVICE: neutron.service | |
CHAIN_HOME: /home/runner/.neutron | |
CHAIN_ID: neutron-1 | |
API_PORT: 25071 | |
GRPC_PORT: 26071 | |
RPC_PORT: 27071 | |
P2P_PORT: 28071 | |
PPROF_PORT: 29071 | |
run: | | |
scripts/start_chain_secondary.sh | |
- name: Generate neutron-1 channels | |
env: | |
TARGET_CHAIN_ID: neutron-1 | |
CLIENT_COUNT: 6 | |
CHANNEL_START: 392 | |
CHANNEL_END: 569 | |
TRANSFER_CHANNEL: channel-569 | |
RPC_PORT: 27071 | |
run: | | |
scripts/gaia-v16/setup_channels_rate_limit.sh $CHAIN_ID $TARGET_CHAIN_ID $CLIENT_COUNT $CHANNEL_START $CHANNEL_END | |
$CHAIN_BINARY tx ibc-transfer transfer transfer $TRANSFER_CHANNEL $WALLET_1 1000$DENOM --home $HOME_1 --from $WALLET_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
sleep 10 | |
$CHAIN_BINARY q bank balances $WALLET_1 --node http://localhost:$RPC_PORT | |
- name: Test software upgrade for published releases | |
if: ${{ matrix.upgrade_version != 'main' }} | |
env: | |
DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
run: | | |
echo $DOWNLOAD_URL | |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
- name: Test software upgrade for main branch | |
if: ${{ matrix.upgrade_version == 'main' }} | |
env: | |
DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux | |
run: | | |
scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
- name: _Blocks produced after upgrade | |
run: | | |
tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 | |
- name: _Test IBC rate limits - osmosis-1 | |
env: | |
CHANNEL: channel-141 | |
RATE: 0.05 | |
RPC_PORT: 27011 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - core-1 | |
env: | |
CHANNEL: channel-190 | |
RATE: 0.01 | |
RPC_PORT: 27021 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - injective-1 | |
env: | |
CHANNEL: channel-220 | |
RATE: 0.01 | |
RPC_PORT: 27031 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - secret-4 | |
env: | |
CHANNEL: channel-235 | |
RATE: 0.01 | |
RPC_PORT: 27041 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - kaiyo-1 | |
env: | |
CHANNEL: channel-343 | |
RATE: 0.01 | |
RPC_PORT: 27051 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - stride-1 | |
env: | |
CHANNEL: channel-391 | |
RATE: 0.01 | |
RPC_PORT: 27061 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
- name: _Test IBC rate limits - neutron-1 | |
env: | |
CHANNEL: channel-569 | |
RATE: 0.01 | |
RPC_PORT: 27071 | |
run: | | |
tests/gaia-v16/test_rate_limits.sh $CHANNEL $RATE $RPC_PORT | |
# Baseline-2-globalfee: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Test globalfee module | |
# env: | |
# COSMOS_SDK: v47 | |
# run: | | |
# tests/test_globalfee.sh | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: Test software upgrade for main branch | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux | |
# run: | | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: _Blocks produced after upgrade | |
# run: | | |
# tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 | |
# - name: Flush "migration successful" lines | |
# run: | | |
# $CHAIN_BINARY keys list --home $HOME_1 | |
# - name: _Transactions verified> bank send, delegate, and withdraw rewards | |
# run: tests/test_tx_fresh.sh | |
# - name: _API endpoints check | |
# run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT | |
# - name: _RPC endpoints check | |
# run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT | |
# - name: Test globalfee module | |
# env: | |
# COSMOS_SDK: v47 | |
# run: | | |
# tests/test_globalfee.sh | |
# v16-1-vesting-liquid-staking: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# VESTING_AMOUNT: 110000000 | |
# VESTING_DELEGATED_AMOUNT: 100000000 | |
# VESTING_WALLET: cosmos1jf7j9nvjmnflal5ehaj25p7nsk2t3lkd3tj7zp | |
# VESTING_MNEMONIC: "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon trouble" | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Set up vesting account | |
# run: | | |
# echo "Adding key..." | |
# echo "$VESTING_MNEMONIC" | $CHAIN_BINARY keys add vesting --home $HOME_1 --recover | |
# echo "Creating vesting wallet..." | |
# start_time=$(date +%s) | |
# echo "start time: $start_time" | |
# end_time=$(date -d '10 minutes' +%s) | |
# echo "end time: $end_time" | |
# $CHAIN_BINARY tx vesting create-vesting-account \ | |
# $VESTING_WALLET $VESTING_AMOUNT$DENOM $end_time \ | |
# --from $WALLET_1 --home $HOME_1 \ | |
# --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
# sleep $COMMIT_TIMEOUT | |
# sleep $COMMIT_TIMEOUT | |
# echo "Saving vesting times..." | |
# duration=$(echo "$end_time - $start_time" | bc -l) | |
# echo "duration: $duration" | |
# echo "vesting_start_time=$start_time" >> $GITHUB_ENV | |
# echo "vesting_end_time=$end_time" >> $GITHUB_ENV | |
# echo "vesting_duration=$duration" >> $GITHUB_ENV | |
# - name: Set up bonding | |
# run: | | |
# $CHAIN_BINARY tx staking validator-bond $VALOPER_1 --from $WALLET_1 --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
# - name: Delegate with vesting wallet | |
# run: | | |
# $CHAIN_BINARY q bank spendable-balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' | |
# echo "Delegating from vesting wallet..." | |
# $CHAIN_BINARY tx staking delegate $VALOPER_1 $VESTING_DELEGATED_AMOUNT$DENOM \ | |
# --from $VESTING_WALLET --home $HOME_1 \ | |
# --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
# sleep $COMMIT_TIMEOUT | |
# sleep $COMMIT_TIMEOUT | |
# - name: Tokenize with vesting wallet | |
# run: | | |
# $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' | |
# echo "vesting_start_time = $vesting_start_time" | |
# echo "vesting_end_time = $vesting_end_time" | |
# echo "vesting_duration = $vesting_duration" | |
# echo "Calculating vested delegation..." | |
# current_epoch=$(date +%s) | |
# echo "epoch: $current_epoch" | |
# elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) | |
# echo "elapsed_time: $elapsed_time" | |
# vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) | |
# echo "vested ratio: $vested_ratio" | |
# vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) | |
# echo "vested amount: $vested_amount" | |
# # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
# txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') | |
# echo "txhash: $txhash" | |
# sleep $COMMIT_TIMEOUT | |
# $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq '.' | |
# liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') | |
# echo "liquid tokens: $liquid_tokens" | |
# if [[ "$liquid_tokens" -gt "0" ]]; then | |
# echo "FAIL: Greater than zero amount in liquid tokens balance." | |
# exit 0 | |
# else | |
# echo "PASS: No liquid tokens balance." | |
# fi | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: Test software upgrade for main branch | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/gaiad-linux-main/gaiad-linux | |
# run: | | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT $TARGET_VERSION | |
# - name: _Blocks produced after upgrade | |
# run: | | |
# tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 3 | |
# - name: Tokenize with vesting wallet | |
# run: | | |
# $CHAIN_BINARY q staking delegations $VESTING_WALLET --home $HOME_1 -o json | jq '.' | |
# echo "vesting_start_time = $vesting_start_time" | |
# echo "vesting_end_time = $vesting_end_time" | |
# echo "vesting_duration = $vesting_duration" | |
# echo "Calculating vested delegation..." | |
# current_epoch=$(date +%s) | |
# echo "epoch: $current_epoch" | |
# elapsed_time=$(echo "$current_epoch - $vesting_start_time" | bc) | |
# echo "elapsed_time: $elapsed_time" | |
# vested_ratio=$(echo "$elapsed_time / $vesting_duration" | bc -l) | |
# echo "vested ratio: $vested_ratio" | |
# vested_amount=$(echo "($vested_ratio * $VESTING_DELEGATED_AMOUNT)/1" | bc) | |
# echo "vested amount: $vested_amount" | |
# # $CHAIN_BINARY tx staking tokenize-share $VALOPER_1 $vested_amount$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y | |
# txhash=$($CHAIN_BINARY tx staking tokenize-share $VALOPER_1 100000$DENOM $VESTING_WALLET --from $VESTING_WALLET --home $HOME_1 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y -o json | jq -r '.txhash') | |
# echo "txhash: $txhash" | |
# sleep $COMMIT_TIMEOUT | |
# $CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1")' | |
# liquid_tokens=$($CHAIN_BINARY q bank balances $VESTING_WALLET --home $HOME_1 -o json | jq -r '.balances[] | select(.denom == "cosmosvaloper1r5v5srda7xfth3hn2s26txvrcrntldju7lnwmv/1").amount') | |
# echo "liquid tokens: $liquid_tokens" | |
# if [[ "$liquid_tokens" -gt "0" ]]; then | |
# echo "PASS: Greater than zero amount in liquid tokens balance." | |
# else | |
# echo "FAIL: No liquid tokens balance." | |
# exit 0 | |
# fi | |
# Baseline-3a-icsv310: | |
# 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 | |
# ICS_310: true | |
# CONSUMER_ICS: v3.1.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V310_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V310_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_V310_BINARY runs off $CONSUMER_CHAIN_V310_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v310-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# CON1_API_PORT: 31101 | |
# CON2_API_PORT: 31102 | |
# CON3_API_PORT: 31103 | |
# CON1_GRPC_PORT: 31111 | |
# CON2_GRPC_PORT: 31112 | |
# CON3_GRPC_PORT: 31113 | |
# CON1_RPC_PORT: 31121 | |
# CON2_RPC_PORT: 31122 | |
# CON3_RPC_PORT: 31123 | |
# CON1_P2P_PORT: 31131 | |
# CON2_P2P_PORT: 31132 | |
# CON3_P2P_PORT: 31133 | |
# CON1_PPROF_PORT: 31141 | |
# CON2_PPROF_PORT: 31142 | |
# CON3_PPROF_PORT: 31143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add testnet v310-one v310-1 --file v310-2.json | |
# rly transact connection v310-1 | |
# rly transact channel v310-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_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 v15 | |
# - 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 v15 | |
# - 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 v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v310-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# CON1_API_PORT: 31201 | |
# CON2_API_PORT: 31202 | |
# CON3_API_PORT: 31203 | |
# CON1_GRPC_PORT: 31211 | |
# CON2_GRPC_PORT: 31212 | |
# CON3_GRPC_PORT: 31213 | |
# CON1_RPC_PORT: 31221 | |
# CON2_RPC_PORT: 31222 | |
# CON3_RPC_PORT: 31223 | |
# CON1_P2P_PORT: 31231 | |
# CON2_P2P_PORT: 31232 | |
# CON3_P2P_PORT: 31233 | |
# CON1_PPROF_PORT: 31241 | |
# CON2_PPROF_PORT: 31242 | |
# CON3_PPROF_PORT: 31243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# ICS_310: true | |
# COSMOS_SDK: v47 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-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 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v310-2 --file v310-2.json | |
# rly transact connection v310-2 | |
# rly transact channel v310-2 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# # - name: Stop validator services | |
# # env: | |
# # CONSUMER_SERVICE_2: v310-2-2.service | |
# # run: | | |
# # sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# # sleep $(($COMMIT_TIMEOUT*30)) | |
# # - name: _Soft opt-out test> Validator must be jailed - 2 | |
# # run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# Baseline-3b-icsv310-some-keys-assigned: | |
# 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 | |
# ICS_310: true | |
# CONSUMER_ICS: v3.1.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V310_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V310_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_V310_BINARY runs off $CONSUMER_CHAIN_V310_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v310-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# CON1_API_PORT: 31101 | |
# CON2_API_PORT: 31102 | |
# CON3_API_PORT: 31103 | |
# CON1_GRPC_PORT: 31111 | |
# CON2_GRPC_PORT: 31112 | |
# CON3_GRPC_PORT: 31113 | |
# CON1_RPC_PORT: 31121 | |
# CON2_RPC_PORT: 31122 | |
# CON3_RPC_PORT: 31123 | |
# CON1_P2P_PORT: 31131 | |
# CON2_P2P_PORT: 31132 | |
# CON3_P2P_PORT: 31133 | |
# CON1_PPROF_PORT: 31141 | |
# CON2_PPROF_PORT: 31142 | |
# CON3_PPROF_PORT: 31143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_some_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add testnet v310-one v310-1 --file v310-2.json | |
# rly transact connection v310-1 | |
# rly transact channel v310-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_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 v15 | |
# - 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 v15 | |
# - 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 v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v310-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# CON1_API_PORT: 31201 | |
# CON2_API_PORT: 31202 | |
# CON3_API_PORT: 31203 | |
# CON1_GRPC_PORT: 31211 | |
# CON2_GRPC_PORT: 31212 | |
# CON3_GRPC_PORT: 31213 | |
# CON1_RPC_PORT: 31221 | |
# CON2_RPC_PORT: 31222 | |
# CON3_RPC_PORT: 31223 | |
# CON1_P2P_PORT: 31231 | |
# CON2_P2P_PORT: 31232 | |
# CON3_P2P_PORT: 31233 | |
# CON1_PPROF_PORT: 31241 | |
# CON2_PPROF_PORT: 31242 | |
# CON3_PPROF_PORT: 31243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_some_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# ICS_310: true | |
# COSMOS_SDK: v47 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-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 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v310-2 --file v310-2.json | |
# rly transact connection v310-2 | |
# rly transact channel v310-2 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# Baseline-3c-icsv310-no-keys-assigned: | |
# 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 | |
# ICS_310: true | |
# CONSUMER_ICS: v3.1.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# CONSUMER_CHAIN_V310_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V310_BINARY: consumerd_v3.1.0 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V310_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V310_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V310_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_V310_BINARY runs off $CONSUMER_CHAIN_V310_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v310-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# CON1_API_PORT: 31101 | |
# CON2_API_PORT: 31102 | |
# CON3_API_PORT: 31103 | |
# CON1_GRPC_PORT: 31111 | |
# CON2_GRPC_PORT: 31112 | |
# CON3_GRPC_PORT: 31113 | |
# CON1_RPC_PORT: 31121 | |
# CON2_RPC_PORT: 31122 | |
# CON3_RPC_PORT: 31123 | |
# CON1_P2P_PORT: 31131 | |
# CON2_P2P_PORT: 31132 | |
# CON3_P2P_PORT: 31133 | |
# CON1_PPROF_PORT: 31141 | |
# CON2_PPROF_PORT: 31142 | |
# CON3_PPROF_PORT: 31143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_no_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-1-3 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_SERVICE_1: v310-1-1.service | |
# CONSUMER_SERVICE_2: v310-1-2.service | |
# CONSUMER_SERVICE_3: v310-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-one | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add testnet v310-one v310-1 --file v310-2.json | |
# rly transact connection v310-1 | |
# rly transact channel v310-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_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 v15 | |
# - 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 v15 | |
# - 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 v3.1.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# CON1_RPC_PORT: 31121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-one | |
# CONSUMER_HOME_1: /home/runner/.v310-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add consumer chain with ICS v3.1.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v310-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.1.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# CON1_API_PORT: 31201 | |
# CON2_API_PORT: 31202 | |
# CON3_API_PORT: 31203 | |
# CON1_GRPC_PORT: 31211 | |
# CON2_GRPC_PORT: 31212 | |
# CON3_GRPC_PORT: 31213 | |
# CON1_RPC_PORT: 31221 | |
# CON2_RPC_PORT: 31222 | |
# CON3_RPC_PORT: 31223 | |
# CON1_P2P_PORT: 31231 | |
# CON2_P2P_PORT: 31232 | |
# CON3_P2P_PORT: 31233 | |
# CON1_PPROF_PORT: 31241 | |
# CON2_PPROF_PORT: 31242 | |
# CON3_PPROF_PORT: 31243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# scripts/init_consumer_assign_no_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v310-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v310-2-3 | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# ICS_310: true | |
# COSMOS_SDK: v47 | |
# run: | | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_SERVICE_1: v310-2-1.service | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-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 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v310-two | |
# env: | |
# CONSUMER_CHAIN_ID: v310-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 > v310-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v310-1.json > v310-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v310-2 --file v310-2.json | |
# rly transact connection v310-2 | |
# rly transact channel v310-2 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v3.1.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 31221 | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.1.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v310-two | |
# CONSUMER_HOME_1: /home/runner/.v310-2-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V310_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# CONSUMER_SERVICE_3: v310-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v310-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# Baseline-4-icsv320: | |
# 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_330: false | |
# CONSUMER_ICS: v3.2.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# CONSUMER_CHAIN_V320_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.2.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V320_BINARY: consumerd_v3.2.0 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V320_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V320_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V320_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_V320_BINARY runs off $CONSUMER_CHAIN_V320_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v3.2.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v320-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.2.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v320-one | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v320-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v320-1-3 | |
# CONSUMER_SERVICE_1: v320-1-1.service | |
# CONSUMER_SERVICE_2: v320-1-2.service | |
# CONSUMER_SERVICE_3: v320-1-3.service | |
# CON1_API_PORT: 32101 | |
# CON2_API_PORT: 32102 | |
# CON3_API_PORT: 32103 | |
# CON1_GRPC_PORT: 32111 | |
# CON2_GRPC_PORT: 32112 | |
# CON3_GRPC_PORT: 32113 | |
# CON1_RPC_PORT: 32121 | |
# CON2_RPC_PORT: 32122 | |
# CON3_RPC_PORT: 32123 | |
# CON1_P2P_PORT: 32131 | |
# CON2_P2P_PORT: 32132 | |
# CON3_P2P_PORT: 32133 | |
# CON1_PPROF_PORT: 32141 | |
# CON2_PPROF_PORT: 32142 | |
# CON3_PPROF_PORT: 32143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v320-one | |
# env: | |
# CONSUMER_CHAIN_ID: v320-one | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v320-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v320-1-3 | |
# ICS_330: true | |
# CONSUMER_ICS: v3.2.0 | |
# PROVIDER_ICS: v2.4.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v320-one | |
# env: | |
# CONSUMER_CHAIN_ID: v320-one | |
# CONSUMER_SERVICE_1: v320-1-1.service | |
# CONSUMER_SERVICE_2: v320-1-2.service | |
# CONSUMER_SERVICE_3: v320-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v3.2.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 32121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v320-one | |
# env: | |
# CONSUMER_CHAIN_ID: v320-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 > v320-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v320-1.json > v320-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v320-1 --file v320-2.json | |
# rly transact connection v320-1 | |
# rly transact channel v320-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v3.2.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# CON1_RPC_PORT: 32121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v3.2.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v320-one | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_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 v15 | |
# - 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 v15 | |
# - 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 v3.2.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# CON1_RPC_PORT: 32121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.2.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v320-one | |
# CONSUMER_HOME_1: /home/runner/.v320-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add consumer chain with ICS v3.2.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v320-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.2.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v320-two | |
# CONSUMER_HOME_1: /home/runner/.v320-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v320-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v320-2-3 | |
# CONSUMER_SERVICE_1: v320-2-1.service | |
# CONSUMER_SERVICE_2: v320-2-2.service | |
# CONSUMER_SERVICE_3: v320-2-3.service | |
# CON1_API_PORT: 32201 | |
# CON2_API_PORT: 32202 | |
# CON3_API_PORT: 32203 | |
# CON1_GRPC_PORT: 32211 | |
# CON2_GRPC_PORT: 32212 | |
# CON3_GRPC_PORT: 32213 | |
# CON1_RPC_PORT: 32221 | |
# CON2_RPC_PORT: 32222 | |
# CON3_RPC_PORT: 32223 | |
# CON1_P2P_PORT: 32231 | |
# CON2_P2P_PORT: 32232 | |
# CON3_P2P_PORT: 32233 | |
# CON1_PPROF_PORT: 32241 | |
# CON2_PPROF_PORT: 32242 | |
# CON3_PPROF_PORT: 32243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v320-two | |
# env: | |
# CONSUMER_CHAIN_ID: v320-two | |
# CONSUMER_HOME_1: /home/runner/.v320-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v320-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v320-2-3 | |
# ICS_320: true | |
# CONSUMER_ICS: v3.2.0 | |
# PROVIDER_ICS: v3.3.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v320-two | |
# env: | |
# CONSUMER_CHAIN_ID: v320-two | |
# CONSUMER_SERVICE_1: v320-2-1.service | |
# CONSUMER_SERVICE_2: v320-2-2.service | |
# CONSUMER_SERVICE_3: v320-2-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v3.2.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 32221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v320-two | |
# env: | |
# CONSUMER_CHAIN_ID: v320-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 > v320-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v320-1.json > v320-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v320-2 --file v320-2.json | |
# rly transact connection v320-2 | |
# rly transact channel v320-2 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v3.2.0 chain 2 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v320-2-1 | |
# CON1_RPC_PORT: 32221 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.2.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v320-two | |
# CONSUMER_HOME_1: /home/runner/.v320-2-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V320_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# echo "client id: $client_id" | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# echo "connection id: $connection_id" | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# echo "Provider channel id: $channel_id" | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v320-2-2.service | |
# CONSUMER_SERVICE_3: v320-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v320-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# Baseline-5-icsv330: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix-relayer | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# # Consumer chain variables | |
# RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl | |
# ICS_330: false | |
# CONSUMER_ICS: v3.3.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# CONSUMER_CHAIN_V330_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-consumer-v3.3.0/interchain-security-cd-linux | |
# CONSUMER_CHAIN_V330_BINARY: consumerd_v3.3.0 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V330_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V330_BINARY | |
# wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q | |
# chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY | |
# - name: Consumer chain binary URLs | |
# run: | | |
# echo "$CONSUMER_CHAIN_V330_BINARY runs off $CONSUMER_CHAIN_V330_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v3.3.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v330-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.3.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v330-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v330-1-3 | |
# CONSUMER_SERVICE_1: v330-1-1.service | |
# CONSUMER_SERVICE_2: v330-1-2.service | |
# CONSUMER_SERVICE_3: v330-1-3.service | |
# CON1_API_PORT: 33101 | |
# CON2_API_PORT: 33102 | |
# CON3_API_PORT: 33103 | |
# CON1_GRPC_PORT: 33111 | |
# CON2_GRPC_PORT: 33112 | |
# CON3_GRPC_PORT: 33113 | |
# CON1_RPC_PORT: 33121 | |
# CON2_RPC_PORT: 33122 | |
# CON3_RPC_PORT: 33123 | |
# CON1_P2P_PORT: 33131 | |
# CON2_P2P_PORT: 33132 | |
# CON3_P2P_PORT: 33133 | |
# CON1_PPROF_PORT: 33141 | |
# CON2_PPROF_PORT: 33142 | |
# CON3_PPROF_PORT: 33143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v330-one | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v330-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v330-1-3 | |
# ICS_330: true | |
# CONSUMER_ICS: v3.3.0 | |
# PROVIDER_ICS: v2.4.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v330-one | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# CONSUMER_SERVICE_1: v330-1-1.service | |
# CONSUMER_SERVICE_2: v330-1-2.service | |
# CONSUMER_SERVICE_3: v330-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v3.3.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 33121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v330-one | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-1 --file v330-2.json | |
# rly transact connection v330-1 | |
# rly transact channel v330-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v3.3.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# CON1_RPC_PORT: 33121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v3.3.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15 | |
# - 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 v15 | |
# - 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 v3.3.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# CON1_RPC_PORT: 33121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.3.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v330-one | |
# CONSUMER_HOME_1: /home/runner/.v330-1-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add consumer chain with ICS v3.3.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v330-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v3.3.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# CONSUMER_HOME_1: /home/runner/.v330-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v330-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v330-2-3 | |
# CONSUMER_SERVICE_1: v330-2-1.service | |
# CONSUMER_SERVICE_2: v330-2-2.service | |
# CONSUMER_SERVICE_3: v330-2-3.service | |
# CON1_API_PORT: 33201 | |
# CON2_API_PORT: 33202 | |
# CON3_API_PORT: 33203 | |
# CON1_GRPC_PORT: 33211 | |
# CON2_GRPC_PORT: 33212 | |
# CON3_GRPC_PORT: 33213 | |
# CON1_RPC_PORT: 33221 | |
# CON2_RPC_PORT: 33222 | |
# CON3_RPC_PORT: 33223 | |
# CON1_P2P_PORT: 33231 | |
# CON2_P2P_PORT: 33232 | |
# CON3_P2P_PORT: 33233 | |
# CON1_PPROF_PORT: 33241 | |
# CON2_PPROF_PORT: 33242 | |
# CON3_PPROF_PORT: 33243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v330-two | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# CONSUMER_HOME_1: /home/runner/.v330-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v330-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v330-2-3 | |
# ICS_330: true | |
# CONSUMER_ICS: v3.3.0 | |
# PROVIDER_ICS: v3.3.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v330-two | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# CONSUMER_SERVICE_1: v330-2-1.service | |
# CONSUMER_SERVICE_2: v330-2-2.service | |
# CONSUMER_SERVICE_3: v330-2-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v3.3.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 33221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v330-two | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v330-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v330-1.json > v330-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v330-2 --file v330-2.json | |
# rly transact connection v330-2 | |
# rly transact channel v330-2 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v3.3.0 chain 2 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v330-2-1 | |
# CON1_RPC_PORT: 33221 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v3.3.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# CONSUMER_HOME_1: /home/runner/.v330-2-1 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V330_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# echo "client id: $client_id" | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# echo "connection id: $connection_id" | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# echo "Provider channel id: $channel_id" | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v330-2-2.service | |
# CONSUMER_SERVICE_3: v330-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v330-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# Baseline-6-icsv400: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix-relayer | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# # Consumer chain variables | |
# RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# CONSUMER_DENOM: ucon | |
# CONSUMER_FEES: 500 | |
# 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 | |
# ICS_TRANSFORM_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.3.0-transform/interchain-security-cd | |
# ICS_TRANSFORM_BINARY: cd-transform | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $CONSUMER_CHAIN_V400_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY -q | |
# chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V400_BINARY | |
# wget $ICS_TRANSFORM_BINARY_URL -O $HOME/go/bin/$ICS_TRANSFORM_BINARY -q | |
# chmod +x $HOME/go/bin/$ICS_TRANSFORM_BINARY | |
# - name: Consumer chain binary URLs | |
# run: | | |
# echo "$CONSUMER_CHAIN_V400_BINARY runs off $CONSUMER_CHAIN_V400_BINARY_URL" | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Add consumer chain with ICS v4.0.0 | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: v400-one | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v4.0.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v400-one | |
# CONSUMER_HOME_1: /home/runner/.v400-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v400-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v400-1-3 | |
# CONSUMER_SERVICE_1: v400-1-1.service | |
# CONSUMER_SERVICE_2: v400-1-2.service | |
# CONSUMER_SERVICE_3: v400-1-3.service | |
# CON1_API_PORT: 40101 | |
# CON2_API_PORT: 40102 | |
# CON3_API_PORT: 40103 | |
# CON1_GRPC_PORT: 40111 | |
# CON2_GRPC_PORT: 40112 | |
# CON3_GRPC_PORT: 40113 | |
# CON1_RPC_PORT: 40121 | |
# CON2_RPC_PORT: 40122 | |
# CON3_RPC_PORT: 40123 | |
# CON1_P2P_PORT: 40131 | |
# CON2_P2P_PORT: 40132 | |
# CON3_P2P_PORT: 40133 | |
# CON1_PPROF_PORT: 40141 | |
# CON2_PPROF_PORT: 40142 | |
# CON3_PPROF_PORT: 40143 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v400-one | |
# env: | |
# CONSUMER_CHAIN_ID: v400-one | |
# CONSUMER_HOME_1: /home/runner/.v400-1-1 | |
# CONSUMER_HOME_2: /home/runner/.v400-1-2 | |
# CONSUMER_HOME_3: /home/runner/.v400-1-3 | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v2.4.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v400-one | |
# env: | |
# CONSUMER_CHAIN_ID: v400-one | |
# CONSUMER_SERVICE_1: v400-1-1.service | |
# CONSUMER_SERVICE_2: v400-1-2.service | |
# CONSUMER_SERVICE_3: v400-1-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> ICS v4.0.0 chain 1 | |
# env: | |
# CON1_RPC_PORT: 40121 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v400-one | |
# env: | |
# CONSUMER_CHAIN_ID: v400-one | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json | |
# rly transact connection v400-1 | |
# rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> ICS v4.0.0 chain 1 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v400-1-1 | |
# CON1_RPC_PORT: 40121 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> ICS v4.0.0 chain 1 | |
# env: | |
# CONSUMER_CHAIN_ID: v400-one | |
# CONSUMER_HOME_1: /home/runner/.v400-1-1 | |
# RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15 | |
# - 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 v15 | |
# - 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.0.0 | |
# env: | |
# COSMOS_SDK: v47 | |
# CONSUMER_CHAIN_ID: v400-two | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize consumer chain with ICS v4.0.0 | |
# env: | |
# CONSUMER_CHAIN_ID: v400-two | |
# CONSUMER_HOME_1: /home/runner/.v400-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v400-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v400-2-3 | |
# CONSUMER_SERVICE_1: v400-2-1.service | |
# CONSUMER_SERVICE_2: v400-2-2.service | |
# CONSUMER_SERVICE_3: v400-2-3.service | |
# CON1_API_PORT: 40201 | |
# CON2_API_PORT: 40202 | |
# CON3_API_PORT: 40203 | |
# CON1_GRPC_PORT: 40211 | |
# CON2_GRPC_PORT: 40212 | |
# CON3_GRPC_PORT: 40213 | |
# CON1_RPC_PORT: 40221 | |
# CON2_RPC_PORT: 40222 | |
# CON3_RPC_PORT: 40223 | |
# CON1_P2P_PORT: 40231 | |
# CON2_P2P_PORT: 40232 | |
# CON3_P2P_PORT: 40233 | |
# CON1_PPROF_PORT: 40241 | |
# CON2_PPROF_PORT: 40242 | |
# CON3_PPROF_PORT: 40243 | |
# DOWNTIME_BLOCKS: 20 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain v400-two | |
# env: | |
# CONSUMER_CHAIN_ID: v400-two | |
# CONSUMER_HOME_1: /home/runner/.v400-2-1 | |
# CONSUMER_HOME_2: /home/runner/.v400-2-2 | |
# CONSUMER_HOME_3: /home/runner/.v400-2-3 | |
# ICS_400: true | |
# CONSUMER_ICS: v4.0.0 | |
# PROVIDER_ICS: v3.3.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain v400-two | |
# env: | |
# CONSUMER_CHAIN_ID: v330-two | |
# CONSUMER_SERVICE_1: v400-2-1.service | |
# CONSUMER_SERVICE_2: v400-2-2.service | |
# CONSUMER_SERVICE_3: v400-2-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Consumer chain produces blocks> ICS v4.0.0 chain 2 | |
# env: | |
# CON1_RPC_PORT: 40221 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for v400-two | |
# env: | |
# CONSUMER_CHAIN_ID: v400-two | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > v400-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' v400-1.json > v400-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID v400-1 --file v400-2.json | |
# rly transact connection v400-1 | |
# rly transact channel v400-1 --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _CCV channel verified> ICS v4.0.0 chain 2 | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.v400-2-1 | |
# CON1_RPC_PORT: 40221 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> ICS v4.0.0 chain 2 | |
# env: | |
# CONSUMER_CHAIN_ID: v400-two | |
# CONSUMER_HOME_1: /home/runner/.v400-2-1 | |
# RECIPIENT: consumer1r5v5srda7xfth3hn2s26txvrcrntldju7725yc | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V400_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Stop validator services | |
# env: | |
# CONSUMER_SERVICE_2: v400-2-2.service | |
# CONSUMER_SERVICE_3: v400-2-3.service | |
# run: | | |
# sudo systemctl disable $CONSUMER_SERVICE_2 --now | |
# sudo systemctl disable $CONSUMER_SERVICE_3 --now | |
# sleep $(($COMMIT_TIMEOUT*30)) | |
# - name: _Soft opt-out test> Validator must be jailed - 1 | |
# run: tests/test_validator_jailed.sh $VALOPER_2 true | |
# - name: _Soft opt-out test> Validator must not be jailed | |
# run: tests/test_validator_jailed.sh $VALOPER_3 false | |
# - name: Unjail validator | |
# env: | |
# CONSUMER_SERVICE_2: v400-2-2.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_2 --now | |
# sleep $(($COMMIT_TIMEOUT*10)) | |
# $CHAIN_BINARY tx slashing unjail --from $WALLET_2 --gas $GAS --gas-adjustment $GAS_ADJUSTMENT --gas-prices $GAS_PRICE$DENOM -y --home $HOME_1 | |
# sleep $(($COMMIT_TIMEOUT*2)) | |
# - name: _Soft opt-out test> Validator must be unjailed | |
# run: tests/test_validator_jailed.sh $VALOPER_2 false | |
# Baseline-7-pfm: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix-relayer | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix-relayer.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Start PFM chain 1 | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# PFM_SERVICE: pfm_1.service | |
# PFM_HOME: /home/runner/.pfm1 | |
# PFM_CHAIN_ID: pfm1 | |
# PFM_API_PORT: 25011 | |
# PFM_GRPC_PORT: 26011 | |
# PFM_RPC_PORT: 27011 | |
# PFM_P2P_PORT: 28011 | |
# PFM_PPROF_PORT: 29011 | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_pfm_chain.sh | |
# sleep 5 | |
# - name: Block production check | |
# env: | |
# PFM_RPC_PORT: 27011 | |
# run: | | |
# journalctl -u pfm_1.service | tail -n 100 | |
# tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks | |
# - name: Start PFM chain 2 | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# PFM_SERVICE: pfm_2.service | |
# PFM_HOME: /home/runner/.pfm2 | |
# PFM_CHAIN_ID: pfm2 | |
# PFM_API_PORT: 25012 | |
# PFM_GRPC_PORT: 26012 | |
# PFM_RPC_PORT: 27012 | |
# PFM_P2P_PORT: 28012 | |
# PFM_PPROF_PORT: 29012 | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_pfm_chain.sh | |
# sleep 5 | |
# - name: Block production check | |
# env: | |
# PFM_RPC_PORT: 27012 | |
# run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks | |
# - name: Start PFM chain 3 | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# PFM_SERVICE: pfm_3.service | |
# PFM_HOME: /home/runner/.pfm3 | |
# PFM_CHAIN_ID: pfm3 | |
# PFM_API_PORT: 25013 | |
# PFM_GRPC_PORT: 26013 | |
# PFM_RPC_PORT: 27013 | |
# PFM_P2P_PORT: 28013 | |
# PFM_PPROF_PORT: 29013 | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_pfm_chain.sh | |
# sleep 5 | |
# - name: Block production check | |
# env: | |
# PFM_RPC_PORT: 27013 | |
# run: tests/test_block_production.sh 127.0.0.1 $PFM_RPC_PORT 5 # 5 blocks | |
# - name: Create transfer channels for PFM test | |
# run: | | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channels with Hermes..." | |
# hermes create channel --new-client-connection --a-chain $CHAIN_ID --b-chain pfm1 --a-port transfer --b-port transfer --yes | |
# hermes create channel --new-client-connection --a-chain pfm1 --b-chain pfm2 --a-port transfer --b-port transfer --yes | |
# hermes create channel --new-client-connection --a-chain pfm2 --b-chain pfm3 --a-port transfer --b-port transfer --yes | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# echo "Paths" | |
# rly paths new testnet pfm1 pfm-path-1 | |
# rly paths new pfm1 pfm2 pfm-path-2 | |
# rly paths new pfm2 pfm3 pfm-path-3 | |
# echo "Clients" | |
# rly transact client testnet pfm1 pfm-path-1 | |
# rly transact client pfm1 pfm2 pfm-path-2 | |
# rly transact client pfm2 pfm3 pfm-path-3 | |
# sleep 5 | |
# echo "Connections" | |
# rly transact connection pfm-path-1 | |
# rly transact connection pfm-path-2 | |
# rly transact connection pfm-path-3 | |
# sleep 5 | |
# echo "Channels" | |
# rly transact channel pfm-path-1 | |
# rly transact channel pfm-path-2 | |
# rly transact channel pfm-path-3 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm1 -o json | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm2 -o json | |
# # $CHAIN_BINARY q ibc connection connections --home /home/runner/.pfm3 -o json | |
# - name: _Test PFM transfers | |
# env: | |
# PFM_HOME: /home/runner/.pfm3 | |
# run: | | |
# tests/test_pfm_transfers.sh | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15 | |
# - 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 v15 | |
# - name: _Blocks produced after upgrade | |
# run: | | |
# tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 | |
# - name: Restart relayer | |
# run: sudo systemctl restart $RELAYER | |
# - name: Flush "migration successful" lines | |
# run: | | |
# $CHAIN_BINARY keys list --home $HOME_1 | |
# - name: _Transactions verified> bank send, delegate, and withdraw rewards | |
# run: tests/test_tx_fresh.sh | |
# - name: _API endpoints check | |
# run: tests/test_endpoints_api.sh localhost $VAL1_API_PORT | |
# - name: _RPC endpoints check | |
# run: tests/test_endpoints_rpc.sh localhost $VAL1_RPC_PORT | |
# - name: _Test PFM transfers | |
# env: | |
# PFM_HOME: /home/runner/.pfm3 | |
# run: | | |
# tests/test_pfm_transfers.sh | |
# Baseline-8-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: v3.2.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# STRIDE_V18_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-consumer-v18.0.0/strided-consumer-linux | |
# 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_BINARY: strided | |
# STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $STRIDE_V18_BINARY_URL -O $HOME/go/bin/$STRIDE_CHAIN_BINARY -q | |
# chmod +x $HOME/go/bin/$STRIDE_CHAIN_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 "$STRIDE_BINARY runs off $STRIDE_V18_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 Stride consumer chain | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: stride-test | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize Stride consumer chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_DENOM: ustrd | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_HOME_2: /home/runner/.stride-2 | |
# CONSUMER_HOME_3: /home/runner/.stride-3 | |
# CONSUMER_SERVICE_1: stride-1.service | |
# CONSUMER_SERVICE_2: stride-2.service | |
# CONSUMER_SERVICE_3: stride-3.service | |
# CON1_API_PORT: 32301 | |
# CON2_API_PORT: 32302 | |
# CON3_API_PORT: 32303 | |
# CON1_GRPC_PORT: 32311 | |
# CON2_GRPC_PORT: 32312 | |
# CON3_GRPC_PORT: 32313 | |
# CON1_RPC_PORT: 32321 | |
# CON2_RPC_PORT: 32322 | |
# CON3_RPC_PORT: 32323 | |
# CON1_P2P_PORT: 32331 | |
# CON2_P2P_PORT: 32332 | |
# CON3_P2P_PORT: 32333 | |
# CON1_PPROF_PORT: 32341 | |
# CON2_PPROF_PORT: 32342 | |
# CON3_PPROF_PORT: 32343 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain stride-test | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_HOME_2: /home/runner/.stride-2 | |
# CONSUMER_HOME_3: /home/runner/.stride-3 | |
# CONSUMER_ICS: v3.2.0 | |
# PROVIDER_ICS: v2.4.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 v15 | |
# - 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 v15 | |
# - 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> Stride chain | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CON1_RPC_PORT: 32321 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _IBC transfer successful> Stride chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_CHAIN_BINARY: strided | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_DENOM: ustrd | |
# RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: _LSM happy path | |
# env: | |
# BASE_FEES: 3000 | |
# CONSUMER_FEES: 1000 | |
# CONSUMER_CHAIN_ID: stride-test | |
# STRIDE_HOME_1: /home/runner/.stride-1 | |
# VALOPER_TOKENIZATION: 2 | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# export IBC_CHANNEL=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_lsm_happy_path.sh | |
# - name: _LSM Liquid Staking Provider happy path | |
# env: | |
# STRIDE_HOME_1: /home/runner/.stride-1 | |
# LSP_COUNT: 2 | |
# COSMOS_SDK: v47 | |
# run: tests/test_ica_delegate_happy.sh | |
# Baseline-9-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: v3.2.0 | |
# PROVIDER_ICS: v2.4.0 | |
# # Reference ICS chain variables | |
# STRIDE_V18_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-consumer-v18.0.0/strided-consumer-linux | |
# 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_BINARY: strided | |
# STRIDE_WALLET_1: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# STRIDE_WALLET_LIQUID: stride17n3vkvg6lwf98p3kanlhlyjk6zkrfla9zrhma6 | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Select Hermes | |
# if: ${{ matrix.relayer == 'hermes' }} | |
# run: echo "RELAYER=hermes" >> $GITHUB_ENV | |
# - name: Select Go Relayer | |
# if: ${{ matrix.relayer == 'rly' }} | |
# run: echo "RELAYER=rly" >> $GITHUB_ENV | |
# - name: Set up relayer | |
# run: scripts/setup_relayer.sh | |
# - name: Download consumer chain binaries | |
# run: | | |
# wget $NEUTRON_V2_BINARY_URL -O $HOME/go/bin/$NEUTRON_CHAIN_BINARY -q | |
# chmod +x $HOME/go/bin/$NEUTRON_CHAIN_BINARY | |
# wget $STRIDE_V18_BINARY_URL -O $HOME/go/bin/$STRIDE_CHAIN_BINARY -q | |
# chmod +x $HOME/go/bin/$STRIDE_CHAIN_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 "$NEUTRON_BINARY runs off $NEUTRON_V2_BINARY_URL" | |
# echo "$STRIDE_BINARY runs off $STRIDE_V18_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 Neutron consumer chain | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: neutron-test | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize Neutron consumer chain | |
# env: | |
# CONSUMER_CHAIN_ID: neutron-test | |
# CONSUMER_DENOM: untrn | |
# CONSUMER_HOME_1: /home/runner/.neutron-1 | |
# CONSUMER_HOME_2: /home/runner/.neutron-2 | |
# CONSUMER_HOME_3: /home/runner/.neutron-3 | |
# CONSUMER_SERVICE_1: neutron-1.service | |
# CONSUMER_SERVICE_2: neutron-2.service | |
# CONSUMER_SERVICE_3: neutron-3.service | |
# CON1_API_PORT: 31301 | |
# CON2_API_PORT: 31302 | |
# CON3_API_PORT: 31303 | |
# CON1_GRPC_PORT: 31311 | |
# CON2_GRPC_PORT: 31312 | |
# CON3_GRPC_PORT: 31313 | |
# CON1_RPC_PORT: 31321 | |
# CON2_RPC_PORT: 31322 | |
# CON3_RPC_PORT: 31323 | |
# CON1_P2P_PORT: 31331 | |
# CON2_P2P_PORT: 31332 | |
# CON3_P2P_PORT: 31333 | |
# CON1_PPROF_PORT: 31341 | |
# CON2_PPROF_PORT: 31342 | |
# CON3_PPROF_PORT: 31343 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain neutron-test | |
# env: | |
# CONSUMER_CHAIN_ID: neutron-test | |
# CONSUMER_HOME_1: /home/runner/.neutron-1 | |
# CONSUMER_HOME_2: /home/runner/.neutron-2 | |
# CONSUMER_HOME_3: /home/runner/.neutron-3 | |
# CONSUMER_ICS: v3.1.0 | |
# PROVIDER_ICS: v2.4.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain neutron-test | |
# env: | |
# CONSUMER_CHAIN_ID: neutron-test | |
# CONSUMER_SERVICE_1: neutron-1.service | |
# CONSUMER_SERVICE_2: neutron-2.service | |
# CONSUMER_SERVICE_3: neutron-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> Neutron chain | |
# env: | |
# CON1_RPC_PORT: 31321 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for Neutron chain | |
# env: | |
# CONSUMER_CHAIN_ID: neutron-test | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > neutron-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' neutron-1.json > neutron-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID neutron --file neutron-2.json | |
# rly transact connection neutron | |
# rly transact channel neutron --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> Neutron chain | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.neutron-1 | |
# CON1_RPC_PORT: 31321 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> Neutron chain | |
# env: | |
# CONSUMER_CHAIN_ID: neutron-test | |
# CONSUMER_CHAIN_BINARY: neutrond | |
# CONSUMER_HOME_1: /home/runner/.neutron-1 | |
# CONSUMER_DENOM: untrn | |
# RECIPIENT: neutron1r5v5srda7xfth3hn2s26txvrcrntldjul5wedc | |
# GAS_PRICE: 0.02 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Add Stride consumer chain | |
# env: | |
# COSMOS_SDK: v45 | |
# CONSUMER_CHAIN_ID: stride-test | |
# run: | | |
# scripts/add_consumer.sh | |
# - name: Initialize Stride consumer chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_DENOM: ustrd | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_HOME_2: /home/runner/.stride-2 | |
# CONSUMER_HOME_3: /home/runner/.stride-3 | |
# CONSUMER_SERVICE_1: stride-1.service | |
# CONSUMER_SERVICE_2: stride-2.service | |
# CONSUMER_SERVICE_3: stride-3.service | |
# CON1_API_PORT: 32301 | |
# CON2_API_PORT: 32302 | |
# CON3_API_PORT: 32303 | |
# CON1_GRPC_PORT: 32311 | |
# CON2_GRPC_PORT: 32312 | |
# CON3_GRPC_PORT: 32313 | |
# CON1_RPC_PORT: 32321 | |
# CON2_RPC_PORT: 32322 | |
# CON3_RPC_PORT: 32323 | |
# CON1_P2P_PORT: 32331 | |
# CON2_P2P_PORT: 32332 | |
# CON3_P2P_PORT: 32333 | |
# CON1_PPROF_PORT: 32341 | |
# CON2_PPROF_PORT: 32342 | |
# CON3_PPROF_PORT: 32343 | |
# DOWNTIME_BLOCKS: 100000 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# scripts/init_consumer_assign_keys.sh | |
# sleep 20 | |
# - name: Prepare consumer chain stride-test | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_HOME_2: /home/runner/.stride-2 | |
# CONSUMER_HOME_3: /home/runner/.stride-3 | |
# CONSUMER_ICS: v3.2.0 | |
# PROVIDER_ICS: v2.4.0 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# scripts/prepare_consumer.sh | |
# - name: Start consumer chain stride-test | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_SERVICE_1: stride-1.service | |
# CONSUMER_SERVICE_2: stride-2.service | |
# CONSUMER_SERVICE_3: stride-3.service | |
# run: | | |
# sudo systemctl enable $CONSUMER_SERVICE_1 --now | |
# sleep 5 | |
# journalctl -u $CONSUMER_SERVICE_1 | |
# - name: _Pre-upgrade consumer chain produces blocks> Stride chain | |
# env: | |
# CON1_RPC_PORT: 32321 | |
# run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5 | |
# - name: Establish CCV channel for Stride chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# run: | | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# if [ $RELAYER == "hermes" ]; then | |
# echo "Creating channel with Hermes..." | |
# hermes create connection --a-chain $CONSUMER_CHAIN_ID --a-client 07-tendermint-0 --b-client $client_id | |
# hermes create channel --a-chain $CONSUMER_CHAIN_ID --a-port consumer --b-port provider --order ordered --a-connection connection-0 --channel-version 1 | |
# elif [ $RELAYER == "rly" ]; then | |
# echo "Creating channel with Go relayer..." | |
# jq --arg CHAIN "$CONSUMER_CHAIN_ID" '.src."chain-id" = $CHAIN' templates/rly-path-template.json > stride-1.json | |
# jq --arg CLIENT "$client_id" '.dst."client-id" = $CLIENT' stride-1.json > stride-2.json | |
# rly paths add $CHAIN_ID $CONSUMER_CHAIN_ID stride --file stride-2.json | |
# rly transact connection stride | |
# rly transact channel stride --src-port consumer --dst-port provider --order ordered --version 1 | |
# fi | |
# sudo systemctl restart $RELAYER | |
# sleep 10 | |
# - name: _Pre-upgrade CCV channel verified> Stride chain | |
# env: | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CON1_RPC_PORT: 32321 | |
# run: tests/test_ccv_key_assignment.sh | |
# - name: _Pre-upgrade IBC transfer successful> Stride chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_CHAIN_BINARY: strided | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_DENOM: ustrd | |
# RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: Test software upgrade for published releases | |
# if: ${{ matrix.upgrade_version != 'main' }} | |
# env: | |
# DOWNLOAD_URL: https://github.com/cosmos/gaia/releases/download/${{ matrix.upgrade_version }}/gaiad-${{ matrix.upgrade_version }}-linux-amd64 | |
# run: | | |
# echo $DOWNLOAD_URL | |
# scripts/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v15 | |
# - 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 v15 | |
# - 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.02 | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$NEUTRON_CHAIN_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# - name: _IBC transfer successful> Stride chain | |
# env: | |
# CONSUMER_CHAIN_ID: stride-test | |
# CONSUMER_CHAIN_BINARY: strided | |
# CONSUMER_HOME_1: /home/runner/.stride-1 | |
# CONSUMER_DENOM: ustrd | |
# RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn | |
# run: | | |
# export CONSUMER_CHAIN_BINARY=$STRIDE_CHAIN_BINARY | |
# client_id=$($CHAIN_BINARY q provider list-consumer-chains -o json --home $HOME_1 | jq -r --arg chain "$CONSUMER_CHAIN_ID" '.chains[] | select(.chain_id==$chain).client_id') | |
# connection_id=$($CHAIN_BINARY q ibc connection connections -o json --home $HOME_1 | jq -r --arg client "$client_id" '.connections[] | select(.client_id==$client).id') | |
# channel_id=$($CHAIN_BINARY q ibc channel connections $connection_id -o json --home $HOME_1 | jq -r '.channels[] | select(.port_id=="transfer").channel_id') | |
# tests/test_consumer_ibc_transfer.sh $channel_id | |
# v16-1-tbd: | |
# runs-on: ubuntu-22.04 | |
# needs: set-version-matrix | |
# strategy: | |
# matrix: | |
# ${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }} | |
# fail-fast: false | |
# env: | |
# COSMOVISOR_VERSION: ${{ matrix.cv_version }} | |
# UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }} | |
# steps: | |
# - name: start-version | |
# run: echo ${{matrix.gaia_version}} | |
# - name: target-version | |
# run: echo ${{matrix.upgrade_version}} | |
# - name: target-commit | |
# if: ${{ matrix.upgrade_version == 'main' }} | |
# run: | | |
# BUILD_TAG=gaiad-linux-${{matrix.upgrade_version}} | |
# TARGET_COMMIT=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/hyphacoop/cosmos-builds/releases/tags/$BUILD_TAG | jq -r '.name') | |
# echo TARGET_COMMIT: $TARGET_COMMIT | |
# - name: Update PATH | |
# run: | | |
# mkdir -p $HOME/go/bin | |
# echo "$HOME/go/bin" >> $GITHUB_PATH | |
# echo "$HOME/.hermes" >> $GITHUB_PATH | |
# echo "$HOME/.relayer" >> $GITHUB_PATH | |
# - name: Bypass the grub-efi-amd64-signed package | |
# run: sudo apt-mark hold grub-efi-amd64-signed | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Set up Python | |
# uses: actions/setup-python@v3 | |
# with: | |
# python-version: '3.10' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install toml-cli | |
# - name: Install Cosmovisor > v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version != 'v1.3.0' }} | |
# run: | | |
# go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Install Cosmovisor v1.3.0 | |
# if: ${{ (matrix.upgrade_mechanism == 'cv_manual' || matrix.upgrade_mechanism == 'cv_auto') && matrix.cv_version == 'v1.3.0' }} | |
# run: | | |
# go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@$COSMOVISOR_VERSION | |
# echo "COSMOVISOR=true" >> $GITHUB_ENV | |
# echo "$HOME_1/cosmovisor/current/bin" >> $GITHUB_PATH | |
# - name: Start chain | |
# env: | |
# START_VERSION: ${{matrix.gaia_version}} | |
# run: | | |
# export CHAIN_BINARY_URL=https://github.com/cosmos/gaia/releases/download/$START_VERSION/gaiad-$START_VERSION-linux-amd64 | |
# scripts/start_chain.sh | |
# - name: Check Gaia log | |
# run: sudo journalctl -u $PROVIDER_SERVICE_1 | |
# - name: Print Gaia version | |
# run: $CHAIN_BINARY version --long | |
# - name: Block production check | |
# run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5 # 5 blocks | |
# - name: _Pre-upgrade test | |
# env: | |
# UPGRADED_V16: false | |
# run: | | |
# tests/gaia-v16/test.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 v15 | |
# - 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 v15 | |
# - name: _Blocks produced after upgrade | |
# run: | | |
# tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 10 | |
# - name: Flush "migration successful" lines | |
# run: | | |
# $CHAIN_BINARY keys list --home $HOME_1 | |
# - name: _Post-upgrade test | |
# env: | |
# UPGRADED_V16: true | |
# run: | | |
# tests/gaia-v16/test.sh | |