Skip to content

AS that does not use floats should not compile into Wasm that uses floats #732

@maxzaver

Description

@maxzaver

Floats cannot be used in Wasm contracts that are running on blockchains due to the non-determinism. The way to prevent it is to disallow Wasm that has floats, by inspecting it before execution. Unfortunately, in some cases AssemblyScript that does not use floats can compile to Wasm that uses floats, e.g. when formatting strings. Our blockchain uses both AssemblyScript and Rust for smart contracts and floats are causing significant issues for us because AssemblyScript prevents us from disabling floats. I think it is a high priority for AssemblyScript to fix it, since the blockchains constitute a very large user-base of AssemblyScript and Wasm.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions