Description
openedon Nov 11, 2024
We use the stable
channel in our rust toolchain, which had CI automatically adopting 1.82.0 as soon as it was promoted. This came in with clippy changes that broke the build. On fixing those in #1188, we discovered that our Wasm actors were broken. It turns out that rustc 1.82.0 also upgraded LLVM to a version that enables reference-types by default when compiling to Wasm.
This led to a panic in our gas market tests due to us not enabling this reference-types in our Wasmtime engine, but I'm pretty confident all our tests actually calling actor code via the FVM are affected. In fact, the WAT of the chainmetadata and eam actors carries funcref
instructions. It just so happens that the gas market actor is the first one to be called by the
We have tried to disable reference-types by passing the -C target-features=-reference-types
flag to the compiler via rustflags, both inside the build script of actors and through a .cargo/config.toml
. We know the flag is picked up because the compiler spits out a warning that this is an unstable feature (despite us disabling it, and in theory being stable enough that LLVM uses it by default...)
After going around in circles for too long, we discovered that LTO apparently forces this feature on, so there's no way to disable it when LTO is enabled: rust-lang/rust#130604 Catch-22.
We have not had time to dig into why our actors generate this singular funcref; that will come next at some point.
Metadata
Assignees
Labels
Type
Projects
Status
Backlog
Activity