From 9c447384b2b12ab6cb0b8eb2a2ebf75ac9ef65a1 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 13:11:24 +0900 Subject: [PATCH 1/9] Add workflow for paradis try-runtime --- .github/workflows/ci.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76883ba0976..61f78cb6036 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,17 +116,6 @@ jobs: uses: mozilla-actions/sccache-action@v0.0.4 - name: Build runtime run: cargo build --release --features=try-runtime -p runtime-eden - - name: Check Version - run: | - echo -n "eden_rev=" >> $GITHUB_OUTPUT - curl -s --request POST --url https://nodle-parachain.api.onfinality.io/public --header 'Content-Type: application/json' --data '{ - "jsonrpc": "2.0", - "method": "state_getRuntimeVersion", - "params": [], - "id": 1 - }' | jq .result.specVersion | sed 's/^/try-runtime-snapshot-eden-spec-/' >> $GITHUB_OUTPUT - cat $GITHUB_OUTPUT - id: get_version - uses: robinraju/release-downloader@v1.9 with: repository: "NodleCode/eden-snapshot" @@ -141,3 +130,18 @@ jobs: runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm checks: "all" options: "--disable-idempotency-checks" + - uses: robinraju/release-downloader@v1.9 + with: + repository: "NodleCode/paradis-snapshot" + latest: true + fileName: "paradis-snapshot-full.bz2" + out-file-path: "snaps" + extract: false + - run: bunzip2 snaps/paradis-snapshot-full.bz2 + - name: Run try-runtime paradis + uses: NodleCode/action-try-runtime/check@v0.6.1 + with: + snap: snaps/paradis-snapshot-full + runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm + checks: "all" + options: "--disable-idempotency-checks" From 4bc54d5284ef76bfa5456de2e85fe09ace580d13 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 14:00:21 +0900 Subject: [PATCH 2/9] Update path --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61f78cb6036..c8a8f9bdbd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,30 +118,30 @@ jobs: run: cargo build --release --features=try-runtime -p runtime-eden - uses: robinraju/release-downloader@v1.9 with: - repository: "NodleCode/eden-snapshot" + repository: "NodleCode/paradis-snapshot" latest: true - fileName: "eden-snapshot-full" + fileName: "paradis-snapshot-full.snap.bz2" out-file-path: "snaps" extract: false - - name: Run try-runtime + - run: bunzip2 snaps/paradis-snapshot-full.bz2 + - name: Run try-runtime paradis uses: NodleCode/action-try-runtime/check@v0.6.1 with: - snap: snaps/eden-snapshot-full + snap: snaps/paradis-snapshot-full runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm checks: "all" options: "--disable-idempotency-checks" - uses: robinraju/release-downloader@v1.9 with: - repository: "NodleCode/paradis-snapshot" + repository: "NodleCode/eden-snapshot" latest: true - fileName: "paradis-snapshot-full.bz2" + fileName: "eden-snapshot-full" out-file-path: "snaps" extract: false - - run: bunzip2 snaps/paradis-snapshot-full.bz2 - - name: Run try-runtime paradis + - name: Run try-runtime uses: NodleCode/action-try-runtime/check@v0.6.1 with: - snap: snaps/paradis-snapshot-full + snap: snaps/eden-snapshot-full runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm checks: "all" - options: "--disable-idempotency-checks" + options: "--disable-idempotency-checks" \ No newline at end of file From 002a1ab02a361058d64f8a66d5c92f10f0b16396 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 14:57:15 +0900 Subject: [PATCH 3/9] Paradis snap name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8a8f9bdbd5..60156080107 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,7 +120,7 @@ jobs: with: repository: "NodleCode/paradis-snapshot" latest: true - fileName: "paradis-snapshot-full.snap.bz2" + fileName: "paradis-snapshot-full.bz2" out-file-path: "snaps" extract: false - run: bunzip2 snaps/paradis-snapshot-full.bz2 From b26b995d2c79adf494765e3e0090af7a536b1b10 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 16:10:08 +0900 Subject: [PATCH 4/9] Separate eden and paradis tryruntime checks --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60156080107..ac73ca7225b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,9 +98,8 @@ jobs: fail_ci_if_error: false files: lcov.info - try-runtime: + try-runtime-prepare: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Install protobuf-compiler @@ -116,6 +115,21 @@ jobs: uses: mozilla-actions/sccache-action@v0.0.4 - name: Build runtime run: cargo build --release --features=try-runtime -p runtime-eden + - name: Upload runtime artifact + uses: actions/upload-artifact@v3 + with: + name: try_runtime + path: target/release/wbuild/runtime-eden/runtime_eden.wasm + + try-runtime-paradis-execute: + runs-on: ubuntu-latest + needs: try-runtime-prepare + steps: + - name: Download runtime artifact + uses: actions/download-artifact@v2 + with: + name: try_runtime + path: try_runtime - uses: robinraju/release-downloader@v1.9 with: repository: "NodleCode/paradis-snapshot" @@ -128,9 +142,19 @@ jobs: uses: NodleCode/action-try-runtime/check@v0.6.1 with: snap: snaps/paradis-snapshot-full - runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm + runtime: try_runtime/runtime_eden.wasm checks: "all" options: "--disable-idempotency-checks" + + try-runtime-eden-execute: + runs-on: ubuntu-latest + needs: try-runtime-prepare + steps: + - name: Download runtime artifact + uses: actions/download-artifact@v2 + with: + name: try_runtime + path: try_runtime - uses: robinraju/release-downloader@v1.9 with: repository: "NodleCode/eden-snapshot" @@ -142,6 +166,6 @@ jobs: uses: NodleCode/action-try-runtime/check@v0.6.1 with: snap: snaps/eden-snapshot-full - runtime: target/release/wbuild/runtime-eden/runtime_eden.wasm + runtime: try_runtime/runtime_eden.wasm checks: "all" options: "--disable-idempotency-checks" \ No newline at end of file From 43e7de4ae83bc6d4b8fcfeb19bd85e4971e75e28 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 16:39:45 +0900 Subject: [PATCH 5/9] Faster CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac73ca7225b..e3cc5ad961f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,7 @@ jobs: files: lcov.info try-runtime-prepare: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-4-core steps: - uses: actions/checkout@v4 - name: Install protobuf-compiler From ec4be494de111b63b1c423e51fcfd7f1f4492e5b Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 16:59:23 +0900 Subject: [PATCH 6/9] Pallet identity migrated on testnet CI versions --- .github/workflows/ci.yml | 6 +++--- runtimes/eden/src/migrations.rs | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3cc5ad961f..2bd1ecfe42e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,7 @@ jobs: - name: Build runtime run: cargo build --release --features=try-runtime -p runtime-eden - name: Upload runtime artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: try_runtime path: target/release/wbuild/runtime-eden/runtime_eden.wasm @@ -126,7 +126,7 @@ jobs: needs: try-runtime-prepare steps: - name: Download runtime artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: try_runtime path: try_runtime @@ -151,7 +151,7 @@ jobs: needs: try-runtime-prepare steps: - name: Download runtime artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: try_runtime path: try_runtime diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index ba39113789b..0c2cd399222 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -68,11 +68,6 @@ where StorageVersion::get::>() == 0, TryRuntimeError::Other("pallet_uniques storage version is not 0") ); - ensure!( - StorageVersion::get::>() == 0, - TryRuntimeError::Other("pallet_identity storage version is not 0") - ); - Ok(vec![]) } From a1e5308a9b89e885c12ca3de7dc1ce5861f6ee14 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Tue, 26 Mar 2024 17:15:22 +0900 Subject: [PATCH 7/9] Slower cores --- .github/workflows/ci.yml | 7 ++++--- .github/workflows/docker.yml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bd1ecfe42e..aec3c8c25d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: toolchain: ${{ env.toolchain }} test-runtime: - runs-on: ubuntu-latest-8-cores + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -74,7 +74,7 @@ jobs: run: cargo test --all-features -p nodle-parachain tests-with-linecoverage: - runs-on: ubuntu-latest-4-cores + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -99,7 +99,8 @@ jobs: files: lcov.info try-runtime-prepare: - runs-on: ubuntu-latest-4-core + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 - name: Install protobuf-compiler diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cb9826b664b..57d4746abd5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,7 @@ jobs: container_gpr: name: Build and push docker image - runs-on: ubuntu-latest + runs-on: ubuntu-latest-8-core steps: From 0320d150a831085b68c9bca24b09d03735470c59 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 27 Mar 2024 09:23:09 +0900 Subject: [PATCH 8/9] Update .github/workflows/docker.yml --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 57d4746abd5..cb9826b664b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,7 +12,7 @@ jobs: container_gpr: name: Build and push docker image - runs-on: ubuntu-latest-8-core + runs-on: ubuntu-latest steps: From e21ea3ec7973c1b673bac0c05b2a4150872c6c56 Mon Sep 17 00:00:00 2001 From: Fredrik Simonsson Date: Wed, 27 Mar 2024 11:08:48 +0900 Subject: [PATCH 9/9] Adding one more migration test --- runtimes/eden/src/migrations.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtimes/eden/src/migrations.rs b/runtimes/eden/src/migrations.rs index 0c2cd399222..e82b4794ac1 100644 --- a/runtimes/eden/src/migrations.rs +++ b/runtimes/eden/src/migrations.rs @@ -73,8 +73,13 @@ where #[cfg(feature = "try-runtime")] fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { - log::info!("Post upgrade {_state:?}"); + use frame_support::ensure; + log::info!("Post upgrade {_state:?}"); + ensure!( + StorageVersion::get::>() == 1, + TryRuntimeError::Other("pallet_uniques post upgrade storage version is not 1") + ); Ok(()) } }