diff --git a/Cargo.lock b/Cargo.lock index 0b1a929edd3..f341586d2c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19010,6 +19010,7 @@ version = "0.10.1" dependencies = [ "assert_cmd", "clap", + "cumulus-primitives-proof-size-hostfunction", "env_logger", "frame-remote-externalities", "frame-support", diff --git a/Cargo.toml b/Cargo.toml index 12dcb4d05dc..4b222a5cf4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,7 @@ substrate-rpc-client = { version = "~0.33", git = "https://github.com/paritytech polkadot-primitives = { version = "~7.0", git = "https://github.com/paritytech/polkadot-sdk", rev = "e1c5425b23f1" } cumulus-primitives-parachain-inherent = { version = "~0.7", git = "https://github.com/paritytech/polkadot-sdk", rev = "e1c5425b23f1" } cumulus-primitives-core = { version = "~0.7", git = "https://github.com/paritytech/polkadot-sdk", rev = "e1c5425b23f1" } +cumulus-primitives-proof-size-hostfunction = { version = "~0.2", git = "https://github.com/paritytech/polkadot-sdk", rev = "e1c5425b23f1" } cumulus-client-parachain-inherent = { version = "~0.1", git = "https://github.com/paritytech/polkadot-sdk", rev = "e1c5425b23f1" } # Local diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 25e5ca5caa5..cf4608cf396 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -22,6 +22,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["full"] } sp-io = { workspace = true } +cumulus-primitives-proof-size-hostfunction = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } sp-state-machine = { workspace = true } diff --git a/cli/main.rs b/cli/main.rs index f0fbde3c6d0..45ee153b8e7 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -360,7 +360,15 @@ async fn main() { init_env(); let cmd = TryRuntime::parse(); - cmd.run::, OpaqueExtrinsic>, sp_io::SubstrateHostFunctions>() - .await - .unwrap(); + // The cumulus `storage_proof_size` host function must be registered in addition to the + // substrate ones: runtimes built with `cumulus-pallet-weight-reclaim` (all current system + // chains) call it during the dispatch of every signed extrinsic, and block execution traps + // with "call to a missing function" if it is absent. Without proof recording (the case + // here) it returns `u64::MAX`, which weight-reclaim interprets as "recording disabled". + cmd.run::, OpaqueExtrinsic>, ( + sp_io::SubstrateHostFunctions, + cumulus_primitives_proof_size_hostfunction::storage_proof_size::HostFunctions, + )>() + .await + .unwrap(); }