Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to rust 1.82.0 + wasmtime v26 + fvm v4.4 + builtin-actors #1198

Open
raulk opened this issue Nov 11, 2024 · 3 comments
Open

upgrade to rust 1.82.0 + wasmtime v26 + fvm v4.4 + builtin-actors #1198

raulk opened this issue Nov 11, 2024 · 3 comments

Comments

@raulk
Copy link
Contributor

raulk commented 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.

@raulk
Copy link
Contributor Author

raulk commented Nov 11, 2024

FYI -- our upstreams are super outdated:

@raulk raulk changed the title upgrade to rust 1.82.0 upgrade to rust 1.82.0 + wasmtime v26 + fvm v4.4 + builtin-actors Nov 11, 2024
raulk added a commit that referenced this issue Nov 11, 2024
@sanderpick
Copy link
Contributor

👍. related: #1179

@sanderpick
Copy link
Contributor

  • FVM v4.1 -> v4.4 (do not upgrade to v4.5 yet)

Hey @raulk, out of curiosity, why do you say we shouldn't upgrade to v4.5 yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants