Skip to content

Commit

Permalink
Fix public key aggregation (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea authored Mar 4, 2024
1 parent e2a495e commit 2affa66
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lightclient-circuits/config/sync_step_testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
},
"break_points": [
[
2097142,
2097142,
2097141,
2097141,
2097142,
2097140,
2097142,
2097140
2097141
]
]
}
5 changes: 4 additions & 1 deletion lightclient-circuits/src/sync_step_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,10 @@ impl<S: Spec, F: Field> StepCircuit<S, F> {
.copied()
.zip(assigned_pubkeys.iter_mut())
{
let sum = g1_chip.add_unequal(ctx, acc.clone(), point.clone(), true);
let is_equal = g1_chip.is_equal(ctx, acc.clone(), point.clone());
let add = g1_chip.add_unequal(ctx, acc.clone(), point.clone(), true);
let doub = g1_chip.double(ctx, acc.clone());
let sum = g1_chip.select(ctx, doub, add, is_equal);
acc = g1_chip.select(ctx, sum, acc, bit);
}
let agg_pubkey = g1_chip.sub_unequal(ctx, acc, rand_point, false);
Expand Down

0 comments on commit 2affa66

Please sign in to comment.