mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-11 10:13:09 +00:00
fixes, and new examples (fibonacci and square root)
This commit is contained in:
parent
9756e06db2
commit
38d6f98f87
@ -16,10 +16,8 @@ fn main() -> Result<()> {
|
||||
let pw = PartialWitness::new();
|
||||
let mut builder = CircuitBuilder::<F, D>::new(config);
|
||||
|
||||
let zero_target = builder.zero();
|
||||
let one_target = builder.one();
|
||||
let mut prev_target = zero_target;
|
||||
let mut cur_target = one_target;
|
||||
let mut prev_target = builder.zero();
|
||||
let mut cur_target = builder.one();
|
||||
for _ in 0..99 {
|
||||
let temp = builder.add(prev_target, cur_target);
|
||||
prev_target = cur_target;
|
||||
@ -36,7 +34,10 @@ fn main() -> Result<()> {
|
||||
|
||||
let proof = data.prove(pw)?;
|
||||
|
||||
println!("100th Fibonacci number is: {:?}", proof.public_inputs[0]);
|
||||
println!(
|
||||
"100th Fibonacci number (mod |F|) is: {}",
|
||||
proof.public_inputs[0]
|
||||
);
|
||||
|
||||
verify(proof, &data.verifier_only, &data.common)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user