You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to wasmerio/wasmer#1409 we need to rollback Wasmer to older version. I am replacing some of Wasmer generated error with Unknown to avoid undoing too much code from this PR: #2505
After the following PR lands wasmerio/wasmer#1401 we would need to revisit error handling from Wasmer anyway. CC @fckt
### Testing
Ran near-evm test. CI passes.
When host function is called by Wasm program some arguments receive a different value than the one passed by the Wasm program.
This bug reproduces with the following Wasmer Rust crates:
and it does not reproduce with the following crates:
Steps to reproduce
Version 0.16.2
In Terminal 1:
a) This needs to be run once:
git clone https://github.com/nearprotocol/nearcore/ cd nearcore git checkout master_storage_write_log cargo build --package neard --bin near
b) This can be run multiple times
In Terminal 2:
Observe the console output in Terminal 1:
The fist line is printed by the Wasm program using
log_utf8
host function before callingstorage_write
host function, see: https://github.com/near/near-sdk-rs/blob/storage_write_log/near-sdk/src/environment/env.rs#L641The second line is printed by the
storage_write
host function right after it was called, see: https://github.com/nearprotocol/nearcore/blob/master_storage_write_log/runtime/near-vm-logic/src/logic.rs#L1879The arguments do not match.
Version 0.13.1
Now, in Terminal 1, instead of
git checkout master_storage_write_log
dogit checkout beta_storage_write_log
and run the rest of the commands.
Observe:
What changed? -- We are now using Wasmer 0.13.1 instead of 0.16.2
Expected behavior
Host receives exactly the same arguments that were passed by the guest program.
Actual behavior
Host receives different arguments than those passed by the guest program.
Versions
The text was updated successfully, but these errors were encountered: