ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

Usage of float operators in the future WASM Actors implementation

Open BlocksOnAChain opened this issue 2 years ago • 6 comments

Context: Good future question to resolve as we move closer to Wasm Acorst being on Mainnet - Will custom actors targeting Wasm be allowed to use float operators? We need to see if they will be "allowed", once WASM actors become available on Mainnet. Example from the industry - Cosmwasm, has some static analysis that blocks wasm contracts that contain float operators, which is a great feature to have.

Read more about it: https://filecoinproject.slack.com/archives/CRK2LKYHW/p1689371676829989?thread_ts=1689170374.514469&cid=CRK2LKYHW

BlocksOnAChain avatar Jul 31 '23 17:07 BlocksOnAChain

Part of https://github.com/filecoin-project/ref-fvm/issues/730

Stebalien avatar Jul 31 '23 17:07 Stebalien

Part of #1038?

Jacarte avatar Jul 31 '23 17:07 Jacarte

Ah, that too, yes. E_TOO_MANY_ISSUES.

Stebalien avatar Jul 31 '23 17:07 Stebalien

Including it then in the current MVP

Jacarte avatar Jul 31 '23 17:07 Jacarte

Uhmm, yet wasmtime has canonicalization of floats, at least for NaN, https://docs.wasmtime.dev/api/wasmtime/struct.Config.html#method.cranelift_nan_canonicalization

Jacarte avatar Jul 31 '23 18:07 Jacarte

Yes. That's the feature we plan on using.

Stebalien avatar Jul 31 '23 18:07 Stebalien