Replace DAP task parameter flags with --task-config - #4799
Open
jcjones wants to merge 4 commits into
Open
Conversation
The collector composed its TaskConfiguration from individual setters via build_task_configuration, which only re-emits task_interval. Decoding a provisioned TaskConfiguration and rebuilding it that way silently drops any extension this implementation does not model, so the AAD stops matching the aggregators' and every aggregate share fails to decrypt. Add CollectorBuilder::with_task_configuration, which stores the message verbatim, and collapse the six piecewise fields on Collector into it. The two paths are mutually exclusive; the parameters stated on both sides (leader_endpoint, time_precision, and the vdaf_config from from_configured_vdaf) are cross-checked rather than resolved by precedence.
Stores it in TaskState in place of the helper endpoint, min batch size, and batch config, and binds it verbatim. An unsupported VDAF is now rejected when the task is added rather than at the first collection. The AddTaskRequest JSON is unchanged: it is a cross-implementation contract from the interop test design draft.
--task-config takes the task's base64url TaskConfiguration and supplies the aggregator endpoints, time precision, batch configuration, and VDAF configuration, so the tool can reconstruct the AAD the aggregators bind. It is bound verbatim, replacing --leader, --time-precision, --vdaf, --length, and --max-measurement. The guard refusing aggregate share decryption is gone: run and poll-job now collect. The VDAF comes from the configuration via vdaf_dispatch!, which drops the local VdafType enum and its parameter-mismatch error path, and picks up Prio3SumVecField64MultiproofHmacSha256Aes128. The configuration states the batch mode while the command line selects the batch, so the two are cross-checked instead of clap's former unreachable!. Closes #4713.
…-checks The build-time checks against the task configuration are otherwise only exercised in their failing direction, so a wiring mistake would fail every real invocation while leaving the argument-parsing tests green.
jcjones
marked this pull request as ready for review
August 14, 2026 23:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--task-configtakes the task's base64url TaskConfiguration and supplies the aggregator endpoints, time precision, batch configuration, and VDAF configuration, so the tool can reconstruct the AAD the aggregators bind.This gets the collector, both CLI and the interop version.
Closes #4713.