Skip to content

Test Gaia Fresh State Upgrade - v14 #223

Test Gaia Fresh State Upgrade - v14

Test Gaia Fresh State Upgrade - v14 #223

---
name: Test Gaia Fresh State Upgrade - v14
on:
# repository_dispatch:
# types: [new_main_build]
schedule:
- cron: '0 6,14 * * 1-6'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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=$(tests/generate_version_matrix.py v13.0.2)
echo $start
echo "start_versions=$start" >> $GITHUB_OUTPUT
- name: Generate upgrade versions
id: generate-upgrade
run: |
upgrade=$(tests/generate_upgrade_matrix_fresh.py v13.0.2)
echo $upgrade
echo "upgrade_versions=$upgrade" >> $GITHUB_OUTPUT
outputs:
upgrade_versions: ${{ steps.generate-upgrade.outputs.upgrade_versions }}
test-upgrade:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }}
fail-fast: false
environment: major-upgrade-fresh-workflow
env:
COMMIT_TIMEOUT: 3
COSMOVISOR: false
COSMOVISOR_VERSION: ${{ matrix.cv_version }}
UPGRADE_MECHANISM: ${{ matrix.upgrade_mechanism }}
# Provider chain variables
CHAIN_BINARY: gaiad
CHAIN_ID: testnet
DENOM: uatom
BASE_FEES: 1500
HIGH_FEES: 10000
GAS: auto
GAS_ADJUSTMENT: 1.4
VOTING_PERIOD: 10s
# Provider node 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
DOWNTIME_BLOCKS: 10000
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
HERMES_VERSION: v1.7.0
ICS_120: false
# 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_V3_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V3_BINARY: consumerd_v3.1.0
# Sovereign-ICS chain variables
STRIDE_SOV_CHAIN_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-v11.0.0/stride-v11.0.0-linux-amd64
STRIDE_CON_CHAIN_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/stride-v12.1.0/stride-v12.1.0-linux-amd64
STRIDE_CHAIN_BINARY: strided
STRIDE_CHAIN_ID: five
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
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: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V12_BINARY runs off $CONSUMER_CHAIN_V12_BINARY_URL"
echo "$CONSUMER_CHAIN_V2_BINARY runs off $CONSUMER_CHAIN_V2_BINARY_URL"
echo "$CONSUMER_CHAIN_V3_BINARY runs off $CONSUMER_CHAIN_V3_BINARY_URL"
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $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
tests/major_fresh_upgrade/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: Validators initial state
run: |
$CHAIN_BINARY q staking validators -o json --home $HOME_1 | jq '.'
- name: Set up relayer
run: tests/v14_upgrade/setup_relayer.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V12_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V12_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V12_BINARY
wget $CONSUMER_CHAIN_V2_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V2_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V2_BINARY
wget $CONSUMER_CHAIN_V3_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY
- name: Initialize consumer chain with ICS v1.2.0-multiden
env:
CONSUMER_CHAIN_ID: one-v120
CONSUMER_HOME_1: /home/runner/.one_1
CONSUMER_HOME_2: /home/runner/.one_2
CONSUMER_HOME_3: /home/runner/.one_3
CONSUMER_SERVICE_1: one_1.service
CONSUMER_SERVICE_2: one_2.service
CONSUMER_SERVICE_3: one_3.service
CON1_API_PORT: 25101
CON2_API_PORT: 25102
CON3_API_PORT: 25103
CON1_GRPC_PORT: 26101
CON2_GRPC_PORT: 26102
CON3_GRPC_PORT: 26103
CON1_RPC_PORT: 27101
CON2_RPC_PORT: 27102
CON3_RPC_PORT: 27103
CON1_P2P_PORT: 28101
CON2_P2P_PORT: 28102
CON3_P2P_PORT: 28103
CON1_PPROF_PORT: 29101
CON2_PPROF_PORT: 29102
CON3_PPROF_PORT: 29103
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V12_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain one-v120
env:
CONSUMER_CHAIN_ID: one-v120
CONSUMER_HOME_1: /home/runner/.one_1
CONSUMER_HOME_2: /home/runner/.one_2
CONSUMER_HOME_3: /home/runner/.one_3
run: |
ICS_120=true
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain one-v120
env:
CONSUMER_CHAIN_ID: one-v120
CONSUMER_SERVICE_1: one_1.service
CONSUMER_SERVICE_2: one_2.service
CONSUMER_SERVICE_3: one_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 v1.2.0-multiden
env:
CON1_RPC_PORT: 27101
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for one-v120
env:
CONSUMER_CHAIN_ID: one-v120
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v1.2.0-multiden
env:
CON1_RPC_PORT: 27101
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Pre-upgrade IBC transfer successful> ICS v1.2.0-multiden
env:
CONSUMER_CHAIN_ID: one-v120
CONSUMER_HOME_1: /home/runner/.one_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V12_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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: Initialize consumer chain with ICS v2.0.0
env:
CONSUMER_CHAIN_ID: two-v200
CONSUMER_HOME_1: /home/runner/.two_1
CONSUMER_HOME_2: /home/runner/.two_2
CONSUMER_HOME_3: /home/runner/.two_3
CONSUMER_SERVICE_1: two_1.service
CONSUMER_SERVICE_2: two_2.service
CONSUMER_SERVICE_3: two_3.service
CON1_API_PORT: 25201
CON2_API_PORT: 25202
CON3_API_PORT: 25203
CON1_GRPC_PORT: 26201
CON2_GRPC_PORT: 26202
CON3_GRPC_PORT: 26203
CON1_RPC_PORT: 27201
CON2_RPC_PORT: 27202
CON3_RPC_PORT: 27203
CON1_P2P_PORT: 28201
CON2_P2P_PORT: 28202
CON3_P2P_PORT: 28203
CON1_PPROF_PORT: 29201
CON2_PPROF_PORT: 29202
CON3_PPROF_PORT: 29203
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V2_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain two-v200
env:
CONSUMER_CHAIN_ID: two-v200
CONSUMER_HOME_1: /home/runner/.two_1
CONSUMER_HOME_2: /home/runner/.two_2
CONSUMER_HOME_3: /home/runner/.two_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain two-v200
env:
CONSUMER_CHAIN_ID: two-v200
CONSUMER_SERVICE_1: two_1.service
CONSUMER_SERVICE_2: two_2.service
CONSUMER_SERVICE_3: two_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 v2.0.0 chain 1
run: tests/test_block_production.sh 127.0.0.1 27201 5
- name: Establish CCV channel for two-v200
env:
CONSUMER_CHAIN_ID: two-v200
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v2.0.0 chain 1
env:
CON1_RPC_PORT: 27201
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Pre-upgrade IBC transfer successful> ICS v2.0.0 chain 1
env:
CONSUMER_CHAIN_ID: two-v200
CONSUMER_HOME_1: /home/runner/.two_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V2_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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_3.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON3_API_PORT: 25303
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON3_GRPC_PORT: 26303
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON3_RPC_PORT: 27303
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON3_P2P_PORT: 28303
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
CON3_PPROF_PORT: 29303
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_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: 27301
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for three-v310
env:
CONSUMER_CHAIN_ID: three-v310
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_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/major_fresh_upgrade/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
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- 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: |
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- name: _Blocks produced after upgrade
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5
- name: _Transactions verified> bank send, delegate, and withdraw rewards
env:
BASE_FEES: 2000
run: tests/patch_upgrade/patch_test_tx.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: _CCV channel verified> ICS v1.2.0-multiden
env:
CON1_RPC_PORT: 27101
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _CCV channel verified> ICS v2.0.0 chain 1
env:
CON1_RPC_PORT: 27201
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _CCV channel verified> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: Initialize consumer chain with ICS v2.0.0
env:
CONSUMER_CHAIN_ID: four-v200
CONSUMER_HOME_1: /home/runner/.four_1
CONSUMER_HOME_2: /home/runner/.four_2
CONSUMER_HOME_3: /home/runner/.four_3
CONSUMER_SERVICE_1: four_1.service
CONSUMER_SERVICE_2: four_2.service
CONSUMER_SERVICE_3: four_3.service
CON1_API_PORT: 25401
CON2_API_PORT: 25402
CON3_API_PORT: 25403
CON1_GRPC_PORT: 26401
CON2_GRPC_PORT: 26402
CON3_GRPC_PORT: 26403
CON1_RPC_PORT: 27401
CON2_RPC_PORT: 27402
CON3_RPC_PORT: 27403
CON1_P2P_PORT: 28401
CON2_P2P_PORT: 28402
CON3_P2P_PORT: 28403
CON1_PPROF_PORT: 29401
CON2_PPROF_PORT: 29402
CON3_PPROF_PORT: 29403
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V2_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain four-v200
env:
CONSUMER_CHAIN_ID: four-v200
CONSUMER_HOME_1: /home/runner/.four_1
CONSUMER_HOME_2: /home/runner/.four_2
CONSUMER_HOME_3: /home/runner/.four_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain four-v200
env:
CONSUMER_CHAIN_ID: four-v200
CONSUMER_SERVICE_1: four_1.service
CONSUMER_SERVICE_2: four_2.service
CONSUMER_SERVICE_3: four_3.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_1 --now
sleep 5
journalctl -u $CONSUMER_SERVICE_1
- name: _Consumer chain produces blocks> ICS v2.0.0 chain 2
env:
CON1_RPC_PORT: 27401
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for four-v200
env:
CONSUMER_CHAIN_ID: four-v200
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')
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
sudo systemctl restart hermes
sleep 10
- name: _CCV channel verified> ICS v2.0.0 chain 2
env:
CON1_RPC_PORT: 27401
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _IBC transfer successful> ICS v2.0.0 chain 2
env:
CONSUMER_CHAIN_ID: four-v200
CONSUMER_HOME_1: /home/runner/.four_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V2_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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: Start Stride chain
run: tests/major_fresh_upgrade/start_stride.sh
- name: Check Stride produces blocks
run: tests/test_block_production.sh 127.0.0.1 $STRIDE_RPC_1 5 # 5 blocks
- name: Prepare Stride chain upgrade # saves $STRIDE_REV_HEIGHT environment variable
run: tests/major_fresh_upgrade/upgrade_stride.sh
- name: Re-launch Stride as a consumer chain
run: tests/major_fresh_upgrade/launch_stride_consumer.sh
- name: _Consumer chain produces blocks after changeover from sovereign
run: tests/test_block_production.sh 127.0.0.1 $STRIDE_RPC_1 5 # 5 blocks
- name: Establish CCV channel for five
env:
CONSUMER_CHAIN_ID: five
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')
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
sudo systemctl restart hermes
sleep 10
- name: _CCV channel verified> sovereign-consumer chain
env:
CON1_RPC_PORT: 37001
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _IBC transfer successful> sovereign-consumer chain
env:
CONSUMER_CHAIN_ID: five
CONSUMER_HOME_1: /home/runner/.stride1
CONSUMER_CHAIN_BINARY: strided
CONSUMER_DENOM: ustrd
CONSUMER_FEES: 1000
RECIPIENT: stride1r5v5srda7xfth3hn2s26txvrcrntldjucq88rn
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')
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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: Register and fund ICA
run: tests/v12_upgrade/setup_ica.sh
- name: Set test LSM params
run: |
tests/param_change.sh tests/v12_upgrade/proposal-global-liquid-cap.json
tests/param_change.sh tests/v12_upgrade/proposal-validator-liquid-cap.json
tests/param_change.sh tests/v12_upgrade/proposal-validator-bond-factor.json
- name: lsm-happy-1
env:
BASE_FEES: 3000
CONSUMER_FEES: 1000
IBC_CHANNEL: channel-9
run: tests/v12_upgrade/lsm_happy_path.sh
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: six-v310
CONSUMER_HOME_1: /home/runner/.six_1
CONSUMER_HOME_2: /home/runner/.six_2
CONSUMER_HOME_3: /home/runner/.six_3
CONSUMER_SERVICE_1: six_1.service
CONSUMER_SERVICE_2: six_2.service
CONSUMER_SERVICE_3: six_3.service
CON1_API_PORT: 25601
CON2_API_PORT: 25602
CON3_API_PORT: 25603
CON1_GRPC_PORT: 26601
CON2_GRPC_PORT: 26602
CON3_GRPC_PORT: 26603
CON1_RPC_PORT: 27601
CON2_RPC_PORT: 27602
CON3_RPC_PORT: 27603
CON1_P2P_PORT: 28601
CON2_P2P_PORT: 28602
CON3_P2P_PORT: 28603
CON1_PPROF_PORT: 29601
CON2_PPROF_PORT: 29602
CON3_PPROF_PORT: 29603
DOWNTIME_BLOCKS: 10
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain six-v310
env:
CONSUMER_CHAIN_ID: six-v310
CONSUMER_HOME_1: /home/runner/.six_1
CONSUMER_HOME_2: /home/runner/.six_2
CONSUMER_HOME_3: /home/runner/.six_3
CONSUMER_SERVICE_1: six_1.service
CONSUMER_SERVICE_2: six_2.service
CONSUMER_SERVICE_3: six_3.service
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain six-v310
env:
CONSUMER_CHAIN_ID: six-v310
CONSUMER_SERVICE_1: six_1.service
CONSUMER_SERVICE_2: six_2.service
CONSUMER_SERVICE_3: six_3.service
run: |
sudo systemctl enable $CONSUMER_SERVICE_1 --now
sleep 5
journalctl -u $CONSUMER_SERVICE_1
- name: _Consumer chain produces blocks> ICS v3.1.0 chain 2
env:
CON1_RPC_PORT: 27601
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for six-v310
env:
CONSUMER_CHAIN_ID: six-v310
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')
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
sudo systemctl restart hermes
sleep 10
- name: _CCV channel verified> ICS v3.1.0 chain 2
env:
CON1_RPC_PORT: 27601
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _IBC transfer successful> ICS v2.0.0 chain 2
env:
CONSUMER_CHAIN_ID: six-v310
CONSUMER_HOME_1: /home/runner/.six_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: _Final CCV channel check> ICS v1.2.0-multiden
env:
CON1_RPC_PORT: 27101
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Final CCV channel check> ICS v2.0.0 chain 1
env:
CON1_RPC_PORT: 27201
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Final CCV channel check> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Final CCV channel check> ICS v2.0.0 chain 2
env:
CON1_RPC_PORT: 27401
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Final CCV channel check> sovereign-consumer chain
env:
CON1_RPC_PORT: 37001
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Final CCV channel check> ICS v3.1.0 chain 2
env:
CON1_RPC_PORT: 27601
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Soft opt-out test> Validator must be jailed
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
test-double-sign:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }}
fail-fast: false
env:
COMMIT_TIMEOUT: 3
COSMOVISOR: false
UPGRADE_MECHANISM: binary
# Provider chain variables
CHAIN_BINARY: gaiad
CHAIN_ID: testnet
DENOM: uatom
BASE_FEES: 1500
HIGH_FEES: 10000
GAS: auto
GAS_ADJUSTMENT: 1.4
VOTING_PERIOD: 10s
# Provider node 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: 500000000
VAL2_STAKE: 500000000
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
DOWNTIME_BLOCKS: 10000
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
HERMES_VERSION: v1.7.0
ICS_120: false
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V3_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V3_BINARY: consumerd_v3.1.0
steps:
- name: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V3_BINARY runs off $CONSUMER_CHAIN_V3_BINARY_URL"
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $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: 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
tests/major_fresh_upgrade/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 relayer
run: tests/v14_upgrade/setup_relayer_v14.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V3_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_3.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON3_API_PORT: 25303
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON3_GRPC_PORT: 26303
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON3_RPC_PORT: 27303
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON3_P2P_PORT: 28303
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
CON3_PPROF_PORT: 29303
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_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: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for three-v310
env:
CONSUMER_CHAIN_ID: three-v310
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_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/major_fresh_upgrade/test_consumer_ibc_transfer.sh $channel_id
- name: _Test double signing> equivocation via proposal
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
EQ_PROVIDER_HOME: /home/runner/.eqp
EQ_CONSUMER_HOME_1: /home/runner/.eqc_1
EQ_CONSUMER_HOME_2: /home/runner/.eqc_2
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
EQ_PROVIDER_SERVICE: eq_provider.service
EQ_CONSUMER_SERVICE_1: eq_consumer_1.service
EQ_CONSUMER_SERVICE_2: eq_consumer_2.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
EQ_PROV_API_PORT: 25004
EQ_PROV_GRPC_PORT: 26004
EQ_PROV_RPC_PORT: 27004
EQ_PROV_P2P_PORT: 28004
EQ_PROV_PPROF_PORT: 29004
EQ_CON_API_PORT_1: 25104
EQ_CON_API_PORT_2: 25204
EQ_CON_GRPC_PORT_1: 26104
EQ_CON_GRPC_PORT_2: 26204
EQ_CON_RPC_PORT_1: 27104
EQ_CON_RPC_PORT_2: 27204
EQ_CON_P2P_PORT_1: 28104
EQ_CON_P2P_PORT_2: 28204
EQ_CON_PPROF_PORT_1: 29104
EQ_CON_PPROF_PORT_2: 29204
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/v14_upgrade/double-sign-proposal.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
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- 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: |
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- name: _Blocks produced after upgrade
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5
# - name: _Transactions verified> bank send, delegate, and withdraw rewards
# env:
# BASE_FEES: 2000
# run: tests/patch_upgrade/patch_test_tx.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: _CCV channel verified> ICS v3.1.0
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Test double signing> equivocation via detection
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
EQ_PROVIDER_HOME: /home/runner/.eqp
EQ_CONSUMER_HOME_1: /home/runner/.eqc_1
EQ_CONSUMER_HOME_2: /home/runner/.eqc_2
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
EQ_PROVIDER_SERVICE: eq_provider.service
EQ_CONSUMER_SERVICE_1: eq_consumer_1.service
EQ_CONSUMER_SERVICE_2: eq_consumer_2.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
EQ_PROV_API_PORT: 25004
EQ_PROV_GRPC_PORT: 26004
EQ_PROV_RPC_PORT: 27004
EQ_PROV_P2P_PORT: 28004
EQ_PROV_PPROF_PORT: 29004
EQ_CON_API_PORT_1: 25104
EQ_CON_API_PORT_2: 25204
EQ_CON_GRPC_PORT_1: 26104
EQ_CON_GRPC_PORT_2: 26204
EQ_CON_RPC_PORT_1: 27104
EQ_CON_RPC_PORT_2: 27204
EQ_CON_P2P_PORT_1: 28104
EQ_CON_P2P_PORT_2: 28204
EQ_CON_PPROF_PORT_1: 29104
EQ_CON_PPROF_PORT_2: 29204
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
sudo systemctl start hermes-evidence
tests/v14_upgrade/double-sign-detection.sh
sudo systemctl stop hermes-evidence
- name: _Test double signing> equivocation with assigned key via detection
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
EQ_PROVIDER_HOME: /home/runner/.eqp
EQ_CONSUMER_HOME_1: /home/runner/.eqc_1
EQ_CONSUMER_HOME_2: /home/runner/.eqc_2
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
EQ_PROVIDER_SERVICE: eq_provider.service
EQ_CONSUMER_SERVICE_1: eq_consumer_1.service
EQ_CONSUMER_SERVICE_2: eq_consumer_2.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
EQ_PROV_API_PORT: 25004
EQ_PROV_GRPC_PORT: 26004
EQ_PROV_RPC_PORT: 27004
EQ_PROV_P2P_PORT: 28004
EQ_PROV_PPROF_PORT: 29004
EQ_CON_API_PORT_1: 25104
EQ_CON_API_PORT_2: 25204
EQ_CON_GRPC_PORT_1: 26104
EQ_CON_GRPC_PORT_2: 26204
EQ_CON_RPC_PORT_1: 27104
EQ_CON_RPC_PORT_2: 27204
EQ_CON_P2P_PORT_1: 28104
EQ_CON_P2P_PORT_2: 28204
EQ_CON_PPROF_PORT_1: 29104
EQ_CON_PPROF_PORT_2: 29204
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
sudo systemctl start hermes-evidence
tests/v14_upgrade/double-sign-detection-key.sh
sudo systemctl stop hermes-evidence
test-fork:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }}
fail-fast: false
env:
COMMIT_TIMEOUT: 3
COSMOVISOR: false
UPGRADE_MECHANISM: binary
# Provider chain variables
CHAIN_BINARY: gaiad
CHAIN_ID: testnet
DENOM: uatom
BASE_FEES: 1500
HIGH_FEES: 10000
GAS: auto
GAS_ADJUSTMENT: 1.4
VOTING_PERIOD: 10s
# Provider node 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: 500000000
VAL2_STAKE: 500000000
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
DOWNTIME_BLOCKS: 10000
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
HERMES_VERSION: v1.7.0
ICS_120: false
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V3_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V3_BINARY: consumerd_v3.1.0
steps:
- name: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V3_BINARY runs off $CONSUMER_CHAIN_V3_BINARY_URL"
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $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: 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
tests/major_fresh_upgrade/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 relayer
run: tests/v14_upgrade/setup_relayer_v14.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V3_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY
- name: Initialize consumer chain with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_3.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON3_API_PORT: 25303
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON3_GRPC_PORT: 26303
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON3_RPC_PORT: 27303
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON3_P2P_PORT: 28303
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
CON3_PPROF_PORT: 29303
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/major_fresh_upgrade/init_consumer.sh
- name: Prepare consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_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: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for three-v310
env:
CONSUMER_CHAIN_ID: three-v310
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_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/major_fresh_upgrade/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
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- 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: |
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- name: _Blocks produced after upgrade
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5
- name: _CCV channel verified> ICS v3.1.0
env:
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv.sh
- name: _Test fork> equivocation via detection
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_HOME_1F: /home/runner/.three_1f
CONSUMER_HOME_2F: /home/runner/.three_2f
CONSUMER_SERVICE_1F: three_1f.service
CONSUMER_SERVICE_2F: three_2f.service
CON1F_API_PORT: 25401
CON2F_API_PORT: 25402
CON1F_GRPC_PORT: 26401
CON2F_GRPC_PORT: 26402
CON1F_RPC_PORT: 27401
CON2F_RPC_PORT: 27402
CON1F_P2P_PORT: 28401
CON2F_P2P_PORT: 28402
CON1F_PPROF_PORT: 29401
CON2F_PPROF_PORT: 29402
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/v14_upgrade/light-client.sh
test-fork-key-assignment:
runs-on: ubuntu-22.04
needs: set-version-matrix
strategy:
matrix:
${{ fromJSON(needs.set-version-matrix.outputs.upgrade_versions) }}
fail-fast: false
env:
COMMIT_TIMEOUT: 3
COSMOVISOR: false
UPGRADE_MECHANISM: binary
# Provider chain variables
CHAIN_BINARY: gaiad
CHAIN_ID: testnet
DENOM: uatom
BASE_FEES: 1500
HIGH_FEES: 10000
GAS: auto
GAS_ADJUSTMENT: 1.4
VOTING_PERIOD: 10s
# Provider node 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: 500000000
VAL2_STAKE: 500000000
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
DOWNTIME_BLOCKS: 10000
RECIPIENT: cosmos1r5v5srda7xfth3hn2s26txvrcrntldjumt8mhl
HERMES_VERSION: v1.7.0
ICS_120: false
# Reference ICS chain variables
CONSUMER_DENOM: ucon
CONSUMER_FEES: 500
CONSUMER_CHAIN_V3_BINARY_URL: https://github.com/hyphacoop/cosmos-builds/releases/download/ics-v3.1.0/interchain-security-cd-linux
CONSUMER_CHAIN_V3_BINARY: consumerd_v3.1.0
steps:
- name: Consumer chain binary URLs
run: |
echo "$CONSUMER_CHAIN_V3_BINARY runs off $CONSUMER_CHAIN_V3_BINARY_URL"
- name: Update PATH
run: |
mkdir -p $HOME/go/bin
echo "$HOME/go/bin" >> $GITHUB_PATH
echo "$HOME/.hermes" >> $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: 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
tests/major_fresh_upgrade/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 relayer
run: tests/v14_upgrade/setup_relayer_v14.sh
- name: Download consumer chain binaries
run: |
wget $CONSUMER_CHAIN_V3_BINARY_URL -O $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY -q
chmod +x $HOME/go/bin/$CONSUMER_CHAIN_V3_BINARY
- name: Initialize consumer chain using key assignment with ICS v3.1.0
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_3.service
CON1_API_PORT: 25301
CON2_API_PORT: 25302
CON3_API_PORT: 25303
CON1_GRPC_PORT: 26301
CON2_GRPC_PORT: 26302
CON3_GRPC_PORT: 26303
CON1_RPC_PORT: 27301
CON2_RPC_PORT: 27302
CON3_RPC_PORT: 27303
CON1_P2P_PORT: 28301
CON2_P2P_PORT: 28302
CON3_P2P_PORT: 28303
CON1_PPROF_PORT: 29301
CON2_PPROF_PORT: 29302
CON3_PPROF_PORT: 29303
DOWNTIME_BLOCKS: 100000
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/major_fresh_upgrade/init_consumer_assign_keys.sh
- name: Prepare consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_HOME_3: /home/runner/.three_3
run: |
tests/major_fresh_upgrade/prepare_consumer.sh
- name: Start consumer chain three-v310
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_SERVICE_3: three_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: _Pre-upgrade consumer chain produces blocks> ICS v3.1.0 chain 1
env:
CON1_RPC_PORT: 27301
run: tests/test_block_production.sh 127.0.0.1 $CON1_RPC_PORT 5
- name: Establish CCV channel for three-v310
env:
CONSUMER_CHAIN_ID: three-v310
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')
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
sudo systemctl restart hermes
sleep 10
- name: _Pre-upgrade CCV channel verified> ICS v3.1.0 chain 1
env:
CONSUMER_HOME_1: /home/runner/.three_1
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv_key_assignment.sh
- name: _Pre-upgrade IBC transfer successful> ICS v3.1.0 chain 1
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_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/major_fresh_upgrade/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
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- 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: |
tests/major_fresh_upgrade/software_upgrade.sh 127.0.0.1 $VAL1_RPC_PORT v14
- name: _Blocks produced after upgrade
run: tests/test_block_production.sh 127.0.0.1 $VAL1_RPC_PORT 5
- name: _CCV channel verified> ICS v3.1.0
env:
CONSUMER_HOME_1: /home/runner/.three_1
CON1_RPC_PORT: 27301
run: tests/major_fresh_upgrade/test_ccv_key_assignment.sh
- name: _Test fork> equivocation with key assignment via detection
env:
CONSUMER_CHAIN_ID: three-v310
CONSUMER_HOME_1: /home/runner/.three_1
CONSUMER_HOME_2: /home/runner/.three_2
CONSUMER_SERVICE_1: three_1.service
CONSUMER_SERVICE_2: three_2.service
CONSUMER_HOME_1F: /home/runner/.three_1f
CONSUMER_HOME_2F: /home/runner/.three_2f
CONSUMER_SERVICE_1F: three_1f.service
CONSUMER_SERVICE_2F: three_2f.service
CON1F_API_PORT: 25401
CON2F_API_PORT: 25402
CON1F_GRPC_PORT: 26401
CON2F_GRPC_PORT: 26402
CON1F_RPC_PORT: 27401
CON2F_RPC_PORT: 27402
CON1F_P2P_PORT: 28401
CON2F_P2P_PORT: 28402
CON1F_PPROF_PORT: 29401
CON2F_PPROF_PORT: 29402
run: |
export CONSUMER_CHAIN_BINARY=$CONSUMER_CHAIN_V3_BINARY
tests/v14_upgrade/light-client.sh