Skip to content

Replace DAP task parameter flags with --task-config - #4799

Open
jcjones wants to merge 4 commits into
mainfrom
jcj/4713-task-config-blob
Open

Replace DAP task parameter flags with --task-config#4799
jcjones wants to merge 4 commits into
mainfrom
jcj/4713-task-config-blob

Conversation

@jcjones

@jcjones jcjones commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

--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.

This gets the collector, both CLI and the interop version.

Closes #4713.

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
jcjones marked this pull request as ready for review August 14, 2026 23:20
@jcjones
jcjones requested a review from a team as a code owner August 14, 2026 23:20
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.

Add --task-config <blob>?

1 participant