Open rozbb opened 3 years ago
Note that the more immediate reason for this error is simply that PathVar::new_variable
calls and_then()
on its argument, regardless of the value of mode
. But the bug remains even after fixing that behavior.
This is related to https://github.com/arkworks-rs/r1cs-std/issues/17. In the meanwhile, I would recommend allocating a "dummy" path of the appropriate (worst-case) length.
Currently, it's not possible to use
PathVar::new_witness
for a placeholderPathVar
in themerkle
module. The reason why is that it takes in aResult<Vec<T>, SynthesisError>
instead of something more likeVec<Option<T>>
, which is used in other sequence-like variables. The reason the latter is necessary is because the allocator needs to know how many variables to create.This is an issue and not a PR because I don't have any good ways off the top of my head to fix this. The workaround is pretty easy (just make an arbitrary
Path
of the appropriate length), but that doesn't fit with how the rest of the library works.