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

Implement the aggregation flow as in draft07 #409

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Conversation

cjpatton
Copy link
Contributor

@cjpatton cjpatton commented Oct 13, 2023

Stacked on #412.
Partially addresses #350.

In draft07, the Leader sends its prep share in the
AggregationJobInitReq; the Helper computes its prep share, computes the
prep message, and commits. For 1-round VDAFs, the flow is complete after
one request.

The main goal of this change is to implement this new control flow.
Other changes:

  • Clean up and unify data structures for aggregation job state.

  • Rename the aggregation_job_continue_repeats_due_to_replays metric
    (we need to do an analogous thing during AggregationJobInitReq
    processing).

  • Regression: Remove the handle_agg_job_req_init_expired_task tests.
    Ideally we'd like to keep these, but it's difficult to do so without
    major refactoring.

Work-in-progress: The code is not yet wire-compatible with draft07.

daphne/src/roles/helper.rs Outdated Show resolved Hide resolved
@cjpatton cjpatton force-pushed the cjpatton/dap07/6 branch 2 times, most recently from b37c805 to 4ed73a1 Compare October 16, 2023 15:36
@cjpatton cjpatton changed the base branch from main to cjpatton/try-put-agg-share-span October 16, 2023 15:38
@cjpatton cjpatton marked this pull request as ready for review October 16, 2023 17:09
daphne/src/messages/mod.rs Outdated Show resolved Hide resolved
daphne/src/roles/mod.rs Outdated Show resolved Hide resolved
@cjpatton cjpatton force-pushed the cjpatton/try-put-agg-share-span branch from f109916 to d0ac903 Compare October 19, 2023 18:05
@cjpatton cjpatton marked this pull request as draft October 19, 2023 18:28
@cjpatton cjpatton changed the base branch from cjpatton/try-put-agg-share-span to mendess/fix-do-consistency-issue October 19, 2023 21:10
(state, agg_job_init_req)
}
DapLeaderAggregationJobTransition::Finished(agg_span)
if agg_span.report_count() == 0 =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed Skip because it feels a bit redundant. But the fact that we need this if statement here makes me wonder if we really want an empty agg span to distinguish between these branches.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this if?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the agg span is empty, then we quite the agg job. Otherwise, if the agg span is non-empty, we send the next request for the agg job.

agg_span
} else {
return Ok(0);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment here.

daphne/src/roles/leader.rs Outdated Show resolved Hide resolved
@cjpatton cjpatton marked this pull request as ready for review October 19, 2023 21:36
@cjpatton cjpatton requested a review from mendess October 19, 2023 21:36
@mendess mendess force-pushed the mendess/fix-do-consistency-issue branch from 1094133 to 90de281 Compare October 25, 2023 16:51
daphne/src/vdaf/mod.rs Outdated Show resolved Hide resolved
daphne/src/vdaf/mod.rs Show resolved Hide resolved
daphne/src/vdaf/mod.rs Outdated Show resolved Hide resolved
Base automatically changed from mendess/fix-do-consistency-issue to main October 25, 2023 18:38
@cjpatton cjpatton force-pushed the cjpatton/dap07/6 branch 2 times, most recently from 2bfd1ae to a9f8971 Compare October 26, 2023 16:23
@cjpatton cjpatton requested a review from mendess October 26, 2023 22:46
In draft07, the Leader sends its prep share in the
AggregationJobInitReq; the Helper computes its prep share, computes the
prep message, and commits. For 1-round VDAFs, the flow is complete after
one request.

The main goal of this change is to implement this new control flow.
Other changes:

* Clean up and unify data structures for aggregation job state.

* Rename the `aggregation_job_continue_repeats_due_to_replays` metric
  (we need to do an analogous thing during AggregationJobInitReq
  processing).

* Regression: Remove the `handle_agg_job_req_init_expired_task` tests.
  Ideally we'd like to keep these, but it's difficult to do so without
  major refactoring.

* Ensure Leader handles an `Err` from `try_put_agg_share_span()` as
  fatal.

Work-in-progress: The code is not yet wire-compatible with draft07.
@cjpatton cjpatton merged commit 0a7076a into main Oct 27, 2023
4 checks passed
@cjpatton cjpatton deleted the cjpatton/dap07/6 branch October 27, 2023 15:25
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.

2 participants