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

serde_json uses floats that may be disallowed in WASM #850

Closed
Tracked by #882
tzemanovic opened this issue Sep 4, 2023 · 2 comments · Fixed by #894
Closed
Tracked by #882

serde_json uses floats that may be disallowed in WASM #850

tzemanovic opened this issue Sep 4, 2023 · 2 comments · Fixed by #894
Assignees
Labels
S: wasm Scope: support Wasm envs
Milestone

Comments

@tzemanovic
Copy link
Contributor

Bug Summary

In https://github.com/anoma/namada we're compiling an IBC transaction code to WASM and found that the usage of serde_json includes a number parses that uses floats even when floats are not being used (e.g. from fn send_transfer_execute from crates/ibc/src/applications/transfer/relay/send_transfer.rs). This is problematic for deterministic WASM execution in which floats are disabled. From this serde-rs/json#567 there's a fork that feature-gates floats at https://github.com/nearprotocol/json that can be used in place

@tzemanovic tzemanovic mentioned this issue Sep 4, 2023
2 tasks
@Farhad-Shabani
Copy link
Member

Thanks @tzemanovic for opening this issue.
There is a PR that should take care of this problem too. We place a higher priority on getting it done.

@github-project-automation github-project-automation bot moved this to 📥 To Do in ibc-rs Sep 5, 2023
@tzemanovic
Copy link
Contributor Author

that's great, thanks @Farhad-Shabani ! Using https://github.com/CosmWasm/serde-json-wasm looks like a good idea, I tried to use https://github.com/nearprotocol/json but I could still see some floats left in wasm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: wasm Scope: support Wasm envs
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants