reimplement sqrt
and isqrt
in pure vyper and remove them from builtins
#4515
Labels
release - must
release blocker
Milestone
Simple Summary
Move
sqrt
andisqrt
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
andisqrt
pure library functions.Backwards Compatibility
This is a breaking change, the builtins would have to be explicitly imported from the standard library.
The text was updated successfully, but these errors were encountered: