1

first I installed the substrate contract node from this command cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git from paritytech GitHub

I got too many errors while installing and errors were related to use std::sync:OnceLock

then installed the substrate contract node from ink docs cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked.

I got warnings while installing warning: Could not find `Cargo.lock` for `/Users/xyz/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/87a3d76/runtime/Cargo.toml`, while searching from `/var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/cargo-installMIxejX/release/build/contracts-node-runtime-cad7bb71042b6508/out`. To fix this, point the `WASM_BUILD_WORKSPACE_HINT` env variable to the directory of the workspace being compiled.

   Replacing /Users/xyz/.cargo/bin/substrate-contracts-node
    Replaced package `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` with `contracts-node v0.23.0 (https://github.com/paritytech/substrate-contracts-node.git?tag=v0.23.0#87a3d76c)` (executable `substrate-contracts-node`) 

then I ran ```substrate-contracts-node``` on my terminal, getting ```Error: Service(Client(VersionInvalid("cannot deserialize module: UnknownOpcode(192)")))```

INFO main sc_cli::runner: Substrate Contracts Node    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: ✌️  version 0.23.0-87a3d76c880    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: ❤️  by Parity Technologies <[email protected]>, 2021-2023    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: 📋 Chain specification: Development    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: 🏷  Node name: extra-small-art-3879    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: 👤 Role: AUTHORITY    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: 💾 Database: ParityDb at /var/folders/5k/5_v4gg194h1dh04gp2hg3qbm0000gn/T/substrate1tebHT/chains/dev/paritydb/full    
2023-08-15 13:49:37.552  INFO main sc_cli::runner: ⛓  Native runtime: substrate-contracts-node-100 (substrate-contracts-node-1.tx1.au1)    
Error: Service(Client(VersionInvalid("cannot deserialize module: UnknownOpcode(192)")))
2023-08-15 13:49:37.610  WARN main wasm-runtime: Cannot create a runtime error=Other("cannot deserialize module: UnknownOpcode(192)")

2 Answers 2

2

Regarding cannot deserialize module: UnknownOpcode(192). This kind of error is related to the toolchain usually, check Substrate-Node-Template does not start after cloning and renaming the template UnknownOpcode(192).

Regarding errors were related to use std::sync:OnceLock. In case it's something like that.

error[E0658]: use of unstable library feature 'once_cell'
   --> /home/user/.cargo/git/checkouts/substrate/client/executor/wasmtime/src/util.rs:147:6
    |
147 |     use std::sync::OnceLock;
    |         ^^^^^^^^^^^^^^^^^^^

That means it wants you to build it with unstable features support which are enabled for nightly toolchain releases. Make sure you went through https://docs.substrate.io/install/ to setup the right Rust toolchain. You may also to force cargo to use a nightly toolchain passing +nightly to cargo like that.

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git

More about unstable features: https://doc.rust-lang.org/cargo/reference/unstable.html.

1

Regarding

then installed the substrate contract node from ink docs cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked

this ink doc is outdated, as per https://substrate.stackexchange.com/a/10442/2540

you will find solution there which worked for me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.