noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
878 stars 191 forks source link

Remove `Directive::ToLeRadix` #6302

Open TomAFrench opened 1 week ago

TomAFrench commented 1 week ago

We currently have a single variant of the directive opcode which we use for bit/byte decompositions.

If we perform the decomposition in a brillig function then we can remove this superfluous opcode (and solver) from the ACVM and just have it in the brillig VM.

TomAFrench commented 5 days ago

This would be implemented by writing a new brillig directive similar to those in https://github.com/noir-lang/noir/blob/master/compiler/noirc_evaluator/src/brillig/brillig_gen/brillig_directive.rs. We could then have the acir-gen code emit a call to this rather than a directive opcode.

Actual removal of the directive opcode would need to be done later in aztec-packages.