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

Fix Helper aggregation-initialization report-replayed check. #3143

Merged
merged 2 commits into from
May 17, 2024

Conversation

branlwyd
Copy link
Member

Specifically, we now check only if the corresponding row exists in the client_reports table, rather than ignoring that fact and looking for a corresponding report_aggregations row. This means we no longer respect whether the other aggregation used a different aggregation parameter, but that's fine -- Janus now supports only a single aggregation per report.

This fixes a few bugs:

  • If the same report was repeatedly submitted in different aggregation jobs, the first instance would be aggregated; the second instance would be marked as a replay; and the third and further instances would result in an HTTP 500 error, as check_other_report_aggregation_exists mistakenly expected at most a single matching report_aggregations row to exist.
  • If the same report was submitted in more than one aggregation job concurrently, Janus would have aggregated both. This was a privacy bug.

Specifically, we now check only if the corresponding row exists in the
`client_reports` table, rather than ignoring that fact and looking for a
corresponding `report_aggregations` row. This means we no longer respect
whether the other aggregation used a different aggregation parameter,
but that's fine -- Janus now supports only a single aggregation per
report.

This fixes a few bugs:
* If the same report was repeatedly submitted in different aggregation
  jobs, the first instance would be aggregated; the second instance
  would be marked as a replay; and the third and further instances would
  result in an HTTP 500 error, as
  `check_other_report_aggregation_exists` mistakenly expected at most a
  single matching `report_aggregations` row to exist.
* If the same report was submitted in more than one aggregation job
  concurrently, Janus would have aggregated both. This was a privacy
  bug.
@branlwyd branlwyd requested a review from a team as a code owner May 17, 2024 20:44
@branlwyd
Copy link
Member Author

Closes #3142.

aggregator/src/aggregator.rs Outdated Show resolved Hide resolved
@branlwyd branlwyd enabled auto-merge (squash) May 17, 2024 21:05
@branlwyd branlwyd merged commit fba958f into main May 17, 2024
8 checks passed
@branlwyd branlwyd deleted the bran/agg-init-fix-replay-check branch May 17, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants