From 099fe376178846893f60d85f5ba929ceaf4d70df Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 22 Oct 2024 19:28:18 +0200 Subject: [PATCH 1/3] chore(deps): bump frame-metadata from 16 to 17 --- Cargo.lock | 34 +++++++++++++++++++++++----------- Cargo.toml | 2 +- metadata/src/from_into/mod.rs | 3 +++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b77b2ebad7..d9a76ed27e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2996,7 +2996,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "055387e30382aec12f626c6d9086b7a7a08844f2a2074c14b415eef48237cff4" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "hex", "parity-scale-codec", "scale-decode 0.13.1", @@ -3065,6 +3065,18 @@ dependencies = [ "serde", ] +[[package]] +name = "frame-metadata" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "701bac17e9b55e0f95067c428ebcb46496587f08e8cf4ccc0fe5903bea10dbb8" +dependencies = [ + "cfg-if", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "frame-metadata-hash-extension" version = "0.6.0" @@ -3092,7 +3104,7 @@ dependencies = [ "bitflags 1.3.2", "docify", "environmental", - "frame-metadata", + "frame-metadata 16.0.0", "frame-support-procedural", "impl-trait-for-tuples", "k256", @@ -3368,7 +3380,7 @@ dependencies = [ name = "generate-custom-metadata" version = "0.37.0" dependencies = [ - "frame-metadata", + "frame-metadata 17.0.0", "parity-scale-codec", "scale-info", ] @@ -3935,7 +3947,7 @@ version = "0.37.0" dependencies = [ "assert_matches", "cfg_aliases", - "frame-metadata", + "frame-metadata 17.0.0", "futures", "hex", "parity-scale-codec", @@ -9898,7 +9910,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869" dependencies = [ - "frame-metadata", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", ] @@ -10535,7 +10547,7 @@ dependencies = [ "derive-where", "either", "finito", - "frame-metadata", + "frame-metadata 17.0.0", "futures", "getrandom", "hex", @@ -10575,7 +10587,7 @@ version = "0.37.0" dependencies = [ "clap", "color-eyre", - "frame-metadata", + "frame-metadata 17.0.0", "heck 0.5.0", "hex", "indoc", @@ -10602,7 +10614,7 @@ dependencies = [ name = "subxt-codegen" version = "0.37.0" dependencies = [ - "frame-metadata", + "frame-metadata 17.0.0", "getrandom", "heck 0.5.0", "hex", @@ -10628,7 +10640,7 @@ dependencies = [ "blake2", "derive-where", "frame-decode", - "frame-metadata", + "frame-metadata 17.0.0", "hashbrown 0.14.5", "hex", "impl-serde 0.5.0", @@ -10695,7 +10707,7 @@ dependencies = [ "bitvec", "criterion", "frame-decode", - "frame-metadata", + "frame-metadata 17.0.0", "hashbrown 0.14.5", "parity-scale-codec", "polkadot-sdk", @@ -11246,7 +11258,7 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" name = "ui-tests" version = "0.37.0" dependencies = [ - "frame-metadata", + "frame-metadata 17.0.0", "generate-custom-metadata", "hex", "parity-scale-codec", diff --git a/Cargo.toml b/Cargo.toml index 00e8e15cfe..b262ffc54c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,7 +77,7 @@ derive-where = "1.2.7" either = { version = "1.13.0", default-features = false } finito = { version = "0.1.0", default-features = false } frame-decode = { version = "0.4.0", default-features = false } -frame-metadata = { version = "16.0.0", default-features = false } +frame-metadata = { version = "17.0.0", default-features = false } futures = { version = "0.3.30", default-features = false, features = ["std"] } getrandom = { version = "0.2", default-features = false } hashbrown = "0.14.5" diff --git a/metadata/src/from_into/mod.rs b/metadata/src/from_into/mod.rs index 13bb2f40c2..0c34afe375 100644 --- a/metadata/src/from_into/mod.rs +++ b/metadata/src/from_into/mod.rs @@ -108,6 +108,9 @@ impl TryFrom for crate::Metadata { } frame_metadata::RuntimeMetadata::V14(m) => m.try_into(), frame_metadata::RuntimeMetadata::V15(m) => m.try_into(), + frame_metadata::RuntimeMetadata::V16(_opaque) => { + Err(TryFromError::UnsupportedMetadataVersion(16)) + } } } } From d8bae71648a555c2901bf7640e7239edf003b80c Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 23 Oct 2024 15:55:14 +0200 Subject: [PATCH 2/3] fix substrate test build --- .../integration-tests/src/full_client/runtime_api/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/integration-tests/src/full_client/runtime_api/mod.rs b/testing/integration-tests/src/full_client/runtime_api/mod.rs index a24dc73603..de816a9a70 100644 --- a/testing/integration-tests/src/full_client/runtime_api/mod.rs +++ b/testing/integration-tests/src/full_client/runtime_api/mod.rs @@ -93,10 +93,15 @@ async fn unchecked_extrinsic_encoding() -> Result<(), subxt::Error> { ) .await?; + let uxt = + test_runtime::node_runtime::runtime_types::pallet_revive::evm::runtime::UncheckedExtrinsic( + tx_bytes.into(), + ); + // Use the generated API to confirm the result with the raw call. let runtime_api_call = node_runtime::apis() .transaction_payment_api() - .query_fee_details(tx_bytes.into(), len); + .query_fee_details(uxt, len); let result = api .runtime_api() From 2da599fb6108cd711145fdcf1a1c730e9662ea63 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Wed, 23 Oct 2024 17:30:51 +0200 Subject: [PATCH 3/3] revert test fix --- .../integration-tests/src/full_client/runtime_api/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/testing/integration-tests/src/full_client/runtime_api/mod.rs b/testing/integration-tests/src/full_client/runtime_api/mod.rs index de816a9a70..a24dc73603 100644 --- a/testing/integration-tests/src/full_client/runtime_api/mod.rs +++ b/testing/integration-tests/src/full_client/runtime_api/mod.rs @@ -93,15 +93,10 @@ async fn unchecked_extrinsic_encoding() -> Result<(), subxt::Error> { ) .await?; - let uxt = - test_runtime::node_runtime::runtime_types::pallet_revive::evm::runtime::UncheckedExtrinsic( - tx_bytes.into(), - ); - // Use the generated API to confirm the result with the raw call. let runtime_api_call = node_runtime::apis() .transaction_payment_api() - .query_fee_details(uxt, len); + .query_fee_details(tx_bytes.into(), len); let result = api .runtime_api()