From 6a3d018d87ad47bd2360a6a2712815e2180fce13 Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Sat, 2 Mar 2024 18:25:20 +0900 Subject: [PATCH 1/2] remove obsolete storage migrations and add rust-cache to check-migration CI (#7) --- .github/workflows/check-migration.yml | 7 ++++++- runtime/bajun/src/lib.rs | 17 +---------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-migration.yml b/.github/workflows/check-migration.yml index e87128f..be1f56d 100644 --- a/.github/workflows/check-migration.yml +++ b/.github/workflows/check-migration.yml @@ -35,7 +35,7 @@ jobs: echo "runtime=$TASKS" >> $GITHUB_OUTPUT check-migrations: - needs: [runtime-matrix] + needs: [ runtime-matrix ] continue-on-error: true runs-on: ubuntu-latest strategy: @@ -58,6 +58,11 @@ jobs: - name: Install rust toolchain from toolchain.toml run: rustup show + - name: Fetch cache + uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 + with: + shared-key: "check-migrations-cache" + - name: Build ${{ matrix.runtime.name }} run: | cargo build --release -p ${{ matrix.runtime.package }} --features try-runtime -q --locked diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index ee88a3d..cec3c8b 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -155,22 +155,7 @@ pub type Executive = frame_executive::Executive< Migrations, >; -// Note: if try-runtime pre/post checks are enabled it will error when it tries to decode the -// entire chain state. However, this is to be expected and can be ignored: -// https://substrate.stackexchange.com/questions/10986/runtime-upgrade-for-parachainsystemhostconfiguration -type Migrations = ( - // We have currently 356 identities on Bajun, so setting the max number to be migrated to 1_000 - // should be more than enough, while still staying in a limit that will not overweigh our - // runtime migration. - pallet_identity::migration::versioned::V0ToV1, - // Track inactive funds of the teleporter account, currently we don't use that, but it doesn't - // hurt either. - pallet_balances::migration::MigrateToTrackInactive, - // Simple migration ordering the set of invulnerables. - pallet_collator_selection::migration::v1::MigrateToV1, - // Simple migration of the queue config data. - cumulus_pallet_xcmp_queue::migration::v4::MigrationToV4, -); +type Migrations = (); //type Migrations = (pallet_ajuna_awesome_avatars::migration::v6::MigrateToV6,); From 239eec872212946c0a44819eb306eb26db1ba32c Mon Sep 17 00:00:00 2001 From: clangenb <37865735+clangenb@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:53:51 +0800 Subject: [PATCH 2/2] Fix std feature enablement in the node and only disable default-features of workspace crate that have it. (#9) --- Cargo.toml | 72 ++++++++++++++++++++-------------------- node/Cargo.toml | 42 +++++++++++------------ runtime/bajun/Cargo.toml | 4 +-- 3 files changed, 59 insertions(+), 59 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 16d8ceb..7da6805 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,9 @@ members = [ [workspace.dependencies] # General -async-trait = { version = "0.1.73", default-features = false} +async-trait = { version = "0.1.73", default-features = false } clap = { version = "4.4.6", default-features = false } -color-print = { version = "0.3.5", default-features = false } +color-print = { version = "0.3.5" } futures = { version = "0.3.28", default-features = false } hex-literal = { version = "0.4.1", default-features = false } hex = { version = "0.4.3", default-features = false } @@ -33,7 +33,7 @@ scale-info = { version = "2.1.1", default-features = false } # Substrate frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } frame-executive = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } @@ -59,33 +59,33 @@ pallet-session = { git = "https://github.com/parityt pallet-sudo = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } pallet-transaction-payment = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } pallet-treasury = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } pallet-utility = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-executor = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-service = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-executor = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-keystore = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-network = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-rpc-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-service = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-telemetry = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-tracing = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +sc-transaction-pool-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } sp-consensus = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } sp-consensus-grandpa = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } @@ -103,15 +103,15 @@ sp-storage = { git = "https://github.com/parityt sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } sp-version = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } try-runtime-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } @@ -121,12 +121,12 @@ staging-xcm-builder = { git = "https://github.com/paritytech/polkadot- staging-xcm-executor = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } # Cumulus -cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } +cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } cumulus-client-consensus-relay-chain = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-client-network = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } @@ -139,7 +139,7 @@ cumulus-primitives-core = { git = "https://github.com/paritytech cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0" } cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk.git", branch = "release-polkadot-v1.7.0", default-features = false } diff --git a/node/Cargo.toml b/node/Cargo.toml index 56c79c6..ae6f37b 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -9,18 +9,18 @@ version.workspace = true [dependencies] # General -clap = { workspace = true } -log = { workspace = true } -serde = { workspace = true, features = [ "derive" ] } -jsonrpsee = { workspace = true, features = [ "server" ] } -futures = { workspace = true } -serde_json = { workspace = true } +clap = { workspace = true, features = ["std"] } +log = { workspace = true, features = ["std"] } +serde = { workspace = true, features = ["std", "derive"] } +jsonrpsee = { workspace = true, features = ["server"] } +futures = { workspace = true, features = ["std"] } +serde_json = { workspace = true, features = ["std"] } # Parity codec -parity-scale-codec = { workspace = true } +parity-scale-codec = { workspace = true, features = ["std"] } # Substrate -frame-benchmarking = { workspace = true } +frame-benchmarking = { workspace = true, features = ["std"] } frame-benchmarking-cli = { workspace = true } pallet-transaction-payment-rpc = { workspace = true } sc-basic-authorship = { workspace = true } @@ -29,7 +29,7 @@ sc-cli = { workspace = true } sc-client-api = { workspace = true } sc-offchain = { workspace = true } sc-consensus = { workspace = true } -sc-executor = { workspace = true } +sc-executor = { workspace = true, features = ["std"] } sc-network = { workspace = true } sc-network-sync = { workspace = true } sc-rpc = { workspace = true } @@ -39,21 +39,21 @@ sc-telemetry = { workspace = true } sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } +sp-api = { workspace = true, features = ["std"] } +sp-block-builder = { workspace = true, features = ["std"] } sp-blockchain = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-keystore = { workspace = true } -sp-runtime = { workspace = true } -sp-timestamp = { workspace = true } +sp-consensus-aura = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = ["std"] } +sp-keystore = { workspace = true, features = ["std"] } +sp-runtime = { workspace = true, features = ["std"] } +sp-timestamp = { workspace = true, features = ["std"] } substrate-frame-rpc-system = { workspace = true } substrate-prometheus-endpoint = { workspace = true } # Polkadot polkadot-cli = { workspace = true } -polkadot-primitives = { workspace = true } -staging-xcm = { workspace = true } +polkadot-primitives = { workspace = true, features = ["std"] } +staging-xcm = { workspace = true, features = ["std"] } # Cumulus cumulus-client-cli = { workspace = true } @@ -62,13 +62,13 @@ cumulus-client-consensus-aura = { workspace = true } cumulus-client-consensus-common = { workspace = true } cumulus-client-consensus-proposer = { workspace = true } cumulus-client-service = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-parachain-inherent = { workspace = true } +cumulus-primitives-core = { workspace = true, features = ["std"] } +cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } cumulus-relay-chain-interface = { workspace = true } color-print = { workspace = true } # Runtime -bajun-runtime = { workspace = true } +bajun-runtime = { workspace = true, features = ["std"] } [build-dependencies] substrate-build-script-utils = { workspace = true } diff --git a/runtime/bajun/Cargo.toml b/runtime/bajun/Cargo.toml index ab317a3..ab47c81 100644 --- a/runtime/bajun/Cargo.toml +++ b/runtime/bajun/Cargo.toml @@ -14,12 +14,12 @@ substrate-wasm-builder = { workspace = true } # General hex-literal = { workspace = true, optional = true } log = { workspace = true } -serde = { workspace = true, features = [ "derive" ], optional = true } +serde = { workspace = true, features = ["derive"], optional = true } smallvec = { workspace = true } # Parity codec parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = [ "derive" ] } +scale-info = { workspace = true, features = ["derive"] } # Substrate frame-benchmarking = { workspace = true, optional = true }