RequestNetwork / near-contracts

MIT License
2 stars 4 forks source link

NEAR Contracts: Fix the integration tests #20

Open MantisClone opened 1 year ago

MantisClone commented 1 year ago

Problem

The integration tests fail on the main branch

status: Failure(Action #4: PrepareError: Error happened while deserializing the module.),
MantisClone commented 1 year ago

This error seems to indicate that we're using opcodes outside the wasm-core-1 specification

Source: https://github.com/near/nearcore/issues/8358#issuecomment-1383247423

MantisClone commented 1 year ago

https://github.com/near/nearcore/issues/8358#issuecomment-1721807289

I searched for ways to disable the sign-ext opcodes on the compiler and ran across this issue that seems to indicate that the option to disable sign-ext exists 👍 but that it's not working. 😢 https://github.com/rust-lang/rust/issues/109807

Thus, I will likely pursue the wasm-opt --signext-lowering approach.

MantisClone commented 12 months ago

This issue was "bandaid" fixed by https://github.com/RequestNetwork/near-contracts/pull/16 which downgrades to Rust 1.67 - thus avoiding the later versions where sign-ext opcodes are added by default.

This issue should remain open until we've found a long-term fix.