ljedrz

Results 241 comments of ljedrz

Nit: both cases are overflows. As for the vulnerability, I don't think it's possible with current snarkVM/OS code, but it's something that may need to be fixed with future users...

I don't see either of the listed methods used with user-supplied input (just `const` values): ``` fields/src/traits/poseidon_default.rs 60: ark.push(lfsr.get_field_elements_rejection_sampling(RATE + 1)?); 66: let _ = lfsr.get_field_elements_mod_p::(2 * (RATE + 1))?;...

That could work, provided that `bytes` is guaranteed to be shorter than some `N`; however, this would need to be tested, since we're talking about a _lot_ of potentially concurrent...

Ok, so I run some tests using `SmallVec`, and made the following observations: - the `N` for `from_bytes_le_mod_order` is actually `64` - the `N` for `from_bytes_be_mod_order` is `31` - while...

What about this? Including all the required changes in this diff, so all the adjustments are visible: ```diff diff --git a/console/types/field/src/lib.rs b/console/types/field/src/lib.rs index 5973b89fb..1b305aadb 100644 --- a/console/types/field/src/lib.rs +++ b/console/types/field/src/lib.rs @@...

Alternatively, `from_bytes_le_mod_order` _can_ be written in a way that doesn't require any mutation whatsoever (it would need to be tested, but I basically just changed the split point and swapped...

While I was doing some more profiling, `from_bytes_le_mod_order` popped up again; I forgot that I already proposed the above adjustment and quickly tried out a functionally identical one (omitting comments):...

I don't see it in my current memory profiles, but it's likely that it will pop up again under more organic workloads; in any case, the implementation hasn't changed, so...

If I understand correctly, we need to be able to roll back several operations, and I'm assuming that the rollbacks should still be doable even if the node is shut...

This is caused by a `debug_assert`, so it's more of a logic futureproofing safeguard than a security issue. @howardwu do we expect anyone besides the developers to build in debug...