Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check runtime upgrade #3232

Merged
merged 7 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions .github/workflows/check-runtime-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,49 @@ jobs:
with:
fetch-depth: 0

- name: Run ${{ matrix.runtime.name }} try-runtime check
uses: BillyWooo/[email protected]
- name: Download try-runtime-cli
run: |
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.8.0/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime
mv try-runtime parachain
shell: bash

- name: Install Protoc
uses: arduino/[email protected]
with:
runtime-package: ${{ matrix.runtime.package }}
node-uri: ${{ matrix.runtime.uri }}
checks: "all"
extra-args: ""
version: "3.6.1"

- name: Add wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
shell: bash

- name: Add rust-src component
run: rustup component add rust-src
shell: bash

- name: Build ${{ matrix.runtime.name }}
run: |
cd parachain
cargo build --profile production -p ${{ matrix.runtime.package }} --features try-runtime -q --locked
shell: bash

- name: Check migrations
run: |
cd parachain
PACKAGE_NAME=${{ matrix.runtime.package }}
RUNTIME_BLOB_NAME=$(echo $PACKAGE_NAME | sed 's/-/_/g').compact.compressed.wasm
RUNTIME_BLOB_PATH=./target/production/wbuild/$PACKAGE_NAME/$RUNTIME_BLOB_NAME
export RUST_LOG=remote-ext=debug,runtime=debug

# Store the command in a variable so we can log it
COMMAND="./try-runtime \
--runtime $RUNTIME_BLOB_PATH \
on-runtime-upgrade --disable-mbm-checks --blocktime 12000000 \
live --uri ${{ matrix.runtime.uri }}"

# Echo the command before running it, for debugging purposes
echo "Running command:"
echo "$COMMAND"
eval "$COMMAND"

shell: bash
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ clean-all-build:
@echo "Clean tee-worker/identity..."
@cd tee-worker/identity && make clean

@echo "Clean tee-worker/omni-worker..."
@cd tee-worker/omni-worker && make distclean
@echo "Clean tee-worker/omni-executor..."
@cd tee-worker/omni-executor && make distclean
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ where
additional_extrinsic_params,
);
let xt = compose_extrinsic_offline!(&self.signer, call, extrinsic_params).encode();
log::info!("extrinsic created: {}", hex::encode(&xt));
log::info!("extrinsic nonce: {}", nonce_value);
log::info!("extrinsic hash: {}", hex::encode(blake2_256(&xt)));
log::info!(
"extrinsic created with nonce: {}, hash: {}",
nonce_value,
hex::encode(blake2_256(&xt))
);
nonce_value += 1;
xt
})
Expand Down