noir icon indicating copy to clipboard operation
noir copied to clipboard

Brillig's `modulo_instruction` uses 254-bit integer multiplication

Open fcarreiro opened this issue 11 months ago • 1 comments

Aim

Transpile to AVM bytecode

Expected Behavior

Should avoid using u254 integer ops, use Field instead or some other trick

Bug

modulo_instruction uses 254-bit integer multiplication to implement to_radix. However, that will not be supported in the AVM. Discussed with @sirasistant.

To Reproduce

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Installation Method

None

Nargo Version

No response

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

fcarreiro avatar Mar 13 '24 12:03 fcarreiro

For the record, SUB is also used on 254 int

fcarreiro avatar Mar 13 '24 12:03 fcarreiro

fixed in https://github.com/AztecProtocol/aztec-packages/pull/5208

sirasistant avatar Mar 19 '24 09:03 sirasistant