I have a test-suite that is based on sub-xt. This is also pulled in the suite as a dependency in cargo.toml as follows.
[dependencies]
subxt = { version = "0.37.0", git = "https://github.com/paritytech/subxt" }
I have installed subxt using the following command.
cargo install --version 0.37.0 subxt-cli
I have my node running and then I generate the encoded metadata and the compact.compressed.wasm. I run the test-suite using the command
cargo run
I get the following error during compilation.
error[E0308]: mismatched types
--> /home/rrr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sp-core-7.0.0/src/sr25519.rs:591:33
|
591 | let mini_key: MiniSecretKey = mini_secret_from_entropy(entropy, password.unwrap_or(""))
| _______________________-------------___^
| | |
| | expected due to this
592 | | .expect("32 bytes can always build a key; qed");
| |___________________________________________________________^ expected `MiniSecretKey`, found `schnorrkel::keys::MiniSecretKey`
|
= note: `schnorrkel::keys::MiniSecretKey` and `MiniSecretKey` have similar names, but are actually distinct types
note: `schnorrkel::keys::MiniSecretKey` is defined in crate `schnorrkel`
--> /home/rrr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/schnorrkel-0.11.4/src/keys.rs:99:1
|
99 | pub struct MiniSecretKey(pub (crate) [u8; MINI_SECRET_KEY_LENGTH]);
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: `MiniSecretKey` is defined in crate `schnorrkel`
--> /home/rrr/.cargo/registry/src/index.crates.io-6f17d22bba15001f/schnorrkel-0.9.1/src/keys.rs:99:1
|
99 | pub struct MiniSecretKey(pub (crate) [u8; MINI_SECRET_KEY_LENGTH]);
| ^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `schnorrkel` are being used?
My current active-tool chain is as follows.
nightly-2024-05-02-x86_64-unknown-linux-gnu (default)
rustc 1.80.0-nightly (c987ad527 2024-05-01)
while my node is using an older nightly toolchain
nightly-2022-10-09-x86_64-unknown-linux-gnu
rustc 1.66.0-nightly (8796e7a9c 2022-10-08)
How do I fix this to run the test-suite?