From 9fd5d03e593843cb55ecd2ef0add9aed88443bbd Mon Sep 17 00:00:00 2001 From: Tim Geoghegan Date: Tue, 27 Jun 2023 17:05:47 -0700 Subject: [PATCH] `TaskResponse::vdaf_verify_key`, singular (#243) Update the `TaskResponse` message definition to catch up with the latest Janus aggregator API. --- src/aggregator_api_mock.rs | 4 ++-- src/clients/aggregator_client/api_types.rs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/aggregator_api_mock.rs b/src/aggregator_api_mock.rs index 1ceb615d..8d597731 100644 --- a/src/aggregator_api_mock.rs +++ b/src/aggregator_api_mock.rs @@ -41,7 +41,7 @@ async fn get_task(conn: &mut Conn, (): ()) -> Json { 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, @@ -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, diff --git a/src/clients/aggregator_client/api_types.rs b/src/clients/aggregator_client/api_types.rs index 51f60aa9..ae7dcf8f 100644 --- a/src/clients/aggregator_client/api_types.rs +++ b/src/clients/aggregator_client/api_types.rs @@ -159,7 +159,7 @@ pub struct TaskResponse { pub query_type: QueryType, pub vdaf: VdafInstance, pub role: Role, - pub vdaf_verify_keys: Vec, + pub vdaf_verify_key: String, pub max_batch_query_count: u64, pub task_expiration: Option, pub report_expiry_age: Option, @@ -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,