From 83afb44e58e4c6d64374af8bba581632a1221971 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 26 Jun 2024 15:07:28 +0100 Subject: [PATCH 1/3] Expose metadata-hash feature from polkadot crate --- polkadot/Cargo.toml | 5 +++++ polkadot/cli/Cargo.toml | 1 + polkadot/node/service/Cargo.toml | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index 512783de94806..2c30386536012 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -68,6 +68,11 @@ jemalloc-allocator = [ "polkadot-overseer/jemalloc-allocator", ] +# Generate the metadata hash needed for CheckMetadataHash +# in the builtin test runtimes (westend and rococo). +metadata-hash = [ + "polkadot-cli/metadata-hash" +] # Enables timeout-based tests supposed to be run only in CI environment as they may be flaky # when run locally depending on system load diff --git a/polkadot/cli/Cargo.toml b/polkadot/cli/Cargo.toml index 9dcdb44ab64f5..da37f6062c572 100644 --- a/polkadot/cli/Cargo.toml +++ b/polkadot/cli/Cargo.toml @@ -49,6 +49,7 @@ substrate-build-script-utils = { workspace = true, default-features = true } [features] default = ["cli", "db", "full-node"] db = ["polkadot-service/db"] +metadata-hash = ["polkadot-service/metadata-hash"] service = ["dep:polkadot-service"] cli = [ "clap", diff --git a/polkadot/node/service/Cargo.toml b/polkadot/node/service/Cargo.toml index f043bd0b89241..2acdb930cc7fd 100644 --- a/polkadot/node/service/Cargo.toml +++ b/polkadot/node/service/Cargo.toml @@ -201,6 +201,13 @@ rococo-native = [ "rococo-runtime-constants", ] +# Generate the metadata hash needed for CheckMetadataHash +# in the test runtimes. +metadata-hash = [ + "rococo-runtime?/metadata-hash", + "westend-runtime?/metadata-hash", +] + runtime-benchmarks = [ "frame-benchmarking-cli/runtime-benchmarks", "frame-benchmarking/runtime-benchmarks", From 7393fca22d1d0275c0725e1e7a9611ae87d8b09d Mon Sep 17 00:00:00 2001 From: James Wilson Date: Wed, 26 Jun 2024 17:38:12 +0100 Subject: [PATCH 2/3] Use latest scale-decode patch --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 537adb68792c6..b37ea04ea90c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18595,9 +18595,9 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b12ebca36cec2a3f983c46295b282b35e5f8496346fb859a8776dad5389e5389" +checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" dependencies = [ "derive_more", "parity-scale-codec", From c827d230b6eb1e682d17eba0746a6d6c10efc304 Mon Sep 17 00:00:00 2001 From: command-bot <> Date: Thu, 27 Jun 2024 08:31:29 +0000 Subject: [PATCH 3/3] ".git/.scripts/commands/fmt/fmt.sh" --- polkadot/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index 2c30386536012..3a939464868fe 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -71,7 +71,7 @@ jemalloc-allocator = [ # Generate the metadata hash needed for CheckMetadataHash # in the builtin test runtimes (westend and rococo). metadata-hash = [ - "polkadot-cli/metadata-hash" + "polkadot-cli/metadata-hash", ] # Enables timeout-based tests supposed to be run only in CI environment as they may be flaky