git.delta.rocks / unique-network / refs/commits / c72090e3f649

difftreelog

ci use state-version: 0 on forkless-with-data workflow

Yaroslav Bolyukin2023-06-05parent: #98307af.patch.diff
in: master

9 files changed

modified.docker/Dockerfile-parachain-upgrade-data.j2diffbeforeafterboth
--- a/.docker/Dockerfile-parachain-upgrade-data.j2
+++ b/.docker/Dockerfile-parachain-upgrade-data.j2
@@ -35,7 +35,7 @@
 COPY . /unique_parachain
 WORKDIR /unique_parachain
 
-RUN cargo build --features={{ NETWORK }}-runtime --$PROFILE
+RUN cargo build --features={{ NETWORK }}-runtime{{ EXTRA_FEATURES }} --$PROFILE
 
 # ===== RUN ======
 FROM ubuntu:22.04
modified.github/workflows/forkless-update-data.ymldiffbeforeafterboth
34 uses: CertainLach/create-matrix-action@v434 uses: CertainLach/create-matrix-action@v4
35 id: create_matrix35 id: create_matrix
36 with:36 with:
37 # TODO: Remove state-version-0 after mainnet upgrade
37 matrix: |38 matrix: |
38 network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}39 network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, extra_features {,state-version-0}
39 network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}40 network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, extra_features {,state-version-0}
40 network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}41 network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, extra_features {,state-version-0}
41 network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}42 network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} extra_features {,state-version-0}
4243
43 forkless-data-build:44 forkless-data-build:
44 needs: prepare-execution-marix45 needs: prepare-execution-marix
75 with:76 with:
76 template: .docker/Dockerfile-parachain-upgrade-data.j277 template: .docker/Dockerfile-parachain-upgrade-data.j2
77 output_file: .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml78 output_file: .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml
78 variables: |79 variables: |
79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}80 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
80 NETWORK=${{ matrix.network }}81 NETWORK=${{ matrix.network }}
81 MAINNET_BRANCH=${{ matrix.mainnet_branch }}82 MAINNET_BRANCH=${{ matrix.mainnet_branch }}
82 WASM_NAME=${{ matrix.wasm_name }}83 WASM_NAME=${{ matrix.wasm_name }}
83 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}84 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}
84 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}85 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
85 REPLICA_FROM=${{ matrix.replica_from_address }}86 REPLICA_FROM=${{ matrix.replica_from_address }}
86 CHAINQL=${{ env.CHAINQL }}87 CHAINQL=${{ env.CHAINQL }}
88 EXTRA_FEATURES=${{ env.extra_features }}
8789
88 - name: Show build configuration90 - name: Show build configuration
89 run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml91 run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -105,3 +105,4 @@
 runtime-benchmarks = ['opal-runtime/runtime-benchmarks', 'polkadot-cli/runtime-benchmarks', 'polkadot-service/runtime-benchmarks', 'quartz-runtime?/runtime-benchmarks', 'sc-service/runtime-benchmarks', 'unique-runtime?/runtime-benchmarks']
 sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']
 try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime']
+state-version-0 = ['opal-runtime?/state-version-0', 'quartz-runtime?/state-version-0', 'unique-runtime?/state-version-0']
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -17,6 +17,7 @@
 
 [features]
 default = ['opal-runtime', 'std']
+state-version-0 = []
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
 opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'pallet-test-utils', 'preimage', 'refungible']
 pov-estimate = []
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -56,6 +56,9 @@
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
+	#[cfg(feature="state-version-0")]
+	state_version: 0,
+	#[cfg(not(feature="state-version-0"))]
 	state_version: 1,
 };
 
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -18,6 +18,7 @@
 [features]
 become-sapphire = []
 default = ['quartz-runtime', 'std']
+state-version-0 = []
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
 pov-estimate = []
 quartz-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'preimage', 'refungible']
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -59,6 +59,9 @@
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
+	#[cfg(feature="state-version-0")]
+	state_version: 0,
+	#[cfg(not(feature="state-version-0"))]
 	state_version: 1,
 };
 
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -17,6 +17,7 @@
 
 [features]
 default = ['std', 'unique-runtime']
+state-version-0 = []
 limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
 pov-estimate = []
 runtime-benchmarks = [
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -56,6 +56,9 @@
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
+	#[cfg(feature="state-version-0")]
+	state_version: 0,
+	#[cfg(not(feature="state-version-0"))]
 	state_version: 1,
 };