--- 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 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -34,11 +34,12 @@ uses: CertainLach/create-matrix-action@v4 id: create_matrix with: + # TODO: Remove state-version-0 after mainnet upgrade matrix: | - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}} - network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}} - network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} + 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} + 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} + 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} + 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} forkless-data-build: needs: prepare-execution-marix @@ -84,6 +85,7 @@ POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} REPLICA_FROM=${{ matrix.replica_from_address }} CHAINQL=${{ env.CHAINQL }} + EXTRA_FEATURES=${{ env.extra_features }} - name: Show build configuration run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml --- 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'] --- 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 = [] --- 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, }; --- 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'] --- 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, }; --- 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 = [ --- 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, };