From 68460f4c5361ac35a9986535a5793325e76dc257 Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 8 May 2024 14:07:53 +0200 Subject: [PATCH 01/13] feat: Add taplo CI `taplo lint` and `taplo format`, in that order, have been add on push and pull request into any branch. --- .github/workflows/taplo.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/taplo.yaml diff --git a/.github/workflows/taplo.yaml b/.github/workflows/taplo.yaml new file mode 100644 index 000000000..900eea7f2 --- /dev/null +++ b/.github/workflows/taplo.yaml @@ -0,0 +1,24 @@ +name: Taplo formatting and linting + +on: + [push, pull_request] + +jobs: + lint: + name: Lint Cargo.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: uncenter/setup-taplo@v1.0.8 + + - run: taplo lint --verbose + fmt: + name: Format Cargo.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: uncenter/setup-taplo@v1.0.8 + + - run: taplo format --check --verbose From a4574f1aadbd46d0a76f3299a6fdefb623cca5ac Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 8 May 2024 16:03:12 +0200 Subject: [PATCH 02/13] feat: Add taplo config file Add a configuration file for taplo so CI and local can use the same taplo rules. --- .taplo.toml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .taplo.toml diff --git a/.taplo.toml b/.taplo.toml new file mode 100644 index 000000000..f37a20722 --- /dev/null +++ b/.taplo.toml @@ -0,0 +1,6 @@ +[[rule]] +include = ["**/Cargo.toml"] + +[rule.formatting] +reorder_arrays = true +reorder_keys = true From 9acd287db900e43f2a3965aa8a5c8dca9dd9535d Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 8 May 2024 17:07:22 +0200 Subject: [PATCH 03/13] feat: Add path to taplo CI --- .github/workflows/taplo.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/taplo.yaml b/.github/workflows/taplo.yaml index 900eea7f2..fcb6e1b4e 100644 --- a/.github/workflows/taplo.yaml +++ b/.github/workflows/taplo.yaml @@ -1,7 +1,10 @@ name: Taplo formatting and linting on: - [push, pull_request] + push: + paths: "**/Cargo.toml" + pull_request: + paths: "**/Cargo.toml" jobs: lint: From 5f27fb6d1a58aef7343858c9b20518e28a8c8bda Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 8 May 2024 18:28:40 +0200 Subject: [PATCH 04/13] ci: Update taplo CI Switch from Action for taplo CI to manual install and running. Use only `taplo format` and remove `taplo lint` check. --- .github/workflows/taplo.yaml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/taplo.yaml b/.github/workflows/taplo.yaml index fcb6e1b4e..15cca0b01 100644 --- a/.github/workflows/taplo.yaml +++ b/.github/workflows/taplo.yaml @@ -1,4 +1,4 @@ -name: Taplo formatting and linting +name: Taplo formatting on: push: @@ -7,21 +7,17 @@ on: paths: "**/Cargo.toml" jobs: - lint: - name: Lint Cargo.toml + toml: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - uses: uncenter/setup-taplo@v1.0.8 - - - run: taplo lint --verbose - fmt: - name: Format Cargo.toml - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: uncenter/setup-taplo@v1.0.8 - - - run: taplo format --check --verbose + - uses: dtolnay/rust-toolchain@stable + - name: Install taplo + run: cargo install taplo-cli --lock + - name: Run taplo + run: taplo format --check --diff + - name: Taplo failure info + if: failure() + run: | + echo 'TOML is not formatted correctly' + echo 'Please run `taplo format`' From e7f4cdc89e4b7f26fc379918dac71a13f0cc17b2 Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:12:43 +0200 Subject: [PATCH 05/13] ci: Move taplo.yaml into ci.yaml --- .github/workflows/{taplo.yaml => ci.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{taplo.yaml => ci.yaml} (100%) diff --git a/.github/workflows/taplo.yaml b/.github/workflows/ci.yaml similarity index 100% rename from .github/workflows/taplo.yaml rename to .github/workflows/ci.yaml From 09f04ed8db27e95d06cc06e00e9dcdbc05bdca60 Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:13:36 +0200 Subject: [PATCH 06/13] ci: Change taplo rules --- .github/workflows/ci.yaml | 4 ++-- .taplo.toml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 15cca0b01..e40a0716e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,9 +2,9 @@ name: Taplo formatting on: push: - paths: "**/Cargo.toml" + paths: "**/*.toml" pull_request: - paths: "**/Cargo.toml" + paths: "**/*.toml" jobs: toml: diff --git a/.taplo.toml b/.taplo.toml index f37a20722..d5aa3c0ce 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,6 +1,7 @@ [[rule]] -include = ["**/Cargo.toml"] +include = ["**/*.toml"] [rule.formatting] reorder_arrays = true reorder_keys = true +column_width = 150 From efad80bdeacfb70a7cd4ed589e3adf4a9d40f47e Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:15:25 +0200 Subject: [PATCH 07/13] ci: Add cargo version for debugging --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e40a0716e..24af8a277 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - name: List cargo version + run: cargo --version - name: Install taplo run: cargo install taplo-cli --lock - name: Run taplo From c67305721e0a78117a5d80f12cf0338ce361e2ad Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:20:45 +0200 Subject: [PATCH 08/13] ci: Add taplo version for debugging --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 24af8a277..53b6d46e9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,9 @@ jobs: - name: List cargo version run: cargo --version - name: Install taplo - run: cargo install taplo-cli --lock + run: cargo install taplo-cli --locked + - name: List taplo version + run: taplo --version - name: Run taplo run: taplo format --check --diff - name: Taplo failure info From 49850e75a3665d73bd8243962cd0a02522a38b6e Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:29:00 +0200 Subject: [PATCH 09/13] ci: Add version for debugging --- .github/workflows/ci.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 53b6d46e9..9c15128b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,12 +12,14 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - - name: List cargo version - run: cargo --version - name: Install taplo run: cargo install taplo-cli --locked - - name: List taplo version - run: taplo --version + - name: List versions + run: | + cargo --version + cargo clippy --version + cargo fmt --version + taplo --version - name: Run taplo run: taplo format --check --diff - name: Taplo failure info From 930fd76eb4986ec4e8ab50d9413a9551e97606f5 Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 8 May 2024 20:31:17 +0200 Subject: [PATCH 10/13] ci: Formatting --- .github/workflows/ci.yaml | 2 -- .taplo.toml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9c15128b8..5efc42936 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,8 +17,6 @@ jobs: - name: List versions run: | cargo --version - cargo clippy --version - cargo fmt --version taplo --version - name: Run taplo run: taplo format --check --diff diff --git a/.taplo.toml b/.taplo.toml index d5aa3c0ce..a5e91e369 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -2,6 +2,6 @@ include = ["**/*.toml"] [rule.formatting] +column_width = 150 reorder_arrays = true reorder_keys = true -column_width = 150 From 6f283ce5df8c7448f0cca8fb48024ee4770b9320 Mon Sep 17 00:00:00 2001 From: aidan Date: Thu, 9 May 2024 17:37:33 +0200 Subject: [PATCH 11/13] ci: Change workflow name --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5efc42936..0b3a5b267 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Taplo formatting +name: CI on: push: From b3e5721bbd60e3efff482d878032c312236a0623 Mon Sep 17 00:00:00 2001 From: aidan Date: Fri, 10 May 2024 11:22:40 +0200 Subject: [PATCH 12/13] ci: Remove path filtering --- .github/workflows/ci.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0b3a5b267..d469d9d49 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,6 @@ name: CI -on: - push: - paths: "**/*.toml" - pull_request: - paths: "**/*.toml" +on: [push, pull_request] jobs: toml: From de391177de1a6d7627eb5f681a57d34ed05c8e9c Mon Sep 17 00:00:00 2001 From: aidan Date: Wed, 15 May 2024 11:28:28 +0200 Subject: [PATCH 13/13] style: Run taplo format --- Cargo.toml | 104 +++++++++++----------- node/Cargo.toml | 48 +++++------ runtime/Cargo.toml | 210 ++++++++++++++++++++++----------------------- 3 files changed, 176 insertions(+), 186 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d19222c79..ddd0aee99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [workspace.package] +authors = ["Eiger Oy "] edition = "2021" -repository = "https://github.com/eigerco/polka-storage" homepage = "https://eiger.co" -authors = ["Eiger Oy "] license-file = "LICENSE" +repository = "https://github.com/eigerco/polka-storage" [workspace] -resolver = "2" members = ["node", "runtime"] +resolver = "2" # FIXME(#@jmg-duarte,#7,14/5/24): remove the patch once something >1.11.0 is released [patch.'https://github.com/paritytech/litep2p'] @@ -18,27 +18,27 @@ litep2p = "0.3.0" substrate-build-script-utils = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } substrate-wasm-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -scale-info = { version = "2.11.1", default-features = false } +clap = { version = "4.5.3" } +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } +color-print = "0.3.4" +futures = "0.3.28" +hex-literal = { version = "0.4.1" } +jsonrpsee = { version = "0.22" } +log = { version = "0.4.21", default-features = false } polkavm = "0.9.3" -polkavm-linker = "0.9.2" polkavm-derive = "0.9.1" -log = { version = "0.4.21", default-features = false } +polkavm-linker = "0.9.2" quote = { version = "1.0.33" } +scale-info = { version = "2.11.1", default-features = false } serde = { version = "1.0.197", default-features = false } serde-big-array = { version = "0.3.2" } serde_derive = { version = "1.0.117" } serde_json = { version = "1.0.114", default-features = false } serde_yaml = { version = "0.9" } +smallvec = "1.11.0" syn = { version = "2.0.53" } thiserror = { version = "1.0.48" } tracing-subscriber = { version = "0.3.18" } -jsonrpsee = { version = "0.22" } -clap = { version = "4.5.3" } -futures = "0.3.28" -codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false } -hex-literal = { version = "0.4.1" } -smallvec = "1.11.0" -color-print = "0.3.4" # Local polka-storage-runtime = { path = "runtime" } @@ -49,11 +49,11 @@ sc-basic-authorship = { git = "https://github.com/paritytech/polkadot-sdk", tag sc-chain-spec = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-consensus = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-executor = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-network = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-network-sync = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +sc-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-rpc = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sc-sysinfo = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } @@ -66,27 +66,25 @@ sp-block-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = " sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sp-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } sp-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sp-genesis-builder = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } sp-inherents = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +sp-io = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sp-offchain = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } sp-session = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } sp-std = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } sp-version = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } # Polkadot -polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", features = [ - "rococo-native", -] } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", features = ["rococo-native"] } polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } @@ -94,13 +92,13 @@ xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/par # Substrate / FRAME frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } frame-executive = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } frame-support = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } frame-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } frame-system-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } frame-try-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } # FRAME Pallets pallet-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } @@ -115,53 +113,53 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt # Cumulus -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false, features = [ - "parameterized-consensus-hook", -] } -cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } -parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } cumulus-client-cli = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } cumulus-client-collator = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } cumulus-client-consensus-aura = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } cumulus-client-consensus-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } cumulus-client-consensus-proposer = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } cumulus-client-service = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false, features = [ + "parameterized-consensus-hook", +] } +cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default_features = false } cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +cumulus-primitives-storage-weight-reclaim = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +cumulus-primitives-utility = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } cumulus-relay-chain-interface = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0" } +pallet-collator-selection = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +parachain-info = { package = "staging-parachain-info", git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } +parachains-common = { git = "https://github.com/paritytech/polkadot-sdk", tag = "polkadot-v1.11.0", default-features = false } [workspace.lints.rust] suspicious_double_ref_op = { level = "allow", priority = 2 } [workspace.lints.clippy] all = { level = "allow", priority = 0 } -correctness = { level = "warn", priority = 1 } +bind_instead_of_map = { level = "allow", priority = 2 } # stylistic +borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one complexity = { level = "warn", priority = 1 } +correctness = { level = "warn", priority = 1 } +default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic +derivable_impls = { level = "allow", priority = 2 } # false positives +eq_op = { level = "allow", priority = 2 } # In tests we test equality. +erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS +extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic +identity-op = { level = "allow", priority = 2 } # One case where we do 0 + if-same-then-else = { level = "allow", priority = 2 } -zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000 -type_complexity = { level = "allow", priority = 2 } # raison d'etre +needless-lifetimes = { level = "allow", priority = 2 } # generated code +needless_option_as_deref = { level = "allow", priority = 2 } # false positives nonminimal-bool = { level = "allow", priority = 2 } # maybe -borrowed-box = { level = "allow", priority = 2 } # Reasonable to fix this one +option-map-unit-fn = { level = "allow", priority = 2 } # stylistic +stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort too-many-arguments = { level = "allow", priority = 2 } # (Turning this on would lead to) -needless-lifetimes = { level = "allow", priority = 2 } # generated code +type_complexity = { level = "allow", priority = 2 } # raison d'etre +unit_arg = { level = "allow", priority = 2 } # stylistic unnecessary_cast = { level = "allow", priority = 2 } # Types may change -identity-op = { level = "allow", priority = 2 } # One case where we do 0 + useless_conversion = { level = "allow", priority = 2 } # Types may change -unit_arg = { level = "allow", priority = 2 } # stylistic -option-map-unit-fn = { level = "allow", priority = 2 } # stylistic -bind_instead_of_map = { level = "allow", priority = 2 } # stylistic -erasing_op = { level = "allow", priority = 2 } # E.g. 0 * DOLLARS -eq_op = { level = "allow", priority = 2 } # In tests we test equality. while_immutable_condition = { level = "allow", priority = 2 } # false positives -needless_option_as_deref = { level = "allow", priority = 2 } # false positives -derivable_impls = { level = "allow", priority = 2 } # false positives -stable_sort_primitive = { level = "allow", priority = 2 } # prefer stable sort -extra-unused-type-parameters = { level = "allow", priority = 2 } # stylistic -default_constructed_unit_structs = { level = "allow", priority = 2 } # stylistic +zero-prefixed-literal = { level = "allow", priority = 2 } # 00_1000_000 diff --git a/node/Cargo.toml b/node/Cargo.toml index ca87a1c72..293d508a8 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -1,14 +1,14 @@ [package] -name = "polka-storage-node" +authors.workspace = true +build = "build.rs" description = "Polka Storage parachain collator." -version = "0.0.0" -license-file.workspace = true -homepage.workspace = true -repository.workspace = true edition.workspace = true -authors.workspace = true +homepage.workspace = true +license-file.workspace = true +name = "polka-storage-node" publish = false -build = "build.rs" +repository.workspace = true +version = "0.0.0" [lints] workspace = true @@ -18,11 +18,11 @@ name = "polka-storage-node" [dependencies] clap = { workspace = true, features = ["derive"] } -log = { workspace = true, default-features = true } codec = { workspace = true } -serde = { features = ["derive"], workspace = true, default-features = true } -jsonrpsee = { workspace = true, features = ["server"] } futures = { workspace = true } +jsonrpsee = { workspace = true, features = ["server"] } +log = { workspace = true, default-features = true } +serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } # Local @@ -36,11 +36,11 @@ sc-basic-authorship = { workspace = true } sc-chain-spec = { workspace = true } sc-cli = { workspace = true } sc-client-api = { workspace = true } -sc-offchain = { workspace = true } sc-consensus = { workspace = true } sc-executor = { workspace = true } sc-network = { workspace = true } sc-network-sync = { workspace = true } +sc-offchain = { workspace = true } sc-rpc = { workspace = true } sc-service = { workspace = true } sc-sysinfo = { workspace = true } @@ -53,8 +53,8 @@ sp-block-builder = { workspace = true } sp-blockchain = { workspace = true } sp-consensus-aura = { workspace = true } sp-core = { workspace = true } -sp-keystore = { workspace = true } sp-io = { workspace = true } +sp-keystore = { workspace = true } sp-runtime = { workspace = true } sp-timestamp = { workspace = true } substrate-frame-rpc-system = { workspace = true } @@ -66,6 +66,7 @@ polkadot-primitives = { workspace = true } xcm = { workspace = true, default-features = false } # Cumulus +color-print = { workspace = true } cumulus-client-cli = { workspace = true } cumulus-client-collator = { workspace = true } cumulus-client-consensus-aura = { workspace = true } @@ -75,7 +76,6 @@ cumulus-client-service = { workspace = true } cumulus-primitives-core = { workspace = true } cumulus-primitives-parachain-inherent = { workspace = true } cumulus-relay-chain-interface = { workspace = true } -color-print = { workspace = true } [build-dependencies] substrate-build-script-utils = { workspace = true } @@ -83,17 +83,13 @@ substrate-build-script-utils = { workspace = true } [features] default = [] runtime-benchmarks = [ - "cumulus-primitives-core/runtime-benchmarks", - "frame-benchmarking-cli/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "polka-storage-runtime/runtime-benchmarks", - "polkadot-cli/runtime-benchmarks", - "polkadot-primitives/runtime-benchmarks", - "sc-service/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", -] -try-runtime = [ - "polka-storage-runtime/try-runtime", - "polkadot-cli/try-runtime", - "sp-runtime/try-runtime", + "cumulus-primitives-core/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "polka-storage-runtime/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "sc-service/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", ] +try-runtime = ["polka-storage-runtime/try-runtime", "polkadot-cli/try-runtime", "sp-runtime/try-runtime"] diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index afbdcd11b..6e22ebd23 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "polka-storage-runtime" +authors.workspace = true description = "Polka Storage parachain runtime." -version = "0.0.0" -license-file.workspace = true -homepage.workspace = true -repository.workspace = true edition.workspace = true -authors.workspace = true +homepage.workspace = true +license-file.workspace = true +name = "polka-storage-runtime" publish = false +repository.workspace = true +version = "0.0.0" [lints] workspace = true @@ -19,12 +19,10 @@ targets = ["x86_64-unknown-linux-gnu"] substrate-wasm-builder = { workspace = true, optional = true } [dependencies] -log = { workspace = true } codec = { workspace = true, default-features = false, features = ["derive"] } hex-literal = { workspace = true, optional = true } -scale-info = { workspace = true, default-features = false, features = [ - "derive", -] } +log = { workspace = true } +scale-info = { workspace = true, default-features = false, features = ["derive"] } smallvec = { workspace = true } # Substrate / FRAME @@ -71,118 +69,116 @@ xcm-executor = { workspace = true, default-features = false } # Cumulus cumulus-pallet-aura-ext = { workspace = true, default-features = false } -cumulus-pallet-parachain-system = { workspace = true, default-features = false, features = [ - "parameterized-consensus-hook", -] } +cumulus-pallet-parachain-system = { workspace = true, default-features = false, features = ["parameterized-consensus-hook"] } cumulus-pallet-session-benchmarking = { workspace = true, default-features = false } cumulus-pallet-xcm = { workspace = true, default-features = false } cumulus-pallet-xcmp-queue = { workspace = true, default-features = false } cumulus-primitives-core = { workspace = true, default-features = false } -cumulus-primitives-utility = { workspace = true, default-features = false } cumulus-primitives-storage-weight-reclaim = { workspace = true, default-features = false } +cumulus-primitives-utility = { workspace = true, default-features = false } pallet-collator-selection = { workspace = true, default-features = false } -parachains-common = { workspace = true, default-features = false } parachain-info = { workspace = true, default-features = false } +parachains-common = { workspace = true, default-features = false } [features] default = ["std"] std = [ - "codec/std", - "cumulus-pallet-aura-ext/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-storage-weight-reclaim/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", - "log/std", - "pallet-aura/std", - "pallet-authorship/std", - "pallet-balances/std", - "pallet-collator-selection/std", - "pallet-message-queue/std", - "pallet-session/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-xcm/std", - "parachain-info/std", - "parachains-common/std", - "polkadot-parachain-primitives/std", - "polkadot-runtime-common/std", - "scale-info/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-aura/std", - "sp-core/std", - "sp-genesis-builder/std", - "sp-inherents/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "substrate-wasm-builder", - "xcm-builder/std", - "xcm-executor/std", - "xcm/std", + "codec/std", + "cumulus-pallet-aura-ext/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-storage-weight-reclaim/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", + "log/std", + "pallet-aura/std", + "pallet-authorship/std", + "pallet-balances/std", + "pallet-collator-selection/std", + "pallet-message-queue/std", + "pallet-session/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-xcm/std", + "parachain-info/std", + "parachains-common/std", + "polkadot-parachain-primitives/std", + "polkadot-runtime-common/std", + "scale-info/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-aura/std", + "sp-core/std", + "sp-genesis-builder/std", + "sp-inherents/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "substrate-wasm-builder", + "xcm-builder/std", + "xcm-executor/std", + "xcm/std", ] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "cumulus-pallet-session-benchmarking/runtime-benchmarks", - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "cumulus-primitives-core/runtime-benchmarks", - "cumulus-primitives-utility/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "pallet-balances/runtime-benchmarks", - "pallet-collator-selection/runtime-benchmarks", - "pallet-message-queue/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "parachains-common/runtime-benchmarks", - "polkadot-parachain-primitives/runtime-benchmarks", - "polkadot-runtime-common/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", - "xcm-executor/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-session-benchmarking/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "pallet-balances/runtime-benchmarks", + "pallet-collator-selection/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "parachains-common/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", + "xcm-executor/runtime-benchmarks", ] try-runtime = [ - "cumulus-pallet-aura-ext/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/try-runtime", - "pallet-aura/try-runtime", - "pallet-authorship/try-runtime", - "pallet-balances/try-runtime", - "pallet-collator-selection/try-runtime", - "pallet-message-queue/try-runtime", - "pallet-session/try-runtime", - "pallet-sudo/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-transaction-payment/try-runtime", - "pallet-xcm/try-runtime", - "parachain-info/try-runtime", - "polkadot-runtime-common/try-runtime", - "sp-runtime/try-runtime", + "cumulus-pallet-aura-ext/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/try-runtime", + "pallet-aura/try-runtime", + "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", + "pallet-collator-selection/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-session/try-runtime", + "pallet-sudo/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-xcm/try-runtime", + "parachain-info/try-runtime", + "polkadot-runtime-common/try-runtime", + "sp-runtime/try-runtime", ]