-
Notifications
You must be signed in to change notification settings - Fork 120
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
cargo-contract 3.1.0 emits sign_ext ops when using rustc 1.69. #1239
Comments
Interesting. Could you confirm this by cloning Also maybe @brson can confirm whether this is expected behaviour for |
Tried. There is no |
Thanks @kvinwang this is a bug we need to address. Because of this and other issues related to the toolchain e.g. #1240, we decided to yank This will be replaced shortly with a So currently users who want to use toolchains < We may want to make |
|
I followed the instructions and switched to using Rust <= 1.69 + pallet-contracts < polkadot-1.0.0 = cargo-contract 3.0.1. This fixes the issue with the wasm build, but now I am getting the error referenced in #1259:
Therefore I'm not sure if this is related to the present issue or not, I installed the contracts substrate node at v0.27.0 but the e2e test doesn't seem to be able to spin the node up. |
@dtr0x , the e2e test does not work after the 3.1.0 has been yanked. It needs to be updated also. |
@ascjones I have asked @kripken about this. I am not clear on what it means to enable / disable a feature. It might be the case that enabling a feature allows the optimizers to use that feature, which would result in sign extension ops where they didn't exist before. I do think I recall that binaryen features are not about "gating" or disallowing ops in the input modules, but I'm not sure. |
This is expected behavior for |
Note btw that
I think that might solve your issues here? It would remove any signext stuff that rustc emits that you don't want, and avoid adding any more during optimizations. To use it, enable the feature (so that a wasm with such instructions can load without failing validation) and then run the pass. |
Turning on signext lowering in the wasm_opt crate would look like:
This would seemingly get |
Cargo-contract says "
Build using a version lower than 1.70.0 to make sure your contract will deploy
".However, we have noticed that sign_ext operations appear in the wasm build with
cargo-contract-3.1.0+rustc-1.69
and there are no such problems when building withcargo-contract-3.0.1+rustc-1.69
.This might be due to #1189 enabling SignExt for wasm-opt, leading to the emission of sign_ext instructions even if Rustc didn't originally produce them.
Here is the contract.
The text was updated successfully, but these errors were encountered: