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

Test for deployment of a contract that uses floats #402

Open
miloszm opened this issue Nov 7, 2024 · 0 comments
Open

Test for deployment of a contract that uses floats #402

miloszm opened this issue Nov 7, 2024 · 0 comments
Assignees

Comments

@miloszm
Copy link
Contributor

miloszm commented Nov 7, 2024

Summary

For contract compilation we use setting cranelift_nan_canonicalization which should make float-related instructions deterministic. This is done "just in case" as in general we should not allow float-related instructions in our contracts. Currently, we do not have a test that checks that we handle deployment of contracts with float-related instructions properly, i.e., we do not allow such contracts to be deployed.

Possible solution design or implementation

Add a counter contract which uses floating point number type and try to deploy it in a test. Test should make sure that such contract cannot be deployed and that deployment call fails with a proper error code.

Additional context

Note that we used to have such test in the previous VM, yet our current implementation is missing it. It needs to be re-introduced and adjusted to the current codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant