diff --git a/.github/workflows/rust-checks.yaml b/.github/workflows/rust-checks.yaml index de2ea9cc053..bdac22a413a 100644 --- a/.github/workflows/rust-checks.yaml +++ b/.github/workflows/rust-checks.yaml @@ -32,7 +32,7 @@ jobs: with: version: "3.6.1" - name: cargo doc - run: RUSTFLAGS="-D warnings" cargo doc + run: RUSTFLAGS="-D warnings" cargo doc --locked lint: runs-on: ubuntu-latest diff --git a/Cargo.lock b/Cargo.lock index 536d22a2666..38d8276c9cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9705,9 +9705,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "snap" @@ -11673,12 +11673,10 @@ dependencies = [ "frame-support", "node-primitives", "parity-scale-codec", - "sc-executor", "sp-io", "sp-runtime", "sp-state-machine", "sp-storage 13.0.0 (git+https://github.com/paritytech/polkadot-sdk?branch=master)", - "staging-node-executor", "tokio", "try-runtime-core", ] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 8b65252d7e7..e9c74d60a8c 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -21,14 +21,11 @@ env_logger = { workspace = true } parity-scale-codec = { workspace = true, features = ["derive"] } tokio = { workspace = true, features = ["full"] } -sc-executor = { workspace = true } - sp-io = { workspace = true } sp-runtime = { workspace = true } sp-state-machine = { workspace = true } sp-storage = { workspace = true } -node-executor = { workspace = true } node-primitives = { workspace = true } try-runtime-core = { workspace = true } diff --git a/cli/main.rs b/cli/main.rs index 23e08b21c1c..1367a628e56 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -300,7 +300,6 @@ use std::env; use clap::Parser; -use node_executor::ExecutorDispatch; use node_primitives::Block; use try_runtime_core::commands::TryRuntime; @@ -315,12 +314,8 @@ fn init_env() { async fn main() { init_env(); - use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch}; let cmd = TryRuntime::parse(); - cmd.run::::ExtendHostFunctions, - >>() - .await - .unwrap(); + cmd.run::() + .await + .unwrap(); } diff --git a/core/src/lib.rs b/core/src/lib.rs index ebb9858f654..f43ecabbda8 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -74,6 +74,9 @@ pub(crate) fn build_executor(shared: &SharedParams) -> WasmExe )) .with_onchain_heap_alloc_strategy(heap_pages) .with_offchain_heap_alloc_strategy(heap_pages) + // There is not that much we can do if someone is using unknown host functions. + // They would need to fork the `cli` to add their custom host functions. + .with_allow_missing_host_functions(true) .build() } diff --git a/core/src/state.rs b/core/src/state.rs index d087c9c3934..516c6936342 100644 --- a/core/src/state.rs +++ b/core/src/state.rs @@ -127,11 +127,7 @@ impl LiveState { pub enum State { /// Use a state snapshot as the source of runtime state. Snap { - /// DEPRECATED: use `--path` instead. - #[arg(short, long)] - snapshot_path: Option, - - #[clap(short = 'p', long = "path")] + #[clap(short = 'p', long = "path", alias = "snapshot-path")] path: Option, }, @@ -168,22 +164,11 @@ impl State { ::Err: Debug, { let builder = match self { - State::Snap { - snapshot_path, - path, - } => { - // we allow both `--snapshot-path` and `--path` for now, but `--snapshot-path` is - // deprecated. - if snapshot_path.is_some() { - log::warn!( - target: LOG_TARGET, - "`--snapshot-path` is deprecated and will be removed some time after Jan 2024. Use `--path` instead." - ); - } - let path = snapshot_path + State::Snap { path } => { + let path = path .as_ref() - .or(path.as_ref()) .ok_or_else(|| "no snapshot path provided".to_string())?; + Builder::::new().mode(Mode::Offline(OfflineConfig { state_snapshot: SnapshotConfig::new(path), }))