For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::protocol::utils::arrays

Function assert_trailing_zeros

pub fn assert_trailing_zeros<let N: u32>(input: [Field; N], in_len: u32)

Asserts that all fields in input after the first in_len fields are zero.

in_len must be a valid length, i.e. in_len <= N (in_len == N requires no trailing zeros). Passing in_len > N is rejected: otherwise the loop below never reaches the breakpoint and the trailing-zero check is silently skipped, letting a caller believe the array holds more meaningful elements than it can.