diff --git a/.cargo/config.toml b/.cargo/config.toml index ed3c5c09b..b55206d26 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -2,12 +2,12 @@ # RUSTFLAGS= cargo clippy [target.'cfg(feature = "cargo-clippy")'] rustflags = [ - "-Dunsafe_code", - "-Dclippy::correctness", - "-Dclippy::complexity", - "-Dclippy::suspicious", - "-Aclippy::type_complexity", # raison d'etre - "-Aclippy::too-many-arguments", # (Turning this on would lead to) - "-Aclippy::erasing_op", # E.g. 0 * DOLLARS - "-Aclippy::identity_op", # E.g. 1 * DOLLARS + "-Dunsafe_code", + "-Dclippy::correctness", + "-Dclippy::complexity", + "-Dclippy::suspicious", + "-Aclippy::type_complexity", # raison d'etre + "-Aclippy::too-many-arguments", # (Turning this on would lead to) + "-Aclippy::erasing_op", # E.g. 0 * DOLLARS + "-Aclippy::identity_op", # E.g. 1 * DOLLARS ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d667951f8..7107aa087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -135,25 +135,6 @@ jobs: - name: Run zepter run: zepter run check - toml-formatting: - runs-on: ubuntu-latest - needs: ["set-tags"] - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ needs.set-tags.outputs.git_ref }} - - - name: Setup Rust toolchain - run: rustup show - - - name: Install taplo - run: cargo install --locked -f taplo-cli - - - name: Run taplo - run: | - taplo format --check --config .cargo/taplo.toml || (echo "Please run `taplo format --config .cargo/taplo.toml` to fix any toml formatting issues" && exit 1) - typescript-formatting: runs-on: ubuntu-latest needs: ["set-tags"] diff --git a/.rustfmt.toml b/.rustfmt.toml index 2516ffd71..13992e204 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -3,4 +3,4 @@ reorder_imports = true max_width = 100 -imports_granularity = "One" +imports_granularity = "One" \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 098cbdfaf..e4dade73b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ members = [ resolver = "2" [workspace.package] -authors = ["Moondance Labs"] +authors = [ "Moondance Labs" ] repository = "https://github.com/moondance-labs/tanssi" [workspace.dependencies] @@ -92,7 +92,7 @@ pallet-timestamp = { git = "https://github.com/moondance-labs/polkadot-sdk", bra pallet-transaction-payment = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } pallet-utility = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } pallet-tx-pause = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } -parity-scale-codec = { version = "3.0.0", default-features = false, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { version = "3.0.0", default-features = false, features = [ "derive", "max-encoded-len" ] } scale-info = { version = "2.10.0", default-features = false } sp-api = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } sp-application-crypto = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.3.0", default-features = false } @@ -243,17 +243,17 @@ smallvec = "1.10.0" # General (client) async-io = "1.3" async-trait = "0.1" -clap = { version = "4.1.6", default-features = false, features = ["derive"] } +clap = { version = "4.1.6", default-features = false, features = [ "derive" ] } core_extensions = "1.5.3" exit-future = { version = "0.2.0" } flume = "0.10.9" futures = { version = "0.3.1" } futures-timer = "3.0.1" hex = { version = "0.4.3", default-features = false } -jsonrpsee = { version = "0.16.2", features = ["server"] } +jsonrpsee = { version = "0.16.2", features = [ "server" ] } num-traits = "0.2.8" parking_lot = "0.12.1" -rand = { version = "0.8.5", default-features = false, features = ["std_rng"] } +rand = { version = "0.8.5", default-features = false, features = [ "std_rng" ] } serde_json = { version = "1.0.96", default-features = false } similar-asserts = "1.1.0" tempfile = "3.1.0" diff --git a/client/consensus/Cargo.toml b/client/consensus/Cargo.toml index 271db86e5..326fe99d8 100644 --- a/client/consensus/Cargo.toml +++ b/client/consensus/Cargo.toml @@ -14,7 +14,7 @@ sc-consensus-manual-seal = { workspace = true } sc-consensus-slots = { workspace = true } sc-telemetry = { workspace = true } sp-api = { workspace = true } -sp-application-crypto = { workspace = true, features = ["full_crypto", "std"] } +sp-application-crypto = { workspace = true, features = [ "full_crypto", "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } @@ -28,7 +28,7 @@ sp-timestamp = { workspace = true } substrate-prometheus-endpoint = { workspace = true } # Own -tp-consensus = { workspace = true, features = ["std"] } +tp-consensus = { workspace = true, features = [ "std" ] } # Cumulus dependencies cumulus-client-consensus-common = { workspace = true } @@ -37,7 +37,7 @@ cumulus-primitives-parachain-inherent = { workspace = true } # Nimbus Dependencies nimbus-consensus = { workspace = true } -nimbus-primitives = { workspace = true, features = ["std"] } +nimbus-primitives = { workspace = true, features = [ "std" ] } # Frontier Dependencies fc-rpc = { workspace = true } @@ -46,7 +46,7 @@ fc-rpc = { workspace = true } async-trait = { workspace = true } futures = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive"] } +parity-scale-codec = { workspace = true, features = [ "derive" ] } tracing = { workspace = true } [dev-dependencies] diff --git a/client/consensus/src/tests.rs b/client/consensus/src/tests.rs index 1e9866ca7..0cdaf3b39 100644 --- a/client/consensus/src/tests.rs +++ b/client/consensus/src/tests.rs @@ -14,8 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see . -#![allow(clippy::await_holding_lock)] - // This tests have been greatly influenced by // https://github.com/paritytech/substrate/blob/master/client/consensus/aura/src/lib.rs#L832 // Most of the items hereby added are intended to make it work with our current consensus mechanism @@ -212,7 +210,12 @@ impl Proposer for DummyProposer { _: Duration, _: Option, ) -> Self::Proposal { - let r = self.1.new_block(digests).unwrap().build(); + let r = self + .1 + .new_block(digests) + .unwrap() + .build() + .map_err(|e| e.into()); futures::future::ready(r.map(|b| Proposal { block: b.block, diff --git a/client/manual-xcm/Cargo.toml b/client/manual-xcm/Cargo.toml index cdcbbead3..993881404 100644 --- a/client/manual-xcm/Cargo.toml +++ b/client/manual-xcm/Cargo.toml @@ -8,11 +8,11 @@ version = "0.1.0" [dependencies] flume = { workspace = true } -futures = { workspace = true, features = ["compat"] } +futures = { workspace = true, features = [ "compat" ] } hex-literal = { workspace = true } -jsonrpsee = { workspace = true, features = ["macros", "server"] } -parity-scale-codec = { workspace = true, features = ["std"] } +jsonrpsee = { workspace = true, features = [ "macros", "server" ] } +parity-scale-codec = { workspace = true, features = [ "std" ] } staging-xcm = { workspace = true } -tokio = { workspace = true, features = ["sync", "time"] } +tokio = { workspace = true, features = [ "sync", "time" ] } -cumulus-primitives-core = { workspace = true, features = ["std"] } +cumulus-primitives-core = { workspace = true, features = [ "std" ] } diff --git a/client/node-common/Cargo.toml b/client/node-common/Cargo.toml index ac3ee3e3e..1da6af0cc 100644 --- a/client/node-common/Cargo.toml +++ b/client/node-common/Cargo.toml @@ -9,21 +9,21 @@ version = "0.1.0" [dependencies] async-io = { workspace = true } async-trait = { workspace = true } -clap = { workspace = true, features = ["derive"] } -core_extensions = { workspace = true, features = ["type_identity"] } +clap = { workspace = true, features = [ "derive" ] } +core_extensions = { workspace = true, features = [ "type_identity" ] } flume = { workspace = true } futures = { workspace = true } -jsonrpsee = { workspace = true, features = ["server"] } +jsonrpsee = { workspace = true, features = [ "server" ] } log = { workspace = true } parity-scale-codec = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } # Local tc-consensus = { workspace = true } # Nimbus nimbus-consensus = { workspace = true } -nimbus-primitives = { workspace = true, features = ["std"] } +nimbus-primitives = { workspace = true, features = [ "std" ] } # Substrate frame-benchmarking = { workspace = true } @@ -48,19 +48,19 @@ sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } sc-utils = { workspace = true } -sp-api = { workspace = true, features = ["std"] } +sp-api = { workspace = true, features = [ "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } sp-consensus-aura = { workspace = true } -sp-core = { workspace = true, features = ["std"] } -sp-inherents = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } -sp-keystore = { workspace = true, features = ["std"] } -sp-offchain = { workspace = true, features = ["std"] } -sp-runtime = { workspace = true, features = ["std"] } -sp-session = { workspace = true, features = ["std"] } -sp-timestamp = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = [ "std" ] } +sp-inherents = { workspace = true, features = [ "std" ] } +sp-io = { workspace = true, features = [ "std" ] } +sp-keystore = { workspace = true, features = [ "std" ] } +sp-offchain = { workspace = true, features = [ "std" ] } +sp-runtime = { workspace = true, features = [ "std" ] } +sp-session = { workspace = true, features = [ "std" ] } +sp-timestamp = { workspace = true, features = [ "std" ] } sp-transaction-pool = { workspace = true } substrate-frame-rpc-system = { workspace = true } diff --git a/container-chains/templates/frontier/node/Cargo.toml b/container-chains/templates/frontier/node/Cargo.toml index ea5f7d166..2c8a89898 100644 --- a/container-chains/templates/frontier/node/Cargo.toml +++ b/container-chains/templates/frontier/node/Cargo.toml @@ -10,33 +10,33 @@ version = "0.1.0" [dependencies] async-io = { workspace = true } async-trait = { workspace = true } -clap = { workspace = true, features = ["derive"] } +clap = { workspace = true, features = [ "derive" ] } flume = { workspace = true } futures = { workspace = true } hex-literal = { workspace = true } -jsonrpsee = { workspace = true, features = ["server"] } +jsonrpsee = { workspace = true, features = [ "server" ] } log = { workspace = true } parity-scale-codec = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } url = { workspace = true } # Local ccp-authorities-noting-inherent = { workspace = true } -container-chain-template-frontier-runtime = { workspace = true, features = ["std"] } +container-chain-template-frontier-runtime = { workspace = true, features = [ "std" ] } manual-xcm-rpc = { workspace = true } node-common = { workspace = true } tc-consensus = { workspace = true } # Nimbus nimbus-consensus = { workspace = true } -nimbus-primitives = { workspace = true, features = ["std"] } +nimbus-primitives = { workspace = true, features = [ "std" ] } # Substrate frame-benchmarking = { workspace = true } frame-benchmarking-cli = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } pallet-transaction-payment-rpc = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = ["std"] } +pallet-transaction-payment-rpc-runtime-api = { workspace = true, features = [ "std" ] } sc-basic-authorship = { workspace = true } sc-chain-spec = { workspace = true } sc-cli = { workspace = true } @@ -55,21 +55,21 @@ sc-telemetry = { workspace = true } sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } -sp-api = { workspace = true, features = ["std"] } +sp-api = { workspace = true, features = [ "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } sp-debug-derive = { workspace = true } sp-consensus-aura = { workspace = true } -sp-core = { workspace = true, features = ["std"] } -sp-inherents = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } -sp-keystore = { workspace = true, features = ["std"] } -sp-offchain = { workspace = true, features = ["std"] } -sp-runtime = { workspace = true, features = ["std"] } -sp-session = { workspace = true, features = ["std"] } -sp-timestamp = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = [ "std" ] } +sp-inherents = { workspace = true, features = [ "std" ] } +sp-io = { workspace = true, features = [ "std" ] } +sp-keystore = { workspace = true, features = [ "std" ] } +sp-offchain = { workspace = true, features = [ "std" ] } +sp-runtime = { workspace = true, features = [ "std" ] } +sp-session = { workspace = true, features = [ "std" ] } +sp-timestamp = { workspace = true, features = [ "std" ] } sp-transaction-pool = { workspace = true } substrate-frame-rpc-system = { workspace = true } @@ -96,10 +96,10 @@ cumulus-test-relay-sproof-builder = { workspace = true } fc-api = { workspace = true } fc-cli = { workspace = true } fc-consensus = { workspace = true } -fc-db = { workspace = true, features = ["sql"] } -fc-mapping-sync = { workspace = true, features = ["sql"] } -fc-rpc = { workspace = true, features = ["txpool"] } -fc-rpc-core = { workspace = true, features = ["txpool"] } +fc-db = { workspace = true, features = [ "sql" ] } +fc-mapping-sync = { workspace = true, features = [ "sql" ] } +fc-rpc = { workspace = true, features = [ "txpool" ] } +fc-rpc-core = { workspace = true, features = [ "txpool" ] } fc-storage = { workspace = true } fp-evm = { workspace = true } fp-rpc = { workspace = true } @@ -111,22 +111,22 @@ substrate-build-script-utils = { workspace = true } default = [] runtime-benchmarks = [ "container-chain-template-frontier-runtime/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "nimbus-primitives/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-service/runtime-benchmarks", "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ "container-chain-template-frontier-runtime/try-runtime", + "try-runtime-cli/try-runtime", "nimbus-primitives/try-runtime", "pallet-ethereum/try-runtime", "polkadot-cli/try-runtime", "polkadot-service/try-runtime", - "sp-runtime/try-runtime", - "try-runtime-cli/try-runtime", -] + "sp-runtime/try-runtime" + ] diff --git a/container-chains/templates/frontier/runtime/Cargo.toml b/container-chains/templates/frontier/runtime/Cargo.toml index 18f1f0270..e0de57a4d 100644 --- a/container-chains/templates/frontier/runtime/Cargo.toml +++ b/container-chains/templates/frontier/runtime/Cargo.toml @@ -7,15 +7,15 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] hex-literal = { workspace = true, optional = true } log = { workspace = true } num_enum = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive"] } -scale-info = { workspace = true, features = ["derive"] } -serde = { workspace = true, optional = true, features = ["derive"] } +parity-scale-codec = { workspace = true, features = [ "derive" ] } +scale-info = { workspace = true, features = [ "derive" ] } +serde = { workspace = true, optional = true, features = [ "derive" ] } smallvec = { workspace = true } # Local @@ -30,7 +30,7 @@ pallet-evm-precompile-balances-erc20 = { workspace = true } pallet-evm-precompile-batch = { workspace = true } pallet-evm-precompile-call-permit = { workspace = true } pallet-evm-precompile-xcm-utils = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-maintenance-mode = { workspace = true, features = [ "xcm-support" ] } pallet-migrations = { workspace = true } xcm-primitives = { workspace = true } @@ -40,7 +40,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } frame-try-runtime = { workspace = true, optional = true } -pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } +pallet-balances = { workspace = true, features = [ "insecure_zero_ed" ] } pallet-proxy = { workspace = true } pallet-root-testing = { workspace = true } pallet-sudo = { workspace = true } @@ -84,10 +84,10 @@ cumulus-primitives-utility = { workspace = true } parachain-info = { workspace = true } # Frontier -fp-account = { workspace = true, features = ["serde"] } -fp-evm = { workspace = true, features = ["serde"] } +fp-account = { workspace = true, features = [ "serde" ] } +fp-evm = { workspace = true, features = [ "serde" ] } fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } +fp-self-contained = { workspace = true, features = [ "serde" ] } pallet-base-fee = { workspace = true } pallet-dynamic-fee = { workspace = true } pallet-ethereum = { workspace = true } @@ -103,12 +103,11 @@ precompile-utils = { workspace = true } substrate-wasm-builder = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "ccp-xcm/std", "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-core/std", @@ -124,9 +123,6 @@ std = [ "frame-system/std", "frame-try-runtime/std", "log/std", - "nimbus-primitives/std", - "num_enum/std", - "pallet-author-inherent/std", "pallet-balances/std", "pallet-base-fee/std", "pallet-cc-authorities-noting/std", @@ -146,13 +142,11 @@ std = [ "pallet-maintenance-mode/std", "pallet-migrations/std", "pallet-proxy/std", - "pallet-root-testing/std", "pallet-sudo/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-tx-pause/std", "pallet-utility/std", + "pallet-tx-pause/std", "pallet-xcm/std", "parachain-info/std", "parity-scale-codec/std", @@ -161,73 +155,75 @@ std = [ "precompile-utils/std", "scale-info/std", "serde", - "serde?/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", - "sp-debug-derive/std", "sp-inherents/std", "sp-offchain/std", "sp-runtime/std", - "sp-session/std", "sp-std/std", "sp-transaction-pool/std", - "sp-trie/std", "sp-version/std", "staging-xcm-builder/std", "staging-xcm-executor/std", "staging-xcm/std", "tp-consensus/std", "xcm-primitives/std", + "cumulus-pallet-session-benchmarking/std", + "nimbus-primitives/std", + "num_enum/std", + "pallet-author-inherent/std", + "pallet-root-testing/std", + "pallet-transaction-payment/std", + "serde?/std", + "sp-debug-derive/std", + "sp-session/std", + "sp-trie/std" ] # Allow to print logs details (no wasm:stripped) -force-debug = ["sp-debug-derive/force-debug"] +force-debug = [ "sp-debug-derive/force-debug" ] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "hex-literal", + "pallet-balances/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", "nimbus-primitives/runtime-benchmarks", "pallet-author-inherent/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", "pallet-cc-authorities-noting/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm-precompile-xcm-utils/runtime-benchmarks", "pallet-evm/runtime-benchmarks", + "pallet-evm-precompile-xcm-utils/runtime-benchmarks", "pallet-hotfix-sufficients/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", "pallet-tx-pause/runtime-benchmarks", "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "staging-xcm-builder/runtime-benchmarks", "staging-xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks" ] try-runtime = [ - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", "fp-self-contained/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime/try-runtime", "nimbus-primitives/try-runtime", - "pallet-author-inherent/try-runtime", "pallet-balances/try-runtime", "pallet-base-fee/try-runtime", "pallet-cc-authorities-noting/try-runtime", @@ -239,14 +235,18 @@ try-runtime = [ "pallet-maintenance-mode/try-runtime", "pallet-migrations/try-runtime", "pallet-proxy/try-runtime", - "pallet-root-testing/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", "pallet-transaction-payment/try-runtime", - "pallet-tx-pause/try-runtime", "pallet-utility/try-runtime", - "pallet-xcm/try-runtime", + "pallet-tx-pause/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-xcm/try-runtime" ] diff --git a/container-chains/templates/simple/node/Cargo.toml b/container-chains/templates/simple/node/Cargo.toml index d2d01701f..7d4e8e973 100644 --- a/container-chains/templates/simple/node/Cargo.toml +++ b/container-chains/templates/simple/node/Cargo.toml @@ -10,24 +10,24 @@ version = "0.1.0" [dependencies] async-io = { workspace = true } async-trait = { workspace = true } -clap = { workspace = true, features = ["derive"] } +clap = { workspace = true, features = [ "derive" ] } flume = { workspace = true } futures = { workspace = true } -jsonrpsee = { workspace = true, features = ["server"] } +jsonrpsee = { workspace = true, features = [ "server" ] } log = { workspace = true } parity-scale-codec = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } # Local ccp-authorities-noting-inherent = { workspace = true } -container-chain-template-simple-runtime = { workspace = true, features = ["std"] } +container-chain-template-simple-runtime = { workspace = true, features = [ "std" ] } manual-xcm-rpc = { workspace = true } node-common = { workspace = true } tc-consensus = { workspace = true } # Nimbus nimbus-consensus = { workspace = true } -nimbus-primitives = { workspace = true, features = ["std"] } +nimbus-primitives = { workspace = true, features = [ "std" ] } # Substrate frame-benchmarking = { workspace = true } @@ -50,19 +50,19 @@ sc-telemetry = { workspace = true } sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } -sp-api = { workspace = true, features = ["std"] } +sp-api = { workspace = true, features = [ "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } sp-consensus-aura = { workspace = true } -sp-core = { workspace = true, features = ["std"] } -sp-inherents = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } -sp-keystore = { workspace = true, features = ["std"] } -sp-offchain = { workspace = true, features = ["std"] } -sp-runtime = { workspace = true, features = ["std"] } -sp-session = { workspace = true, features = ["std"] } -sp-timestamp = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = [ "std" ] } +sp-inherents = { workspace = true, features = [ "std" ] } +sp-io = { workspace = true, features = [ "std" ] } +sp-keystore = { workspace = true, features = [ "std" ] } +sp-offchain = { workspace = true, features = [ "std" ] } +sp-runtime = { workspace = true, features = [ "std" ] } +sp-session = { workspace = true, features = [ "std" ] } +sp-timestamp = { workspace = true, features = [ "std" ] } sp-transaction-pool = { workspace = true } substrate-frame-rpc-system = { workspace = true } @@ -90,20 +90,20 @@ substrate-build-script-utils = { workspace = true } default = [] runtime-benchmarks = [ "container-chain-template-simple-runtime/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", "nimbus-primitives/runtime-benchmarks", - "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-service/runtime-benchmarks", "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ "container-chain-template-simple-runtime/try-runtime", + "try-runtime-cli/try-runtime", "nimbus-primitives/try-runtime", "polkadot-cli/try-runtime", "polkadot-service/try-runtime", - "sp-runtime/try-runtime", - "try-runtime-cli/try-runtime", -] + "sp-runtime/try-runtime" + ] diff --git a/container-chains/templates/simple/runtime/Cargo.toml b/container-chains/templates/simple/runtime/Cargo.toml index 7c5ab5ac6..02d74a369 100644 --- a/container-chains/templates/simple/runtime/Cargo.toml +++ b/container-chains/templates/simple/runtime/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] hex-literal = { workspace = true, optional = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive"] } -scale-info = { workspace = true, features = ["derive"] } -serde = { workspace = true, optional = true, features = ["derive"] } +parity-scale-codec = { workspace = true, features = [ "derive" ] } +scale-info = { workspace = true, features = [ "derive" ] } +serde = { workspace = true, optional = true, features = [ "derive" ] } smallvec = { workspace = true } # Local @@ -24,7 +24,7 @@ tp-consensus = { workspace = true } # Moonkit nimbus-primitives = { workspace = true } pallet-author-inherent = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-maintenance-mode = { workspace = true, features = [ "xcm-support" ] } pallet-migrations = { workspace = true } xcm-primitives = { workspace = true } @@ -85,20 +85,17 @@ frame-try-runtime = { workspace = true, optional = true } substrate-wasm-builder = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-core/std", "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", - "frame-benchmarking?/std", "frame-executive/std", "frame-support/std", - "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", @@ -110,14 +107,12 @@ std = [ "pallet-maintenance-mode/std", "pallet-migrations/std", "pallet-proxy/std", - "pallet-root-testing/std", "pallet-session/std", "pallet-sudo/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-tx-pause/std", "pallet-utility/std", + "pallet-tx-pause/std", "pallet-xcm/std", "parachain-info/std", "parity-scale-codec/std", @@ -125,86 +120,91 @@ std = [ "polkadot-runtime-common/std", "scale-info/std", "serde", - "serde?/std", "sp-api/std", "sp-block-builder/std", "sp-consensus-aura/std", "sp-core/std", - "sp-debug-derive/std", "sp-inherents/std", "sp-offchain/std", "sp-runtime/std", - "sp-session/std", "sp-std/std", "sp-transaction-pool/std", - "sp-trie/std", "sp-version/std", "staging-xcm-builder/std", "staging-xcm-executor/std", "staging-xcm/std", "tp-consensus/std", "xcm-primitives/std", + "cumulus-pallet-session-benchmarking/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-root-testing/std", + "pallet-transaction-payment/std", + "serde?/std", + "sp-debug-derive/std", + "sp-session/std", + "sp-trie/std" ] # Allow to print logs details (no wasm:stripped) -force-debug = ["sp-debug-derive/force-debug"] +force-debug = [ "sp-debug-derive/force-debug" ] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", "hex-literal", - "nimbus-primitives/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-cc-authorities-noting/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", "pallet-tx-pause/runtime-benchmarks", "pallet-utility/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "staging-xcm-builder/runtime-benchmarks", "staging-xcm-executor/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks" ] try-runtime = [ - "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", - "cumulus-pallet-xcm/try-runtime", - "cumulus-pallet-xcmp-queue/try-runtime", "frame-executive/try-runtime", "frame-support/try-runtime", "frame-system/try-runtime", "frame-try-runtime", - "frame-try-runtime/try-runtime", "nimbus-primitives/try-runtime", - "pallet-author-inherent/try-runtime", "pallet-balances/try-runtime", "pallet-cc-authorities-noting/try-runtime", "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", "pallet-proxy/try-runtime", - "pallet-root-testing/try-runtime", "pallet-session/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-tx-pause/try-runtime", "pallet-utility/try-runtime", - "pallet-xcm/try-runtime", + "pallet-tx-pause/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-migrations/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-xcm/try-runtime" ] diff --git a/node/Cargo.toml b/node/Cargo.toml index 1cf5708af..e98c83653 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -10,35 +10,35 @@ version = "0.1.0" [dependencies] async-io = { workspace = true } async-trait = { workspace = true } -clap = { workspace = true, features = ["derive"] } +clap = { workspace = true, features = [ "derive" ] } exit-future = { workspace = true } flume = { workspace = true } futures = { workspace = true } -jsonrpsee = { workspace = true, features = ["server"] } +jsonrpsee = { workspace = true, features = [ "server" ] } log = { workspace = true } parity-scale-codec = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } serde_json = { workspace = true } tokio = { workspace = true } # Local -ccp-authorities-noting-inherent = { workspace = true, features = ["std"] } -dancebox-runtime = { workspace = true, features = ["std"] } +ccp-authorities-noting-inherent = { workspace = true, features = [ "std" ] } +dancebox-runtime = { workspace = true, features = [ "std" ] } manual-xcm-rpc = { workspace = true } node-common = { workspace = true } -pallet-author-noting-runtime-api = { workspace = true, features = ["std"] } -pallet-collator-assignment-runtime-api = { workspace = true, features = ["std"] } -pallet-configuration = { workspace = true, features = ["std"] } -pallet-registrar-runtime-api = { workspace = true, features = ["std"] } -tp-author-noting-inherent = { workspace = true, features = ["std"] } -tp-container-chain-genesis-data = { workspace = true, features = ["json", "std"] } +pallet-author-noting-runtime-api = { workspace = true, features = [ "std" ] } +pallet-collator-assignment-runtime-api = { workspace = true, features = [ "std" ] } +pallet-configuration = { workspace = true, features = [ "std" ] } +pallet-registrar-runtime-api = { workspace = true, features = [ "std" ] } +tp-author-noting-inherent = { workspace = true, features = [ "std" ] } +tp-container-chain-genesis-data = { workspace = true, features = [ "json", "std" ] } dc-orchestrator-chain-interface = { workspace = true } tc-consensus = { workspace = true } # Nimbus nimbus-consensus = { workspace = true } -nimbus-primitives = { workspace = true, features = ["std"] } +nimbus-primitives = { workspace = true, features = [ "std" ] } # Substrate frame-benchmarking = { workspace = true } @@ -61,21 +61,21 @@ sc-telemetry = { workspace = true } sc-tracing = { workspace = true } sc-transaction-pool = { workspace = true } sc-transaction-pool-api = { workspace = true } -sp-api = { workspace = true, features = ["std"] } +sp-api = { workspace = true, features = [ "std" ] } sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus = { workspace = true } sp-consensus-aura = { workspace = true } -sp-core = { workspace = true, features = ["std"] } -sp-inherents = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } -sp-keystore = { workspace = true, features = ["std"] } -sp-offchain = { workspace = true, features = ["std"] } -sp-runtime = { workspace = true, features = ["std"] } -sp-session = { workspace = true, features = ["std"] } -sp-state-machine = { workspace = true, features = ["std"] } -sp-timestamp = { workspace = true, features = ["std"] } +sp-core = { workspace = true, features = [ "std" ] } +sp-inherents = { workspace = true, features = [ "std" ] } +sp-io = { workspace = true, features = [ "std" ] } +sp-keystore = { workspace = true, features = [ "std" ] } +sp-offchain = { workspace = true, features = [ "std" ] } +sp-runtime = { workspace = true, features = [ "std" ] } +sp-session = { workspace = true, features = [ "std" ] } +sp-state-machine = { workspace = true, features = [ "std" ] } +sp-timestamp = { workspace = true, features = [ "std" ] } sp-transaction-pool = { workspace = true } substrate-frame-rpc-system = { workspace = true } @@ -105,16 +105,16 @@ substrate-build-script-utils = { workspace = true } default = [] runtime-benchmarks = [ "dancebox-runtime/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "polkadot-service/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", "nimbus-primitives/runtime-benchmarks", "pallet-configuration/runtime-benchmarks", - "polkadot-cli/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", - "polkadot-service/runtime-benchmarks", "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] -try-runtime = ["dancebox-runtime/try-runtime", "nimbus-primitives/try-runtime", "pallet-configuration/try-runtime", "polkadot-cli/try-runtime", "polkadot-service/try-runtime", "sp-runtime/try-runtime", "try-runtime-cli/try-runtime"] +try-runtime = [ "dancebox-runtime/try-runtime", "nimbus-primitives/try-runtime", "pallet-configuration/try-runtime", "polkadot-cli/try-runtime", "polkadot-service/try-runtime", "sp-runtime/try-runtime", "try-runtime-cli/try-runtime" ] -fast-runtime = ["dancebox-runtime/fast-runtime"] +fast-runtime = [ "dancebox-runtime/fast-runtime" ] diff --git a/node/src/container_chain_spawner.rs b/node/src/container_chain_spawner.rs index 33d048ff6..2538ca299 100644 --- a/node/src/container_chain_spawner.rs +++ b/node/src/container_chain_spawner.rs @@ -883,7 +883,7 @@ mod tests { chains_to_start, need_to_restart, } = handle_update_assignment_state_change( - &mut self.state.lock().unwrap(), + &mut *self.state.lock().unwrap(), self.orchestrator_para_id, self.collate_on_tanssi.clone(), current, diff --git a/pallets/author-noting/Cargo.toml b/pallets/author-noting/Cargo.toml index 9dfa1dd5d..92e19de41 100644 --- a/pallets/author-noting/Cargo.toml +++ b/pallets/author-noting/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -hex = { workspace = true, optional = true, features = ["alloc"] } +hex = { workspace = true, optional = true, features = [ "alloc" ] } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } -serde = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = [ "derive" ] } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } sp-inherents = { workspace = true } @@ -44,9 +44,8 @@ sp-version = { workspace = true } test-relay-sproof-builder = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ - "bounded-collections/std", "cumulus-pallet-parachain-system/std", "cumulus-primitives-core/std", "cumulus-primitives-core/std", @@ -56,43 +55,44 @@ std = [ "frame-support/std", "frame-system/std", "hex", + "parity-scale-codec/std", + "scale-info/std", + "serde", + "sp-consensus-aura/std", + "sp-state-machine/std", + "sp-trie/std", + "tp-author-noting-inherent/std", + "tp-traits/std", + "bounded-collections/std", "hex?/std", "log/std", - "parity-scale-codec/std", "polkadot-parachain-primitives/std", "polkadot-primitives/std", - "scale-info/std", - "serde", "serde?/std", - "sp-consensus-aura/std", "sp-core/std", "sp-externalities/std", "sp-inherents/std", "sp-io/std", "sp-runtime/std", - "sp-state-machine/std", "sp-std/std", - "sp-trie/std", "sp-version/std", - "test-relay-sproof-builder/std", - "tp-author-noting-inherent/std", - "tp-traits/std", + "test-relay-sproof-builder/std" ] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "frame-benchmarking", + "hex", + "tp-traits/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "hex", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ - "cumulus-pallet-parachain-system/try-runtime", "frame-support/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", "frame-system/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/author-noting/rpc/runtime-api/Cargo.toml b/pallets/author-noting/rpc/runtime-api/Cargo.toml index fc9b2d1cb..76ff44f76 100644 --- a/pallets/author-noting/rpc/runtime-api/Cargo.toml +++ b/pallets/author-noting/rpc/runtime-api/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] parity-scale-codec = { workspace = true } sp-api = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "parity-scale-codec/std", "sp-api/std", diff --git a/pallets/authority-assignment/Cargo.toml b/pallets/authority-assignment/Cargo.toml index 05d1df1b8..cf89f5643 100644 --- a/pallets/authority-assignment/Cargo.toml +++ b/pallets/authority-assignment/Cargo.toml @@ -7,15 +7,15 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] dp-collator-assignment = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } -serde = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = [ "derive" ] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -25,24 +25,24 @@ tp-traits = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "dp-collator-assignment/std", "frame-support/std", "frame-system/std", - "log/std", "parity-scale-codec/std", "scale-info/std", "serde", + "tp-traits/std", + "log/std", "serde?/std", "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", - "tp-traits/std", + "sp-std/std" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/authority-mapping/Cargo.toml b/pallets/authority-mapping/Cargo.toml index 3bfa28074..0fd727998 100644 --- a/pallets/authority-mapping/Cargo.toml +++ b/pallets/authority-mapping/Cargo.toml @@ -7,11 +7,11 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-support = { workspace = true } frame-system = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } @@ -21,7 +21,7 @@ sp-std = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "frame-support/std", "frame-system/std", @@ -30,10 +30,10 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", + "sp-std/std" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/collator-assignment/Cargo.toml b/pallets/collator-assignment/Cargo.toml index fa4783d5b..4e74e0ce1 100644 --- a/pallets/collator-assignment/Cargo.toml +++ b/pallets/collator-assignment/Cargo.toml @@ -7,18 +7,18 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] dp-collator-assignment = { workspace = true } frame-benchmarking = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } rand = { workspace = true } rand_chacha = { workspace = true } scale-info = { workspace = true } -serde = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = [ "derive" ] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -28,34 +28,34 @@ tp-traits = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "dp-collator-assignment/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "log/std", "parity-scale-codec/std", - "rand/std", - "rand_chacha/std", "scale-info/std", "serde", - "serde?/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", "tp-traits/std", + "log/std", + "rand/std", + "rand_chacha/std", + "serde?/std", + "sp-core/std", + "sp-io/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", "tp-traits/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/collator-assignment/rpc/runtime-api/Cargo.toml b/pallets/collator-assignment/rpc/runtime-api/Cargo.toml index 1ae566d7e..74f18e5d6 100644 --- a/pallets/collator-assignment/rpc/runtime-api/Cargo.toml +++ b/pallets/collator-assignment/rpc/runtime-api/Cargo.toml @@ -7,16 +7,16 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] parity-scale-codec = { workspace = true } scale-info = { workspace = true } sp-api = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "parity-scale-codec/std", - "scale-info/std", "sp-api/std", + "scale-info/std" ] diff --git a/pallets/configuration/Cargo.toml b/pallets/configuration/Cargo.toml index 5b86393c5..137a2d252 100644 --- a/pallets/configuration/Cargo.toml +++ b/pallets/configuration/Cargo.toml @@ -7,15 +7,15 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -25,20 +25,20 @@ tp-traits = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "log/std", "parity-scale-codec/std", "scale-info/std", "serde/std", + "tp-traits/std", + "log/std", "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", - "tp-traits/std", + "sp-std/std" ] runtime-benchmarks = [ "frame-benchmarking", @@ -46,10 +46,10 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/data-preservers/Cargo.toml b/pallets/data-preservers/Cargo.toml index 165db1a95..19527ce71 100644 --- a/pallets/data-preservers/Cargo.toml +++ b/pallets/data-preservers/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] @@ -32,45 +32,45 @@ sp-std = { workspace = true } [dev-dependencies] bounded-collections = { workspace = true } num-traits = { workspace = true } -pallet-balances = { workspace = true, features = ["std"] } +pallet-balances = { workspace = true, features = [ "std" ] } similar-asserts = { workspace = true } -sp-io = { workspace = true, features = ["std"] } +sp-io = { workspace = true, features = [ "std" ] } [features] -default = ["std"] +default = [ "std" ] std = [ - "bounded-collections/std", "dp-core/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "log/std", "nimbus-primitives/std", - "pallet-balances/std", "parity-scale-codec/std", "scale-info/std", "serde", - "serde?/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", "tp-traits/std", + "bounded-collections/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" ] runtime-benchmarks = [ "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", "nimbus-primitives/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "nimbus-primitives/try-runtime", "pallet-balances/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/data-preservers/src/mock.rs b/pallets/data-preservers/src/mock.rs index e6c1cab85..a1faa7c8f 100644 --- a/pallets/data-preservers/src/mock.rs +++ b/pallets/data-preservers/src/mock.rs @@ -176,7 +176,7 @@ where MockData::get() .container_chain_managers .get(para_id) - .and_then(|inner| *inner) + .and_then(|inner| inner.clone()) .and_then(|manager| { if manager != u64::from(signed_account.clone()) { None diff --git a/pallets/inflation-rewards/Cargo.toml b/pallets/inflation-rewards/Cargo.toml index 007d4210a..56f664e05 100644 --- a/pallets/inflation-rewards/Cargo.toml +++ b/pallets/inflation-rewards/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] @@ -32,30 +32,30 @@ sp-std = { workspace = true } [dev-dependencies] bounded-collections = { workspace = true } num-traits = { workspace = true } -pallet-balances = { workspace = true, features = ["std"] } +pallet-balances = { workspace = true, features = [ "std" ] } similar-asserts = { workspace = true } -sp-io = { workspace = true, features = ["std"] } +sp-io = { workspace = true, features = [ "std" ] } [features] -default = ["std"] +default = [ "std" ] std = [ - "bounded-collections/std", "dp-core/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "log/std", "nimbus-primitives/std", - "pallet-balances/std", "parity-scale-codec/std", "scale-info/std", "serde", - "serde?/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", "tp-traits/std", + "bounded-collections/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" ] runtime-benchmarks = [ "frame-benchmarking", @@ -65,12 +65,12 @@ runtime-benchmarks = [ "nimbus-primitives/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "nimbus-primitives/try-runtime", "pallet-balances/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/initializer/Cargo.toml b/pallets/initializer/Cargo.toml index 72637e052..bc0988fa4 100644 --- a/pallets/initializer/Cargo.toml +++ b/pallets/initializer/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-support = { workspace = true } frame-system = { workspace = true } @@ -22,21 +22,21 @@ sp-core = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "frame-support/std", "frame-system/std", "pallet-session/std", "parity-scale-codec/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", + "sp-core/std", + "sp-io/std" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-session/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/invulnerables/Cargo.toml b/pallets/invulnerables/Cargo.toml index 5f0889e95..786439449 100644 --- a/pallets/invulnerables/Cargo.toml +++ b/pallets/invulnerables/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] log = { workspace = true } parity-scale-codec = { workspace = true } rand = { workspace = true, optional = true } -scale-info = { workspace = true, features = ["derive"] } +scale-info = { workspace = true, features = [ "derive" ] } frame-support = { workspace = true } frame-system = { workspace = true } @@ -32,7 +32,7 @@ sp-core = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "frame-benchmarking/std", "frame-support/std", @@ -41,14 +41,14 @@ std = [ "pallet-balances/std", "pallet-session/std", "parity-scale-codec/std", - "rand?/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", - "sp-staking/std", "sp-std/std", "tp-traits/std", + "rand?/std", + "sp-core/std", + "sp-io/std", + "sp-staking/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -58,7 +58,7 @@ runtime-benchmarks = [ "rand", "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] try-runtime = [ @@ -66,5 +66,5 @@ try-runtime = [ "frame-system/try-runtime", "pallet-balances?/try-runtime", "pallet-session/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/pooled-staking/Cargo.toml b/pallets/pooled-staking/Cargo.toml index e55c3ff4b..d6f021ec0 100644 --- a/pallets/pooled-staking/Cargo.toml +++ b/pallets/pooled-staking/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] dp-core = { workspace = true } @@ -31,30 +31,30 @@ sp-std = { workspace = true } [dev-dependencies] num-traits = { workspace = true } -pallet-balances = { workspace = true, features = ["std"] } +pallet-balances = { workspace = true, features = [ "std" ] } similar-asserts = { workspace = true } -sp-io = { workspace = true, features = ["std"] } +sp-io = { workspace = true, features = [ "std" ] } [features] -default = ["std"] +default = [ "std" ] std = [ "dp-core/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "log/std", "nimbus-primitives/std", - "pallet-balances/std", "parity-scale-codec/std", "scale-info/std", "serde", - "serde?/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", "tp-maths/std", "tp-traits/std", + "log/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" ] runtime-benchmarks = [ "frame-benchmarking", @@ -65,12 +65,12 @@ runtime-benchmarks = [ "pallet-balances/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "tp-maths/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "nimbus-primitives/try-runtime", "pallet-balances/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/pooled-staking/src/mock.rs b/pallets/pooled-staking/src/mock.rs index edf9b4676..2bbab067b 100644 --- a/pallets/pooled-staking/src/mock.rs +++ b/pallets/pooled-staking/src/mock.rs @@ -424,7 +424,7 @@ pub(crate) fn events() -> Vec> { macro_rules! assert_last_event { ($event:expr) => { match &$event { - e => assert_eq!(*e, $crate::mock::last_event()), + e => assert_eq!(*e, crate::mock::last_event()), } }; } @@ -435,7 +435,7 @@ macro_rules! assert_last_event { macro_rules! assert_eq_events { ($events:expr) => { match &$events { - e => similar_asserts::assert_eq!(*e, $crate::mock::events()), + e => similar_asserts::assert_eq!(*e, crate::mock::events()), } }; } @@ -459,7 +459,7 @@ macro_rules! assert_eq_events { #[macro_export] macro_rules! assert_eq_last_events { ($events:expr) => { - $crate::assert_tail_eq!($events, $crate::mock::events()) + crate::assert_tail_eq!($events, crate::mock::events()) }; } @@ -488,10 +488,10 @@ macro_rules! assert_event_emitted { match &$event { e => { assert!( - $crate::mock::events().iter().find(|x| *x == e).is_some(), + crate::mock::events().iter().find(|x| *x == e).is_some(), "Event {:?} was not found in events: \n {:?}", e, - $crate::mock::events() + crate::mock::events() ); } } @@ -505,10 +505,10 @@ macro_rules! assert_event_not_emitted { match &$event { e => { assert!( - $crate::mock::events().iter().find(|x| *x == e).is_none(), + crate::mock::events().iter().find(|x| *x == e).is_none(), "Event {:?} was found in events: \n {:?}", e, - $crate::mock::events() + crate::mock::events() ); } } diff --git a/pallets/pooled-staking/src/tests/manual_rewards.rs b/pallets/pooled-staking/src/tests/manual_rewards.rs index 5998915ce..fe9737383 100644 --- a/pallets/pooled-staking/src/tests/manual_rewards.rs +++ b/pallets/pooled-staking/src/tests/manual_rewards.rs @@ -91,6 +91,7 @@ fn second_delegation_transfer_rewards() { request_amount: amount, expected_increase: amount, expected_manual_rewards: expected_rewards, + ..default() } .test::>(); diff --git a/pallets/pooled-staking/src/tests/mod.rs b/pallets/pooled-staking/src/tests/mod.rs index 1a3a78c80..668aabab3 100644 --- a/pallets/pooled-staking/src/tests/mod.rs +++ b/pallets/pooled-staking/src/tests/mod.rs @@ -51,10 +51,14 @@ pub(crate) fn operation_stake( at: u64, ) -> Balance { let operation_key = match pool { - TargetPool::AutoCompounding => { - PendingOperationKey::JoiningAutoCompounding { candidate, at } - } - TargetPool::ManualRewards => PendingOperationKey::JoiningManualRewards { candidate, at }, + TargetPool::AutoCompounding => PendingOperationKey::JoiningAutoCompounding { + candidate: candidate.clone(), + at, + }, + TargetPool::ManualRewards => PendingOperationKey::JoiningManualRewards { + candidate: candidate.clone(), + at, + }, }; let shares = PendingOperations::::get(&delegator, &operation_key); diff --git a/pallets/pooled-staking/src/tests/rewards.rs b/pallets/pooled-staking/src/tests/rewards.rs index 82eeab5e7..26b19ef6e 100644 --- a/pallets/pooled-staking/src/tests/rewards.rs +++ b/pallets/pooled-staking/src/tests/rewards.rs @@ -592,8 +592,8 @@ fn reward_distribution_is_transactional() { let request_time = ::JoiningRequestTimer::now(); assert_ok!(Staking::request_delegate( - RuntimeOrigin::signed(ACCOUNT_CANDIDATE_1), - ACCOUNT_CANDIDATE_1, + RuntimeOrigin::signed(ACCOUNT_CANDIDATE_1.into()), + ACCOUNT_CANDIDATE_1.into(), TargetPool::AutoCompounding, 1_000_000_000, )); @@ -604,18 +604,18 @@ fn reward_distribution_is_transactional() { } assert_ok!(Staking::execute_pending_operations( - RuntimeOrigin::signed(ACCOUNT_CANDIDATE_1), + RuntimeOrigin::signed(ACCOUNT_CANDIDATE_1.into()), vec![PendingOperationQuery { - delegator: ACCOUNT_CANDIDATE_1, + delegator: ACCOUNT_CANDIDATE_1.into(), operation: PendingOperationKey::JoiningAutoCompounding { - candidate: ACCOUNT_CANDIDATE_1, + candidate: ACCOUNT_CANDIDATE_1.into(), at: request_time }, }] )); let total_staked_before = - pools::AutoCompounding::::total_staked(&ACCOUNT_CANDIDATE_1); + pools::AutoCompounding::::total_staked(&ACCOUNT_CANDIDATE_1.into()); // Increase ED to make reward destribution fail when resolving // credit to Staking account. @@ -623,12 +623,12 @@ fn reward_distribution_is_transactional() { let rewards = Balances::issue(1_000_000_000); assert_err!( - Staking::distribute_rewards(ACCOUNT_CANDIDATE_1, rewards), + Staking::distribute_rewards(ACCOUNT_CANDIDATE_1.into(), rewards), DispatchError::NoProviders ); let total_staked_after = - pools::AutoCompounding::::total_staked(&ACCOUNT_CANDIDATE_1); + pools::AutoCompounding::::total_staked(&ACCOUNT_CANDIDATE_1.into()); assert_eq!( total_staked_before, total_staked_after, "distribution should be reverted" diff --git a/pallets/registrar/Cargo.toml b/pallets/registrar/Cargo.toml index 8d08d8307..0e482073d 100644 --- a/pallets/registrar/Cargo.toml +++ b/pallets/registrar/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } @@ -16,7 +16,7 @@ log = { workspace = true } pallet-configuration = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-std = { workspace = true } @@ -30,38 +30,38 @@ sp-io = { workspace = true } sp-runtime = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "log/std", "pallet-balances/std", "pallet-configuration/std", "parity-scale-codec/std", "scale-info/std", "serde/std", + "tp-container-chain-genesis-data/std", + "tp-traits/std", + "log/std", "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-std/std", - "tp-container-chain-genesis-data/std", - "tp-traits/std", + "sp-std/std" ] runtime-benchmarks = [ "frame-benchmarking", + "tp-traits/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-configuration/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-balances/try-runtime", "pallet-configuration/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/pallets/registrar/rpc/runtime-api/Cargo.toml b/pallets/registrar/rpc/runtime-api/Cargo.toml index 113961606..e5d6329c3 100644 --- a/pallets/registrar/rpc/runtime-api/Cargo.toml +++ b/pallets/registrar/rpc/runtime-api/Cargo.toml @@ -7,7 +7,7 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] frame-support = { workspace = true } pallet-registrar = { workspace = true } @@ -17,12 +17,12 @@ sp-api = { workspace = true } tp-container-chain-genesis-data = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ - "frame-support/std", - "pallet-registrar/std", "parity-scale-codec/std", - "scale-info/std", "sp-api/std", "tp-container-chain-genesis-data/std", + "frame-support/std", + "pallet-registrar/std", + "scale-info/std" ] diff --git a/pallets/services-payment/Cargo.toml b/pallets/services-payment/Cargo.toml index b4110f267..b4ad13420 100644 --- a/pallets/services-payment/Cargo.toml +++ b/pallets/services-payment/Cargo.toml @@ -7,16 +7,16 @@ publish = false version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] cumulus-primitives-core = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } -serde = { workspace = true, optional = true, features = ["derive"] } +serde = { workspace = true, optional = true, features = [ "derive" ] } sp-runtime = { workspace = true } sp-std = { workspace = true } tp-traits = { workspace = true } @@ -27,35 +27,35 @@ sp-core = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "log/std", "pallet-balances/std", - "parity-scale-codec/std", "scale-info/std", + "sp-runtime/std", + "sp-std/std", + "log/std", + "parity-scale-codec/std", "serde?/std", "sp-core/std", "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "tp-traits/std", + "tp-traits/std" ] runtime-benchmarks = [ "frame-benchmarking", + "tp-traits/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "tp-traits/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", "frame-system/try-runtime", "pallet-balances/try-runtime", - "sp-runtime/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/primitives/author-noting-inherent/Cargo.toml b/primitives/author-noting-inherent/Cargo.toml index a0c220cbc..be82e6603 100644 --- a/primitives/author-noting-inherent/Cargo.toml +++ b/primitives/author-noting-inherent/Cargo.toml @@ -9,7 +9,7 @@ version = "0.1.0" async-trait = { workspace = true, optional = true } hex-literal = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] } +parity-scale-codec = { workspace = true, features = [ "derive", "max-encoded-len" ] } scale-info = { workspace = true } dp-core = { workspace = true, optional = true } @@ -40,26 +40,21 @@ polkadot-primitives = { workspace = true, optional = true } futures = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "async-trait", "cumulus-pallet-parachain-system/std", "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", "cumulus-relay-chain-interface", "cumulus-relay-chain-interface", "dp-core/std", "frame-support", - "frame-support?/std", - "log/std", "parity-scale-codec/std", "polkadot-primitives", - "polkadot-primitives?/std", "sc-client-api", "scale-info/std", "scale-info/std", "sp-api", - "sp-api?/std", "sp-consensus-aura", "sp-consensus-aura/std", "sp-core/std", @@ -69,7 +64,12 @@ std = [ "sp-state-machine/std", "sp-std/std", "sp-storage", - "sp-storage?/std", "sp-trie/std", "test-relay-sproof-builder/std", + "cumulus-primitives-parachain-inherent/std", + "frame-support?/std", + "log/std", + "polkadot-primitives?/std", + "sp-api?/std", + "sp-storage?/std" ] diff --git a/primitives/consensus/Cargo.toml b/primitives/consensus/Cargo.toml index 6a230c59d..08c7969a3 100644 --- a/primitives/consensus/Cargo.toml +++ b/primitives/consensus/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] cumulus-primitives-core = { workspace = true } frame-support = { workspace = true } @@ -28,18 +28,18 @@ sp-core = { workspace = true } sp-io = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-support/std", "frame-system/std", "nimbus-primitives/std", "parity-scale-codec/std", - "scale-info/std", "sp-api/std", "sp-consensus-aura/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-std/std", + "scale-info/std", + "sp-core/std", + "sp-io/std" ] diff --git a/primitives/container-chain-genesis-data/Cargo.toml b/primitives/container-chain-genesis-data/Cargo.toml index c16c4eafa..2ce02918d 100644 --- a/primitives/container-chain-genesis-data/Cargo.toml +++ b/primitives/container-chain-genesis-data/Cargo.toml @@ -7,13 +7,13 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] -hex = { workspace = true, optional = true, features = ["alloc"] } +hex = { workspace = true, optional = true, features = [ "alloc" ] } hex-literal = { workspace = true } log = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = [ "derive" ] } serde_json = { workspace = true, optional = true } tp-traits = { workspace = true } @@ -34,24 +34,24 @@ cumulus-primitives-core = { workspace = true, optional = true } polkadot-primitives = { workspace = true, optional = true } [features] -default = ["std"] +default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-support/std", - "hex?/std", - "log/std", "parity-scale-codec/std", "polkadot-primitives", - "polkadot-primitives?/std", - "scale-info/std", "serde/std", "serde/std", - "serde_json?/std", "sp-core/std", "sp-runtime/std", "sp-state-machine/std", "sp-std/std", "sp-trie/std", "tp-traits/std", + "hex?/std", + "log/std", + "polkadot-primitives?/std", + "scale-info/std", + "serde_json?/std" ] -json = ["hex", "serde_json"] +json = [ "hex", "serde_json" ] diff --git a/primitives/maths/Cargo.toml b/primitives/maths/Cargo.toml index 812bd07d9..ca56f6164 100644 --- a/primitives/maths/Cargo.toml +++ b/primitives/maths/Cargo.toml @@ -12,11 +12,11 @@ sp-runtime = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "sp-core/std", "sp-runtime/std", ] runtime-benchmarks = [ - "sp-runtime/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" ] diff --git a/primitives/traits/Cargo.toml b/primitives/traits/Cargo.toml index a46958716..b977e0d50 100644 --- a/primitives/traits/Cargo.toml +++ b/primitives/traits/Cargo.toml @@ -15,12 +15,12 @@ sp-std = { workspace = true } cumulus-primitives-core = { workspace = true } [features] -default = ["std"] +default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-support/std", - "sp-std/std", + "sp-std/std" ] runtime-benchmarks = [ - "frame-support/runtime-benchmarks", + "frame-support/runtime-benchmarks" ] diff --git a/runtime/dancebox/Cargo.toml b/runtime/dancebox/Cargo.toml index 54ae40292..7f6ae49c7 100644 --- a/runtime/dancebox/Cargo.toml +++ b/runtime/dancebox/Cargo.toml @@ -7,14 +7,14 @@ license = "GPL-3.0-only" version = "0.1.0" [package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] +targets = [ "x86_64-unknown-linux-gnu" ] [dependencies] hex-literal = { workspace = true } log = { workspace = true } -parity-scale-codec = { workspace = true, features = ["derive"] } -scale-info = { workspace = true, features = ["derive"] } -serde = { workspace = true, optional = true, features = ["derive"] } +parity-scale-codec = { workspace = true, features = [ "derive" ] } +scale-info = { workspace = true, features = [ "derive" ] } +serde = { workspace = true, optional = true, features = [ "derive" ] } smallvec = { workspace = true } # Own @@ -38,7 +38,7 @@ pallet-services-payment = { workspace = true } # Moonkit nimbus-primitives = { workspace = true } pallet-author-inherent = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } +pallet-maintenance-mode = { workspace = true, features = [ "xcm-support" ] } pallet-migrations = { workspace = true } xcm-primitives = { workspace = true } @@ -102,21 +102,21 @@ frame-system-benchmarking = { workspace = true, optional = true } frame-try-runtime = { workspace = true, optional = true } [dev-dependencies] -container-chain-template-frontier-runtime = { workspace = true, features = ["std"] } -container-chain-template-simple-runtime = { workspace = true, features = ["std"] } +container-chain-template-frontier-runtime = { workspace = true, features = [ "std" ] } +container-chain-template-simple-runtime = { workspace = true, features = [ "std" ] } cumulus-primitives-parachain-inherent = { workspace = true } cumulus-test-relay-sproof-builder = { workspace = true } -pallet-im-online = { workspace = true, features = ["std"] } +pallet-im-online = { workspace = true, features = [ "std" ] } pallet-message-queue = { workspace = true } -pallet-staking = { workspace = true, features = ["std"] } -polkadot-runtime-parachains = { workspace = true, features = ["std"] } +pallet-staking = { workspace = true, features = [ "std" ] } +polkadot-runtime-parachains = { workspace = true, features = [ "std" ] } polkadot-service = { workspace = true } sc-consensus-grandpa = { workspace = true } -sp-consensus-babe = { workspace = true, features = ["std"] } -sp-consensus-beefy = { workspace = true, features = ["std"] } +sp-consensus-babe = { workspace = true, features = [ "std" ] } +sp-consensus-beefy = { workspace = true, features = [ "std" ] } sp-io = { workspace = true } test-relay-sproof-builder = { workspace = true } -westend-runtime = { workspace = true, features = ["std"] } +westend-runtime = { workspace = true, features = [ "std" ] } westend-runtime-constants = { workspace = true } xcm-emulator = { workspace = true } @@ -128,152 +128,150 @@ default = [ "std", ] std = [ - "container-chain-template-frontier-runtime/std", - "container-chain-template-simple-runtime/std", "cumulus-pallet-dmp-queue/std", "cumulus-pallet-parachain-system/std", - "cumulus-pallet-session-benchmarking/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", "cumulus-primitives-core/std", - "cumulus-primitives-parachain-inherent/std", "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", - "cumulus-test-relay-sproof-builder/std", - "dp-core/std", - "frame-benchmarking?/std", "frame-executive/std", "frame-support/std", - "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", "frame-system/std", "frame-try-runtime/std", "log/std", "nimbus-primitives/std", - "pallet-author-inherent/std", "pallet-author-noting-runtime-api/std", "pallet-author-noting/std", "pallet-authority-assignment/std", - "pallet-authority-mapping/std", "pallet-balances/std", "pallet-collator-assignment-runtime-api/std", - "pallet-collator-assignment/std", "pallet-configuration/std", "pallet-data-preservers/std", - "pallet-im-online/std", "pallet-inflation-rewards/std", "pallet-initializer/std", "pallet-invulnerables/std", "pallet-maintenance-mode/std", - "pallet-message-queue/std", "pallet-migrations/std", - "pallet-pooled-staking/std", "pallet-proxy/std", "pallet-registrar-runtime-api/std", "pallet-registrar/std", - "pallet-root-testing/std", "pallet-services-payment/std", "pallet-session/std", - "pallet-staking/std", "pallet-sudo/std", "pallet-timestamp/std", "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-tx-pause/std", "pallet-utility/std", - "pallet-xcm-benchmarks?/std", + "pallet-tx-pause/std", "pallet-xcm/std", "parachain-info/std", "parity-scale-codec/std", "polkadot-parachain-primitives/std", "polkadot-runtime-common/std", - "polkadot-runtime-parachains/std", "scale-info/std", "serde", - "serde?/std", "sp-api/std", "sp-application-crypto/std", "sp-application-crypto/std", "sp-block-builder/std", "sp-consensus-aura/std", - "sp-consensus-babe/std", - "sp-consensus-beefy/std", "sp-core/std", - "sp-debug-derive/std", "sp-inherents/std", - "sp-io/std", "sp-offchain/std", "sp-runtime/std", - "sp-session/std", "sp-std/std", "sp-transaction-pool/std", - "sp-trie/std", "sp-version/std", "staging-xcm-builder/std", "staging-xcm-executor/std", "staging-xcm/std", - "test-relay-sproof-builder/std", "tp-author-noting-inherent/std", "tp-consensus/std", "tp-traits/std", - "westend-runtime-constants/std", - "westend-runtime/std", "xcm-primitives/std", + "container-chain-template-frontier-runtime/std", + "container-chain-template-simple-runtime/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-primitives-parachain-inherent/std", + "cumulus-test-relay-sproof-builder/std", + "dp-core/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-author-inherent/std", + "pallet-authority-mapping/std", + "pallet-collator-assignment/std", + "pallet-im-online/std", + "pallet-message-queue/std", + "pallet-pooled-staking/std", + "pallet-root-testing/std", + "pallet-staking/std", + "pallet-transaction-payment/std", + "pallet-xcm-benchmarks?/std", + "polkadot-runtime-parachains/std", + "serde?/std", + "sp-consensus-babe/std", + "sp-consensus-beefy/std", + "sp-debug-derive/std", + "sp-io/std", + "sp-session/std", + "sp-trie/std", + "test-relay-sproof-builder/std", + "westend-runtime/std", + "westend-runtime-constants/std" ] # Allow to print logs details (no wasm:stripped) -force-debug = ["sp-debug-derive/force-debug"] +force-debug = [ "sp-debug-derive/force-debug" ] runtime-benchmarks = [ - "container-chain-template-frontier-runtime/runtime-benchmarks", - "container-chain-template-simple-runtime/runtime-benchmarks", - "cumulus-pallet-parachain-system/runtime-benchmarks", "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system-benchmarking/runtime-benchmarks", "frame-system/runtime-benchmarks", - "nimbus-primitives/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", "pallet-author-noting/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-collator-assignment/runtime-benchmarks", "pallet-configuration/runtime-benchmarks", "pallet-data-preservers/runtime-benchmarks", + "pallet-invulnerables/runtime-benchmarks", + "pallet-pooled-staking/runtime-benchmarks", + "pallet-registrar/runtime-benchmarks", + "pallet-services-payment/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm-benchmarks/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "polkadot-service/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "staging-xcm-builder/runtime-benchmarks", + "westend-runtime/runtime-benchmarks", + "container-chain-template-frontier-runtime/runtime-benchmarks", + "container-chain-template-simple-runtime/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", "pallet-im-online/runtime-benchmarks", "pallet-inflation-rewards/runtime-benchmarks", - "pallet-invulnerables/runtime-benchmarks", "pallet-message-queue/runtime-benchmarks", "pallet-migrations/runtime-benchmarks", - "pallet-pooled-staking/runtime-benchmarks", "pallet-proxy/runtime-benchmarks", - "pallet-registrar/runtime-benchmarks", - "pallet-services-payment/runtime-benchmarks", "pallet-staking/runtime-benchmarks", "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", "pallet-tx-pause/runtime-benchmarks", "pallet-utility/runtime-benchmarks", - "pallet-xcm-benchmarks/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", - "polkadot-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "staging-xcm-builder/runtime-benchmarks", "staging-xcm-executor/runtime-benchmarks", "tp-traits/runtime-benchmarks", - "westend-runtime/runtime-benchmarks", - "xcm-primitives/runtime-benchmarks", -] + "xcm-primitives/runtime-benchmarks" + ] try-runtime = [ - "container-chain-template-frontier-runtime/try-runtime", - "container-chain-template-simple-runtime/try-runtime", "cumulus-pallet-dmp-queue/try-runtime", "cumulus-pallet-parachain-system/try-runtime", "cumulus-pallet-xcm/try-runtime", @@ -291,12 +289,10 @@ try-runtime = [ "pallet-collator-assignment/try-runtime", "pallet-configuration/try-runtime", "pallet-data-preservers/try-runtime", - "pallet-im-online/try-runtime", "pallet-inflation-rewards/try-runtime", "pallet-initializer/try-runtime", "pallet-invulnerables/try-runtime", "pallet-maintenance-mode/try-runtime", - "pallet-message-queue/try-runtime", "pallet-migrations/try-runtime", "pallet-pooled-staking/try-runtime", "pallet-proxy/try-runtime", @@ -304,19 +300,23 @@ try-runtime = [ "pallet-root-testing/try-runtime", "pallet-services-payment/try-runtime", "pallet-session/try-runtime", - "pallet-staking/try-runtime", "pallet-sudo/try-runtime", "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-tx-pause/try-runtime", "pallet-utility/try-runtime", + "pallet-tx-pause/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime", + "container-chain-template-frontier-runtime/try-runtime", + "container-chain-template-simple-runtime/try-runtime", + "pallet-im-online/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-staking/try-runtime", + "pallet-transaction-payment/try-runtime", "polkadot-runtime-parachains/try-runtime", "polkadot-service/try-runtime", - "sp-runtime/try-runtime", - "westend-runtime/try-runtime", + "westend-runtime/try-runtime" ] fast-runtime = [] diff --git a/runtime/dancebox/tests/common/mod.rs b/runtime/dancebox/tests/common/mod.rs index e198c1a55..5eb5738ef 100644 --- a/runtime/dancebox/tests/common/mod.rs +++ b/runtime/dancebox/tests/common/mod.rs @@ -383,7 +383,7 @@ pub fn get_aura_id_from_seed(seed: &str) -> NimbusId { } pub fn get_orchestrator_current_author() -> Option { - let slot: u64 = current_slot(); + let slot: u64 = current_slot().into(); let orchestrator_collators = Runtime::parachain_collators(ParachainInfo::get())?; let author_index = slot % orchestrator_collators.len() as u64; let account = orchestrator_collators.get(author_index as usize)?; diff --git a/runtime/dancebox/tests/common/xcm/foreign_sovereigns.rs b/runtime/dancebox/tests/common/xcm/foreign_sovereigns.rs index f41ebe9f9..1f4421157 100644 --- a/runtime/dancebox/tests/common/xcm/foreign_sovereigns.rs +++ b/runtime/dancebox/tests/common/xcm/foreign_sovereigns.rs @@ -71,7 +71,7 @@ fn using_sovereign_works_from_tanssi() { let sovereign_account = westend_runtime::xcm_config::LocationConverter::convert_location(&MultiLocation { parents: 0, - interior: X1(Parachain(2000u32)), + interior: X1(Parachain(2000u32.into())), }) .unwrap(); @@ -119,7 +119,7 @@ fn using_sovereign_works_from_tanssi() { success, .. }) => { - success: *success, + success: *success == true, }, ] ); @@ -177,7 +177,7 @@ fn using_sovereign_works_from_tanssi_frontier_template() { let sovereign_account = container_chain_template_frontier_runtime::xcm_config::LocationToAccountId::convert_location(&MultiLocation { parents: 1, - interior: X1(Parachain(2000u32)), + interior: X1(Parachain(2000u32.into())), }) .unwrap(); diff --git a/runtime/dancebox/tests/integration_test.rs b/runtime/dancebox/tests/integration_test.rs index d6c6b061e..6ea97cefe 100644 --- a/runtime/dancebox/tests/integration_test.rs +++ b/runtime/dancebox/tests/integration_test.rs @@ -3860,7 +3860,7 @@ fn test_migration_holds() { ::Balance, > = pallet_balances::IdAmount { id: *b"POOLSTAK", - amount: 100u128, + amount: 100u128.into(), }; let holds = vec![hold]; let bounded_holds = @@ -3914,7 +3914,7 @@ fn test_migration_holds_runtime_enum() { ::Balance, > = pallet_balances::IdAmount { id: OldHoldReason::PooledStake, - amount: 100u128, + amount: 100u128.into(), }; let holds = vec![hold]; let bounded_holds = diff --git a/toml-sort.toml b/toml-sort.toml new file mode 100644 index 000000000..fe030a7e3 --- /dev/null +++ b/toml-sort.toml @@ -0,0 +1,29 @@ +keys = [ + "workspace", + "name", + "package", + "bin", + "lib", + "test", + "dependencies", + "dev-dependencies", + "build-dependencies", + "features", + "default", + "std", +] + +inline_keys = [ + "package", + "workspace", + "path", + "git", + "branch", + "rev", + "version", + "default-features", + "optional", + "features", +] + +sort_string_arrays = true