Skip to content

Commit

Permalink
TaskResponse::vdaf_verify_key, singular (#243)
Browse files Browse the repository at this point in the history
Update the `TaskResponse` message definition to catch up with the latest
Janus aggregator API.
  • Loading branch information
tgeoghegan authored Jun 28, 2023
1 parent 4e1537b commit 9fd5d03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/aggregator_api_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn get_task(conn: &mut Conn, (): ()) -> Json<TaskResponse> {
query_type: QueryType::TimeInterval,
vdaf: VdafInstance::Prio3Count,
role: Role::Leader,
vdaf_verify_keys: vec![repeat_with(alphanumeric).take(10).collect()],
vdaf_verify_key: repeat_with(alphanumeric).take(10).collect(),
max_batch_query_count: 100,
task_expiration: None,
report_expiry_age: None,
Expand Down Expand Up @@ -70,7 +70,7 @@ pub fn task_response(task_create: TaskCreate) -> TaskResponse {
query_type: task_create.query_type,
vdaf: task_create.vdaf,
role: task_create.role,
vdaf_verify_keys: vec![repeat_with(alphanumeric).take(10).collect()],
vdaf_verify_key: repeat_with(alphanumeric).take(10).collect(),
max_batch_query_count: task_create.max_batch_query_count,
task_expiration: task_create.task_expiration,
report_expiry_age: None,
Expand Down
6 changes: 2 additions & 4 deletions src/clients/aggregator_client/api_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pub struct TaskResponse {
pub query_type: QueryType,
pub vdaf: VdafInstance,
pub role: Role,
pub vdaf_verify_keys: Vec<String>,
pub vdaf_verify_key: String,
pub max_batch_query_count: u64,
pub task_expiration: Option<JanusTime>,
pub report_expiry_age: Option<JanusDuration>,
Expand Down Expand Up @@ -248,9 +248,7 @@ mod test {
}
},
"role": "Leader",
"vdaf_verify_keys": [
"dmRhZiB2ZXJpZnkga2V5IQ"
],
"vdaf_verify_key": "dmRhZiB2ZXJpZnkga2V5IQ",
"max_batch_query_count": 1,
"task_expiration": 9000000000,
"report_expiry_age": null,
Expand Down

0 comments on commit 9fd5d03

Please sign in to comment.