-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
wasm Compiled from TcpStream::connect
Cannot be Deserialized in Storing
#546
Comments
This is interesting because
means the .wasm file is broken (or at least incompatible to what the VM understand). Can you write down the exact steps build the .wasm file (please update rust-optimizer to 0.9.1 which ships a slightly updated Rust compiler)? |
This is happened with
When I use 0.9.1, it does not happen. However, It can be stored and when I execute |
When I use https://github.com/loloicci/cosmwasm-contract-net/tree/ureq |
It is very well possible that the missing system calls are compiled to panics or traps when the target architecture is Wasm. The Wasm sandbox does not provide access to system APIs that would cause undeterministic behaviour. There are no Wasm ops codes for such calls, so we cannot detect that statically. In this case, the primary problem is #501. Deserialization errors is a different story. This smells like a problem. |
Thank you. I did not know that. This sounds related to #530 . However, it looks there are some differences between #530 and this. |
I found that too large wasm binary causes the same error. (UnexpectedEof)
It may due to the size of the output wasm is too large. Does anyone know the maximum size wasmd can treat? This is maybe about 410KB as far as I tried. |
We discovertred recently that wasmd has a bug which truncates wasm blobs after 400 KB without an error message. See CosmWasm/wasmd#287. If your wasm was larger than that, this explains the
It will be fixed in wasmd. Can this issue be closed or is there anything else left? |
All of this is solved. Thank you! We can close this issue. |
wasm compiled from rust code including
TcpStream::connect
cannot be stored in the chain (this is as expected) and issues "Deserialization error".This error is caused when I try to store the wasm generated by https://github.com/loloicci/cosmwasm-contract-net.
This should be other errors like "Validation error with non-deterministic op-code".
The text was updated successfully, but these errors were encountered: