-
-
Notifications
You must be signed in to change notification settings - Fork 887
reimplement sqrt and isqrt in pure vyper and remove them from builtins #4515
Copy link
Copy link
Closed
Labels
release - mustrelease blockerrelease blocker
Milestone
Description
Simple Summary
Move sqrt and isqrt builtins to pure Vyper so that they're implementation is easier to verify and remove complexity from the compiler codebase.
Motivation
Builtins are a major source of complexity in the compiler codebase and have caused many codegen bugs in the past (for example, see: GHSA-5jrj-52x8-m64h). Pure Vyper is more accessible for general audience and thus has higher chance of being further audited.
Additionally, sqrt is implemented via a special inlining mechanism which imposes the need to often handle it via special edge-cases (for example, see: #4219 (comment)).
Specification
We suggest making sqrt and isqrt pure library functions.
Backwards Compatibility
This is a breaking change, the builtins would have to be explicitly imported from the standard library.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
release - mustrelease blockerrelease blocker