linera-protocol icon indicating copy to clipboard operation
linera-protocol copied to clipboard

Applications don't load with Rust 1.87 or later

Open Twey opened this issue 2 months ago • 1 comments

Starting from toolchain 1.87 upwards the resulting Wasm is not compatible with the network. It throws the following error when trying to create the instance of the contract:

2025-10-06T15:52:25.971095Z  INFO linera::main: linera_client::client_context: Module published successfully!
2025-10-06T15:52:25.971144Z  INFO linera::main: linera_client::client_context: Synchronizing client and processing inbox
2025-10-06T15:52:26.244197Z  INFO linera::main: linera_core::client: Received 0 certificates from 8 validator(s).
2025-10-06T15:52:26.614261Z ERROR linera: Error is Failed to create application

Caused by:
    chain client error: Local node operation failed: Worker operation failed: Execution error: Invalid Wasm module: Unknown opcode 252 during Operation(0)

You can see it publishes just fine and fails later – which is not ideal.To fix this, the rust toolchain used has to be 1.86 at most. Anything after that seems to produce a Wasm code that contains the disallowed "memory bulk" operation.

Twey avatar Oct 06 '25 17:10 Twey

Once this is done, we can revert #4894.

afck avatar Nov 03 '25 11:11 afck