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
--- 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
modifiednode/cli/Cargo.tomldiffbeforeafterboth
before · node/cli/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Node'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-node'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[[bin]]16name = 'unique-collator'17path = "src/main.rs"1819[package.metadata.docs.rs]20targets = ['x86_64-unknown-linux-gnu']2122[dependencies]23clap = "4.1"24futures = '0.3.17'25tokio = { version = "1.24", features = ["time"] }26serde_json = "1.0"2728log = { workspace = true }2930# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.31codec = { workspace = true, package = "parity-scale-codec" }3233cumulus-client-cli = { workspace = true }34cumulus-client-consensus-aura = { workspace = true }35cumulus-client-consensus-common = { workspace = true }36cumulus-client-network = { workspace = true }37cumulus-client-service = { workspace = true }38cumulus-primitives-core = { workspace = true }39cumulus-primitives-parachain-inherent = { workspace = true }40cumulus-relay-chain-inprocess-interface = { workspace = true }41cumulus-relay-chain-interface = { workspace = true }42cumulus-relay-chain-minimal-node = { workspace = true }43frame-benchmarking = { workspace = true }44frame-benchmarking-cli = { workspace = true }45opal-runtime = { workspace = true, optional = true }46pallet-transaction-payment-rpc-runtime-api = { workspace = true }47polkadot-cli = { workspace = true }48polkadot-primitives = { workspace = true }49polkadot-service = { workspace = true }50quartz-runtime = { workspace = true, optional = true }51sc-basic-authorship = { workspace = true }52sc-chain-spec = { workspace = true }53sc-cli = { workspace = true }54sc-client-api = { workspace = true }55sc-consensus = { workspace = true }56sc-consensus-manual-seal = { workspace = true }57sc-executor = { workspace = true }58sc-network = { workspace = true }59sc-network-sync = { workspace = true }60sc-service = { workspace = true }61sc-sysinfo = { workspace = true }62sc-telemetry = { workspace = true }63sc-tracing = { workspace = true }64sc-transaction-pool = { workspace = true }65serde = { workspace = true }66sp-api = { workspace = true }67sp-block-builder = { workspace = true }68sp-blockchain = { workspace = true }69sp-consensus-aura = { workspace = true }70sp-core = { workspace = true }71sp-io = { workspace = true }72sp-keystore = { workspace = true }73sp-offchain = { workspace = true }74sp-runtime = { workspace = true }75sp-session = { workspace = true }76sp-timestamp = { workspace = true }77sp-transaction-pool = { workspace = true }78substrate-frame-rpc-system = { workspace = true }79substrate-prometheus-endpoint = { workspace = true }80try-runtime-cli = { workspace = true }81unique-runtime = { workspace = true, optional = true }82up-common = { workspace = true }83up-data-structs = { workspace = true }8485fc-consensus = { workspace = true }86fc-db = { workspace = true }87fc-mapping-sync = { workspace = true }88fc-rpc = { workspace = true }89fc-rpc-core = { workspace = true }90fp-rpc = { workspace = true }9192app-promotion-rpc = { workspace = true }93uc-rpc = { workspace = true }94unique-rpc = { workspace = true }95up-pov-estimate-rpc = { workspace = true }96up-rpc = { workspace = true }9798[build-dependencies]99substrate-build-script-utils = { workspace = true }100101[features]102default = ["opal-runtime"]103all-runtimes = ['opal-runtime', 'quartz-runtime', 'unique-runtime']104pov-estimate = ['opal-runtime/pov-estimate', 'quartz-runtime?/pov-estimate', 'uc-rpc/pov-estimate', 'unique-rpc/pov-estimate', 'unique-runtime?/pov-estimate']105runtime-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']106sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']107try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime']
after · node/cli/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Node'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-node'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version.workspace = true1415[[bin]]16name = 'unique-collator'17path = "src/main.rs"1819[package.metadata.docs.rs]20targets = ['x86_64-unknown-linux-gnu']2122[dependencies]23clap = "4.1"24futures = '0.3.17'25tokio = { version = "1.24", features = ["time"] }26serde_json = "1.0"2728log = { workspace = true }2930# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.31codec = { workspace = true, package = "parity-scale-codec" }3233cumulus-client-cli = { workspace = true }34cumulus-client-consensus-aura = { workspace = true }35cumulus-client-consensus-common = { workspace = true }36cumulus-client-network = { workspace = true }37cumulus-client-service = { workspace = true }38cumulus-primitives-core = { workspace = true }39cumulus-primitives-parachain-inherent = { workspace = true }40cumulus-relay-chain-inprocess-interface = { workspace = true }41cumulus-relay-chain-interface = { workspace = true }42cumulus-relay-chain-minimal-node = { workspace = true }43frame-benchmarking = { workspace = true }44frame-benchmarking-cli = { workspace = true }45opal-runtime = { workspace = true, optional = true }46pallet-transaction-payment-rpc-runtime-api = { workspace = true }47polkadot-cli = { workspace = true }48polkadot-primitives = { workspace = true }49polkadot-service = { workspace = true }50quartz-runtime = { workspace = true, optional = true }51sc-basic-authorship = { workspace = true }52sc-chain-spec = { workspace = true }53sc-cli = { workspace = true }54sc-client-api = { workspace = true }55sc-consensus = { workspace = true }56sc-consensus-manual-seal = { workspace = true }57sc-executor = { workspace = true }58sc-network = { workspace = true }59sc-network-sync = { workspace = true }60sc-service = { workspace = true }61sc-sysinfo = { workspace = true }62sc-telemetry = { workspace = true }63sc-tracing = { workspace = true }64sc-transaction-pool = { workspace = true }65serde = { workspace = true }66sp-api = { workspace = true }67sp-block-builder = { workspace = true }68sp-blockchain = { workspace = true }69sp-consensus-aura = { workspace = true }70sp-core = { workspace = true }71sp-io = { workspace = true }72sp-keystore = { workspace = true }73sp-offchain = { workspace = true }74sp-runtime = { workspace = true }75sp-session = { workspace = true }76sp-timestamp = { workspace = true }77sp-transaction-pool = { workspace = true }78substrate-frame-rpc-system = { workspace = true }79substrate-prometheus-endpoint = { workspace = true }80try-runtime-cli = { workspace = true }81unique-runtime = { workspace = true, optional = true }82up-common = { workspace = true }83up-data-structs = { workspace = true }8485fc-consensus = { workspace = true }86fc-db = { workspace = true }87fc-mapping-sync = { workspace = true }88fc-rpc = { workspace = true }89fc-rpc-core = { workspace = true }90fp-rpc = { workspace = true }9192app-promotion-rpc = { workspace = true }93uc-rpc = { workspace = true }94unique-rpc = { workspace = true }95up-pov-estimate-rpc = { workspace = true }96up-rpc = { workspace = true }9798[build-dependencies]99substrate-build-script-utils = { workspace = true }100101[features]102default = ["opal-runtime"]103all-runtimes = ['opal-runtime', 'quartz-runtime', 'unique-runtime']104pov-estimate = ['opal-runtime/pov-estimate', 'quartz-runtime?/pov-estimate', 'uc-rpc/pov-estimate', 'unique-rpc/pov-estimate', 'unique-runtime?/pov-estimate']105runtime-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']106sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire']107try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime']108state-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,
 };