Open weikengchen opened 3 years ago
The current implementation of addmany has a number of bounds:
addmany
https://github.com/arkworks-rs/r1cs-std/blob/master/src/bits/uint.rs#L184
// Make some arbitrary bounds for ourselves to avoid overflows // in the scalar field assert!(F::Params::MODULUS_BITS >= 2 * $size);
assert!($size * operands.len() <= F::Params::MODULUS_BITS as usize);
However, these bounds seem to be too strict. This part of the code is supposed for additions. And the bounds here seem for multiplication.
Hmm so it should $size + operands.len()?
$size + operands.len()
or $size + log2(operands.len() + 1)?
$size + log2(operands.len() + 1)
why the + 1?
+ 1
The current implementation of
addmany
has a number of bounds:https://github.com/arkworks-rs/r1cs-std/blob/master/src/bits/uint.rs#L184
However, these bounds seem to be too strict. This part of the code is supposed for additions. And the bounds here seem for multiplication.