From e44fadfc2aab6ea863168208e352062f845280c2 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 14:58:40 -0500 Subject: [PATCH 01/16] try export snapshot --- .../workflows/export-ics-testnet-snapshot.yml | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 .github/workflows/export-ics-testnet-snapshot.yml diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml new file mode 100644 index 00000000..7ae0e23b --- /dev/null +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -0,0 +1,155 @@ +--- +name: Export ICS Testnet Snapshot +on: + workflow_dispatch: + schedule: + # At 05:30 on Saturdays. + - cron: '30 5 * * 6' + push: +# concurrency: +# group: self-hosted-runners + +jobs: + export-ics-testnet-provider: + runs-on: cosmos-runner-set + environment: export-rs-testnet + env: + SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} + NODE_HOME: /home/runner/.gaia + CHAIN_ID: provider + CHAIN_BINARY: 'gaiad' + + steps: + # Get system info + - name: Install required packages + run: | + sudo apt update + sudo apt dist-upgrade -y + sudo apt -y install python-is-python3 python3-distutils screen curl jq wget python3-venv python3-pip build-essential git psmisc net-tools + - run: ifconfig + - run: lscpu + - 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: mkdir ~/artifact + run: mkdir ~/artifact + - name: Update Apt + run: | + sudo apt update + sudo apt dist-upgrade -y + - name: Install openssh-server + run: | + sudo apt install -y openssh-server + sudo mkdir /run/sshd + sudo /usr/sbin/sshd + - name: Setup SSH auth + run: | + if [ ! -d ~/.ssh ] + then + mkdir -m 700 ~/.ssh + fi + echo "$SSH_PUB_KEYS" > ~/.ssh/authorized_keys + ssh-keyscan files.polypore.xyz >> ~/.ssh/known_hosts + + - name: Set SSH key + run: | + if [ ! -d ~/.ssh ] + then + mkdir -m 700 ~/.ssh + fi + echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + - name: Check out repository code + uses: actions/checkout@v3 + - name: Init Python venv + run: python -m venv ~/env + - name: Install dependencies + run: | + source ~/env/bin/activate + python -m pip install --upgrade pip + python -m pip install toml-cli requests + + - name: Get current running gaiad version + run: | + RUNNING_VERSION=$(curl -s https://rpc.provider-sentry-01.ics-testnet.polypore.xyz/abci_info | jq -r '.result.response.version') + echo "Running gaiad version: $RUNNING_VERSION" + echo "RUNNING_VERSION=$RUNNING_VERSION" >> $GITHUB_ENV + - name: Download binary from cosmos/gaia repo + run: | + sudo wget -nv https://github.com/cosmos/gaia/releases/download/${{ env.RUNNING_VERSION }}/gaiad-${{ env.RUNNING_VERSION }}-linux-amd64 -O /usr/local/bin/gaiad + sudo chmod +x /usr/local/bin/gaiad + - name: Initializing chain to sync with RS Testnet + env: + NODE_MONIKER: provider + SERVICE_NAME: provider + GENESIS_URL: https://github.com/cosmos/testnets/raw/master/interchain-security/provider/provider-genesis.json + SEEDS: "08ec17e86dac67b9da70deb20177655495a55407@provider-seed-01.ics-testnet.polypore.xyz:26656,4ea6e56300a2f37b90e58de5ee27d1c9065cf871@provider-seed-02.ics-testnet.polypore.xyz:26656" + SYNC_RPC_1: https://rpc.provider-state-sync-01.ics-testnet.polypore.xyz:443 + SYNC_RPC_2: https://rpc.provider-state-sync-02.ics-testnet.polypore.xyz:443 + GAS_PRICES: "0.0025uatom" + run: | + echo "Initializing $NODE_HOME..." + $CHAIN_BINARY config set client chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config set client keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config set client broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME + sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml + echo "Configuring state sync..." + CURRENT_BLOCK=$(curl -s $SYNC_RPC_1/block | jq -r '.result.block.header.height') + TRUST_HEIGHT=$[$CURRENT_BLOCK-1000] + TRUST_BLOCK=$(curl -s $SYNC_RPC_1/block\?height\=$TRUST_HEIGHT) + TRUST_HASH=$(echo $TRUST_BLOCK | jq -r '.result.block_id.hash') + sed -i -e '/enable =/ s/= .*/= true/' $NODE_HOME/config/config.toml + sed -i -e '/trust_period =/ s/= .*/= "8h0m0s"/' $NODE_HOME/config/config.toml + sed -i -e "/trust_height =/ s/= .*/= $TRUST_HEIGHT/" $NODE_HOME/config/config.toml + sed -i -e "/trust_hash =/ s/= .*/= \"$TRUST_HASH\"/" $NODE_HOME/config/config.toml + sed -i -e "/rpc_servers =/ s^= .*^= \"$SYNC_RPC_1,$SYNC_RPC_2\"^" $NODE_HOME/config/config.toml + sed -i -e "/minimum-gas-prices =/ s^= .*^= \"$GAS_PRICES\"^" $NODE_HOME/config/app.toml + echo "Replaceing genesis..." + wget -nv $GENESIS_URL -O genesis.json + mv genesis.json $NODE_HOME/config/genesis.json + - name: Archive config files + run: mkdir -p /home/runner/artifact/config/provider && cp -rvp $NODE_HOME/config /home/runner/artifact/config/provider/ + - name: Start Chain + run: screen -L -Logfile /home/runner/artifact/gaiad_sync.log -S gaiad -d -m $CHAIN_BINARY start --x-crisis-skip-assert-invariants --home $NODE_HOME + - name: Wait for gaiad to start and stabilize + run: tests/test_block_production.sh 127.0.0.1 26657 50 1000 + - name: Syncing Chain + run: | + catching_up="true" + while [ $catching_up == "true" ] + do + catching_up=$(curl -s 127.0.0.1:26657/status | jq -r .result.sync_info.catching_up) + echo "Still Syncing: $catching_up" + sleep 5 + done + echo "Done Syncing" + - name: Stop gaiad + run: | + synced_block=$(gaiad status | jq -r '.sync_info.latest_block_height') + echo "synced_block=$synced_block" >> $GITHUB_ENV + killall gaiad screen + sleep 10s + - name: Create snapshot + run: | + cd $NODE_HOME + mkdir ~/snapshot + tar cfvz ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz data wasm + - name: Upload snapshot + run: | + echo "Compressing ~/.gaia ..." + cd /home/runner/ + ssh gh-actions@files.polypore.xyz rm /storage/snapshots/ics-testnet/provider/* + scp ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz gh-actions@files.polypore.xyz:/storage/snapshots/ics-testnet/provider + # Update latest file symlinks + ssh gh-actions@files.polypore.xyz ln -sf /storage/snapshots/ics-testnet/provider/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz /storage/snapshots/ics-testnet/provider/latest.tar.gz + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: export-ics-testnet-provider + path: ~/artifact/ From 45b5a9a28c24f8e840418f507523c4b1a503c078 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 15:08:55 -0500 Subject: [PATCH 02/16] return true --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 7ae0e23b..c395f933 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -143,7 +143,7 @@ jobs: run: | echo "Compressing ~/.gaia ..." cd /home/runner/ - ssh gh-actions@files.polypore.xyz rm /storage/snapshots/ics-testnet/provider/* + ssh gh-actions@files.polypore.xyz rm /storage/snapshots/ics-testnet/provider/* || true scp ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz gh-actions@files.polypore.xyz:/storage/snapshots/ics-testnet/provider # Update latest file symlinks ssh gh-actions@files.polypore.xyz ln -sf /storage/snapshots/ics-testnet/provider/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz /storage/snapshots/ics-testnet/provider/latest.tar.gz From 35a40b06e54f6861e7df0dc006a5c1d56762e419 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 15:32:39 -0500 Subject: [PATCH 03/16] use env and build --- .../workflows/export-ics-testnet-snapshot.yml | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index c395f933..8a33d432 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -12,7 +12,7 @@ on: jobs: export-ics-testnet-provider: runs-on: cosmos-runner-set - environment: export-rs-testnet + environment: export-ics-testnet-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia @@ -72,17 +72,30 @@ jobs: source ~/env/bin/activate python -m pip install --upgrade pip python -m pip install toml-cli requests - + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ vars.GO_VER }} - name: Get current running gaiad version run: | RUNNING_VERSION=$(curl -s https://rpc.provider-sentry-01.ics-testnet.polypore.xyz/abci_info | jq -r '.result.response.version') echo "Running gaiad version: $RUNNING_VERSION" echo "RUNNING_VERSION=$RUNNING_VERSION" >> $GITHUB_ENV - - name: Download binary from cosmos/gaia repo + # - name: Download binary from cosmos/gaia repo + # run: | + # sudo wget -nv https://github.com/cosmos/gaia/releases/download/${{ env.RUNNING_VERSION }}/gaiad-${{ env.RUNNING_VERSION }}-linux-amd64 -O /usr/local/bin/gaiad + # sudo chmod +x /usr/local/bin/gaiad + - name: Build gaia from source run: | - sudo wget -nv https://github.com/cosmos/gaia/releases/download/${{ env.RUNNING_VERSION }}/gaiad-${{ env.RUNNING_VERSION }}-linux-amd64 -O /usr/local/bin/gaiad - sudo chmod +x /usr/local/bin/gaiad - - name: Initializing chain to sync with RS Testnet + cd /home/runner + git clone https://github.com/cosmos/gaia.git + cd gaia + git checkout ${{ env.RUNNING_VERSION }} + git branch + make build + sudo cp build/gaiad /usr/local/bin/gaiad + gaiad version + - name: Initializing chain to sync with ICS Testnet env: NODE_MONIKER: provider SERVICE_NAME: provider From ce807c495f67bb93eaa50b91b574307f325d6c7f Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 15:49:14 -0500 Subject: [PATCH 04/16] debug --- .github/workflows/export-ics-testnet-snapshot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 8a33d432..69c0a534 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -90,10 +90,15 @@ jobs: cd /home/runner git clone https://github.com/cosmos/gaia.git cd gaia + echo "Checking out branch ${{ env.RUNNING_VERSION }}" git checkout ${{ env.RUNNING_VERSION }} + echo "git branch:" git branch + echo "make build..." make build + echo "Installing gaiad..." sudo cp build/gaiad /usr/local/bin/gaiad + echo "gaiad version:" gaiad version - name: Initializing chain to sync with ICS Testnet env: From e00717245e8818683fbf93acd5e94d2e0d208b67 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 16:50:10 -0500 Subject: [PATCH 05/16] rename env --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 69c0a534..67b36070 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -12,7 +12,7 @@ on: jobs: export-ics-testnet-provider: runs-on: cosmos-runner-set - environment: export-ics-testnet-snapshot + environment: export-ics-testnet-provider-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia From ee45b3ab4e897b17df1cdcb932b87ccd5e934109 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 17:21:08 -0500 Subject: [PATCH 06/16] export pion --- .../workflows/export-ics-testnet-snapshot.yml | 146 +++++++++++++++++- 1 file changed, 145 insertions(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 67b36070..012de7bf 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -10,7 +10,7 @@ on: # group: self-hosted-runners jobs: - export-ics-testnet-provider: + export-ics-testnet-provider-snapshot: runs-on: cosmos-runner-set environment: export-ics-testnet-provider-snapshot env: @@ -171,3 +171,147 @@ jobs: with: name: export-ics-testnet-provider path: ~/artifact/ + +export-ics-testnet-pion-snapshot: + runs-on: cosmos-runner-set + environment: export-ics-testnet-pion-snapshot + env: + SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} + NODE_HOME: /home/runner/.gaia + CHAIN_ID: provider + CHAIN_BINARY: 'gaiad' + + steps: + # Get system info + - name: Install required packages + run: | + sudo apt update + sudo apt dist-upgrade -y + sudo apt -y install python-is-python3 python3-distutils screen curl jq wget python3-venv python3-pip build-essential git psmisc net-tools + - run: ifconfig + - run: lscpu + - 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: mkdir ~/artifact + run: mkdir ~/artifact + - name: Update Apt + run: | + sudo apt update + sudo apt dist-upgrade -y + - name: Install openssh-server + run: | + sudo apt install -y openssh-server + sudo mkdir /run/sshd + sudo /usr/sbin/sshd + - name: Setup SSH auth + run: | + if [ ! -d ~/.ssh ] + then + mkdir -m 700 ~/.ssh + fi + echo "$SSH_PUB_KEYS" > ~/.ssh/authorized_keys + ssh-keyscan files.polypore.xyz >> ~/.ssh/known_hosts + + - name: Set SSH key + run: | + if [ ! -d ~/.ssh ] + then + mkdir -m 700 ~/.ssh + fi + echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + - name: Check out repository code + uses: actions/checkout@v3 + - name: Init Python venv + run: python -m venv ~/env + - name: Install dependencies + run: | + source ~/env/bin/activate + python -m pip install --upgrade pip + python -m pip install toml-cli requests + - name: Get current running neutrond version + run: | + RUNNING_VERSION=$(curl -s https://rpc.pion.ics-testnet.polypore.xyz/abci_info | jq -r '.result.response.version') + echo "Running neutrond version: $RUNNING_VERSION" + echo "RUNNING_VERSION=$RUNNING_VERSION" >> $GITHUB_ENV + - name: Download binary from neutron-org/neutron repo + run: | + sudo wget -nv https://github.com/neutron-org/neutron/releases/download/v${{ env.RUNNING_VERSION }}/neutrond-linux-amd64 -O /usr/local/bin/neutrond + sudo chmod +x /usr/local/bin/neutrond + - name: Initializing chain to sync with ICS Testnet + env: + NODE_MONIKER: pion + SERVICE_NAME: pion + GENESIS_URL: https://github.com/cosmos/testnets/blob/master/interchain-security/pion-1/pion-1-genesis-with-ccv.json.gz + SEEDS: "4dbb91a22ec4222751aec7f682ea20c2c907f09d@p2p-palvus.pion-1.ntrn.tech:26656" + SYNC_RPC_1: https://rpc.pion.ics-testnet.polypore.xyz:443 + SYNC_RPC_2: https://rpc.pion.ics-testnet.polypore.xyz:443 + GAS_PRICES: "0.0025uatom" + run: | + echo "Initializing $NODE_HOME..." + $CHAIN_BINARY config set client chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config set client keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config set client broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME + sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml + echo "Configuring state sync..." + CURRENT_BLOCK=$(curl -s $SYNC_RPC_1/block | jq -r '.result.block.header.height') + TRUST_HEIGHT=$[$CURRENT_BLOCK-1000] + TRUST_BLOCK=$(curl -s $SYNC_RPC_1/block\?height\=$TRUST_HEIGHT) + TRUST_HASH=$(echo $TRUST_BLOCK | jq -r '.result.block_id.hash') + sed -i -e '/enable =/ s/= .*/= true/' $NODE_HOME/config/config.toml + sed -i -e '/trust_period =/ s/= .*/= "8h0m0s"/' $NODE_HOME/config/config.toml + sed -i -e "/trust_height =/ s/= .*/= $TRUST_HEIGHT/" $NODE_HOME/config/config.toml + sed -i -e "/trust_hash =/ s/= .*/= \"$TRUST_HASH\"/" $NODE_HOME/config/config.toml + sed -i -e "/rpc_servers =/ s^= .*^= \"$SYNC_RPC_1,$SYNC_RPC_2\"^" $NODE_HOME/config/config.toml + sed -i -e "/minimum-gas-prices =/ s^= .*^= \"$GAS_PRICES\"^" $NODE_HOME/config/app.toml + echo "Replaceing genesis..." + wget -nv $GENESIS_URL -O genesis.json.gz + gunzip genesis.json.gz + mv genesis.json $NODE_HOME/config/genesis.json + - name: Archive config files + run: mkdir -p /home/runner/artifact/config/provider && cp -rvp $NODE_HOME/config /home/runner/artifact/config/provider/ + - name: Start Chain + run: screen -L -Logfile /home/runner/artifact/neutrond_sync.log -S neutrond -d -m $CHAIN_BINARY start --x-crisis-skip-assert-invariants --home $NODE_HOME + - name: Wait for neutrond to start and stabilize + run: tests/test_block_production.sh 127.0.0.1 26657 50 1000 + - name: Syncing Chain + run: | + catching_up="true" + while [ $catching_up == "true" ] + do + catching_up=$(curl -s 127.0.0.1:26657/status | jq -r .result.sync_info.catching_up) + echo "Still Syncing: $catching_up" + sleep 5 + done + echo "Done Syncing" + - name: Stop neutrond + run: | + synced_block=$(neutrond status | jq -r '.sync_info.latest_block_height') + echo "synced_block=$synced_block" >> $GITHUB_ENV + killall neutrond screen + sleep 10s + - name: Create snapshot + run: | + cd $NODE_HOME + mkdir ~/snapshot + tar cfvz ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz data wasm + - name: Upload snapshot + run: | + echo "Compressing ~/.neutron ..." + cd /home/runner/ + ssh gh-actions@files.polypore.xyz rm /storage/snapshots/ics-testnet/pion-1/* || true + scp ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz gh-actions@files.polypore.xyz:/storage/snapshots/ics-testnet/pion-1 + # Update latest file symlinks + ssh gh-actions@files.polypore.xyz ln -sf /storage/snapshots/ics-testnet/pion-1/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz /storage/snapshots/ics-testnet/pion-1/latest.tar.gz + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: export-ics-testnet-pion-1 + path: ~/artifact/ \ No newline at end of file From 89b342ac53c70fb8531594f20d1a1d3e80127ce1 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:05:21 -0500 Subject: [PATCH 07/16] fix format --- .github/workflows/export-ics-testnet-snapshot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 012de7bf..b9dd267a 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -162,7 +162,7 @@ jobs: echo "Compressing ~/.gaia ..." cd /home/runner/ ssh gh-actions@files.polypore.xyz rm /storage/snapshots/ics-testnet/provider/* || true - scp ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz gh-actions@files.polypore.xyz:/storage/snapshots/ics-testnet/provider + scp ~/snapshot/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz gh-actions@files.polypore.xyz:/storage/snapshots/ics-testnet/provider/ # Update latest file symlinks ssh gh-actions@files.polypore.xyz ln -sf /storage/snapshots/ics-testnet/provider/$CHAIN_ID-snapshot-${{ env.synced_block }}.tar.gz /storage/snapshots/ics-testnet/provider/latest.tar.gz - name: Upload artifacts @@ -172,13 +172,13 @@ jobs: name: export-ics-testnet-provider path: ~/artifact/ -export-ics-testnet-pion-snapshot: + export-ics-testnet-pion-snapshot: runs-on: cosmos-runner-set environment: export-ics-testnet-pion-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia - CHAIN_ID: provider + CHAIN_ID: pion-1 CHAIN_BINARY: 'gaiad' steps: @@ -275,7 +275,7 @@ export-ics-testnet-pion-snapshot: gunzip genesis.json.gz mv genesis.json $NODE_HOME/config/genesis.json - name: Archive config files - run: mkdir -p /home/runner/artifact/config/provider && cp -rvp $NODE_HOME/config /home/runner/artifact/config/provider/ + run: mkdir -p /home/runner/artifact/config/pion-1 && cp -rvp $NODE_HOME/config /home/runner/artifact/config/pion-1/ - name: Start Chain run: screen -L -Logfile /home/runner/artifact/neutrond_sync.log -S neutrond -d -m $CHAIN_BINARY start --x-crisis-skip-assert-invariants --home $NODE_HOME - name: Wait for neutrond to start and stabilize @@ -314,4 +314,4 @@ export-ics-testnet-pion-snapshot: uses: actions/upload-artifact@v4 with: name: export-ics-testnet-pion-1 - path: ~/artifact/ \ No newline at end of file + path: ~/artifact/ From a8c983ef9f30b4a1861d4db8d18bf2b6716b7c68 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:07:15 -0500 Subject: [PATCH 08/16] fix binary name --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index b9dd267a..da9246c1 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -179,7 +179,7 @@ jobs: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia CHAIN_ID: pion-1 - CHAIN_BINARY: 'gaiad' + CHAIN_BINARY: 'neutrond' steps: # Get system info From 045ca91862b61dd6f5d8fbb25a7f8980e26df5d5 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:10:38 -0500 Subject: [PATCH 09/16] pion config commands --- .github/workflows/export-ics-testnet-snapshot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index da9246c1..2fb37d4d 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -15,7 +15,7 @@ jobs: environment: export-ics-testnet-provider-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} - NODE_HOME: /home/runner/.gaia + NODE_HOME: /home/runner/.neutron CHAIN_ID: provider CHAIN_BINARY: 'gaiad' @@ -100,7 +100,7 @@ jobs: sudo cp build/gaiad /usr/local/bin/gaiad echo "gaiad version:" gaiad version - - name: Initializing chain to sync with ICS Testnet + - name: Initializing chain to sync with ICS Testnet pion-1 env: NODE_MONIKER: provider SERVICE_NAME: provider @@ -111,9 +111,9 @@ jobs: GAS_PRICES: "0.0025uatom" run: | echo "Initializing $NODE_HOME..." - $CHAIN_BINARY config set client chain-id $CHAIN_ID --home $NODE_HOME - $CHAIN_BINARY config set client keyring-backend test --home $NODE_HOME - $CHAIN_BINARY config set client broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY config chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config broadcast-mode sync --home $NODE_HOME $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml echo "Configuring state sync..." From f50a1e5dcd1aa938b3918aab64ffc40f74b2abc1 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:13:46 -0500 Subject: [PATCH 10/16] fix config --- .../workflows/export-ics-testnet-snapshot.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 2fb37d4d..b8456f96 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -15,7 +15,7 @@ jobs: environment: export-ics-testnet-provider-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} - NODE_HOME: /home/runner/.neutron + NODE_HOME: /home/runner/.gaia CHAIN_ID: provider CHAIN_BINARY: 'gaiad' @@ -100,7 +100,7 @@ jobs: sudo cp build/gaiad /usr/local/bin/gaiad echo "gaiad version:" gaiad version - - name: Initializing chain to sync with ICS Testnet pion-1 + - name: Initializing chain to sync with ICS Testnet provider env: NODE_MONIKER: provider SERVICE_NAME: provider @@ -111,9 +111,9 @@ jobs: GAS_PRICES: "0.0025uatom" run: | echo "Initializing $NODE_HOME..." - $CHAIN_BINARY config chain-id $CHAIN_ID --home $NODE_HOME - $CHAIN_BINARY config keyring-backend test --home $NODE_HOME - $CHAIN_BINARY config broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY config set client chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config set client keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config set client broadcast-mode sync --home $NODE_HOME $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml echo "Configuring state sync..." @@ -179,7 +179,7 @@ jobs: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia CHAIN_ID: pion-1 - CHAIN_BINARY: 'neutrond' + CHAIN_BINARY: 'neutron' steps: # Get system info @@ -243,7 +243,7 @@ jobs: run: | sudo wget -nv https://github.com/neutron-org/neutron/releases/download/v${{ env.RUNNING_VERSION }}/neutrond-linux-amd64 -O /usr/local/bin/neutrond sudo chmod +x /usr/local/bin/neutrond - - name: Initializing chain to sync with ICS Testnet + - name: Initializing chain to sync with ICS Testnet pion-1 env: NODE_MONIKER: pion SERVICE_NAME: pion @@ -254,9 +254,9 @@ jobs: GAS_PRICES: "0.0025uatom" run: | echo "Initializing $NODE_HOME..." - $CHAIN_BINARY config set client chain-id $CHAIN_ID --home $NODE_HOME - $CHAIN_BINARY config set client keyring-backend test --home $NODE_HOME - $CHAIN_BINARY config set client broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY config set chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config set keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config set broadcast-mode sync --home $NODE_HOME $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml echo "Configuring state sync..." From ba4fade54c0df034554bea33c5f435ba8e71b449 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:15:58 -0500 Subject: [PATCH 11/16] fix neutron binary name --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index b8456f96..75edc90a 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -179,7 +179,7 @@ jobs: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} NODE_HOME: /home/runner/.gaia CHAIN_ID: pion-1 - CHAIN_BINARY: 'neutron' + CHAIN_BINARY: 'neutrond' steps: # Get system info From 5036ee8a17e3798f0af9bb6e8a286181ac12e280 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:19:00 -0500 Subject: [PATCH 12/16] config --- .github/workflows/export-ics-testnet-snapshot.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 75edc90a..c38f151c 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -177,7 +177,7 @@ jobs: environment: export-ics-testnet-pion-snapshot env: SSH_PUB_KEYS: ${{ vars.SSH_PUB_KEYS }} - NODE_HOME: /home/runner/.gaia + NODE_HOME: /home/runner/.neutron CHAIN_ID: pion-1 CHAIN_BINARY: 'neutrond' @@ -254,9 +254,9 @@ jobs: GAS_PRICES: "0.0025uatom" run: | echo "Initializing $NODE_HOME..." - $CHAIN_BINARY config set chain-id $CHAIN_ID --home $NODE_HOME - $CHAIN_BINARY config set keyring-backend test --home $NODE_HOME - $CHAIN_BINARY config set broadcast-mode sync --home $NODE_HOME + $CHAIN_BINARY config chain-id $CHAIN_ID --home $NODE_HOME + $CHAIN_BINARY config keyring-backend test --home $NODE_HOME + $CHAIN_BINARY config broadcast-mode sync --home $NODE_HOME $CHAIN_BINARY init $NODE_MONIKER --chain-id $CHAIN_ID --home $NODE_HOME sed -i -e "/seeds =/ s^= .*^= \"$SEEDS\"^" $NODE_HOME/config/config.toml echo "Configuring state sync..." From cb0af6229c1b367e600465fa0a7e30769c47371a Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 22:21:27 -0500 Subject: [PATCH 13/16] update genesis URL --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index c38f151c..d640688a 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -247,7 +247,7 @@ jobs: env: NODE_MONIKER: pion SERVICE_NAME: pion - GENESIS_URL: https://github.com/cosmos/testnets/blob/master/interchain-security/pion-1/pion-1-genesis-with-ccv.json.gz + GENESIS_URL: https://github.com/cosmos/testnets/raw/refs/heads/master/interchain-security/pion-1/pion-1-genesis-with-ccv.json.gz SEEDS: "4dbb91a22ec4222751aec7f682ea20c2c907f09d@p2p-palvus.pion-1.ntrn.tech:26656" SYNC_RPC_1: https://rpc.pion.ics-testnet.polypore.xyz:443 SYNC_RPC_2: https://rpc.pion.ics-testnet.polypore.xyz:443 From 5c671fd86844e0d954a311981de2076ac4a6aced Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 23:59:19 -0500 Subject: [PATCH 14/16] don't run on push --- .github/workflows/export-ics-testnet-snapshot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index d640688a..2f30938f 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -4,8 +4,8 @@ on: workflow_dispatch: schedule: # At 05:30 on Saturdays. - - cron: '30 5 * * 6' - push: + - cron: '30 5 * * *' + # push: # concurrency: # group: self-hosted-runners From 9b59d772cfa737eb5790678abcac6a5e5119b37c Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Thu, 23 Jan 2025 23:59:58 -0500 Subject: [PATCH 15/16] cron run 05:30 everyday --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index 2f30938f..fb67bd8a 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -3,7 +3,7 @@ name: Export ICS Testnet Snapshot on: workflow_dispatch: schedule: - # At 05:30 on Saturdays. + # At 05:30 everyday. - cron: '30 5 * * *' # push: # concurrency: From d137c5388e0f0612d5d66ace8e4e0cd918887c98 Mon Sep 17 00:00:00 2001 From: ASoTNetworks Date: Fri, 24 Jan 2025 00:01:00 -0500 Subject: [PATCH 16/16] update cron to 03:00 --- .github/workflows/export-ics-testnet-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/export-ics-testnet-snapshot.yml b/.github/workflows/export-ics-testnet-snapshot.yml index fb67bd8a..48a125b3 100644 --- a/.github/workflows/export-ics-testnet-snapshot.yml +++ b/.github/workflows/export-ics-testnet-snapshot.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: schedule: # At 05:30 everyday. - - cron: '30 5 * * *' + - cron: '0 3 * * *' # push: # concurrency: # group: self-hosted-runners