Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant value dedup may delay circuit vkey convergence point for recursive aggregation #21

Open
lanbones opened this issue Jul 3, 2024 · 0 comments
Labels
wontfix This will not be worked on

Comments

@lanbones
Copy link
Collaborator

lanbones commented Jul 3, 2024

Currently, the aggregator circuits' vkey is convergent for recursive aggregation. (The vkey can be the same after the 2nd aggregation).
There is a corner case that may delay the convergent point when constant dedup is enabled. It is caused by different dedup positions (between the 2nd aggregation and 3rd aggregation), and results in the change of permutation and constant value hash size.
I won't fix it soon, because it is not a security bug and the circuit size would be slightly larger without dedup. But if anyone suffers from this issue, we can fix it by removing the dedup.

for (i, p) in self.const_points.iter().enumerate() {
if p == c {
pos = i;
}
}
if pos == self.const_points.len() {
self.const_points.push(*c);
}

for (i, s) in self.const_scalars.iter().enumerate() {
if s == x {
pos = i;
}
}
if pos == self.const_scalars.len() {
self.const_scalars.push(*x);
}

@lanbones lanbones added the wontfix This will not be worked on label Jul 3, 2024
@lanbones lanbones changed the title Constant dedup may break circuit vkey convergence for recursive aggregation Constant value dedup may delay circuit vkey convergence point for recursive aggregation Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant