mirror of
https://github.com/arnaucube/sonobe.git
synced 2026-01-11 08:21:37 +01:00
Fix Nova multi-elements state (#73)
* Fix Nova multi-elements state In the AugmentedFCircuit the default value for the state when no input is provided was `vec![F::zero()]`, which defaults to length `1`. So when having more than 1 element in the state, before even starting to fold, the circuit was already already failing. Additionally this commit adds an example for a circuit with a state of 5 elements. * abstract 'nova_setup' helper to avoid code duplication in examples * update example naming to 'MultiInputs' * rename nova_setup -> test_nova_setup to make it more explicit
This commit is contained in:
@@ -310,10 +310,14 @@ where
|
||||
Ok(self.i.unwrap_or_else(CF1::<C1>::zero))
|
||||
})?;
|
||||
let z_0 = Vec::<FpVar<CF1<C1>>>::new_witness(cs.clone(), || {
|
||||
Ok(self.z_0.unwrap_or(vec![CF1::<C1>::zero()]))
|
||||
Ok(self
|
||||
.z_0
|
||||
.unwrap_or(vec![CF1::<C1>::zero(); self.F.state_len()]))
|
||||
})?;
|
||||
let z_i = Vec::<FpVar<CF1<C1>>>::new_witness(cs.clone(), || {
|
||||
Ok(self.z_i.unwrap_or(vec![CF1::<C1>::zero()]))
|
||||
Ok(self
|
||||
.z_i
|
||||
.unwrap_or(vec![CF1::<C1>::zero(); self.F.state_len()]))
|
||||
})?;
|
||||
|
||||
let u_dummy_native = CommittedInstance::<C1>::dummy(1);
|
||||
|
||||
Reference in New Issue
Block a user