From b97bbb8540a73cca8cbd5c8e315f1fa319dfbbb4 Mon Sep 17 00:00:00 2001 From: Christopher Patton Date: Wed, 29 Nov 2023 18:30:44 -0800 Subject: [PATCH] Fix out share -> agg share hack in AggregateStore --- Cargo.lock | 2 +- Cargo.toml | 2 +- daphne_worker/src/durable/aggregate_store.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5131e1416..05c9fd8e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1582,7 +1582,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prio" version = "0.15.3" -source = "git+https://github.com/divviup/libprio-rs?rev=4ca547f35ebedf36fce45108ff8a29e14d51d048#4ca547f35ebedf36fce45108ff8a29e14d51d048" +source = "git+https://github.com/divviup/libprio-rs?rev=f067f384df127bdbd5e35116bbf437e765238eb2#f067f384df127bdbd5e35116bbf437e765238eb2" dependencies = [ "aes 0.8.3", "byteorder", diff --git a/Cargo.toml b/Cargo.toml index 16e41a875..a831f7ae4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ hpke-rs-crypto = "=0.1.1" hpke-rs-rust-crypto = "=0.1.1" matchit = "0.7.3" paste = "1.0.14" -prio = { git = "https://github.com/divviup/libprio-rs", rev = "4ca547f35ebedf36fce45108ff8a29e14d51d048" } +prio = { git = "https://github.com/divviup/libprio-rs", rev = "f067f384df127bdbd5e35116bbf437e765238eb2" } prometheus = "0.13.3" rand = "0.8.5" rand_core = "0.6.4" diff --git a/daphne_worker/src/durable/aggregate_store.rs b/daphne_worker/src/durable/aggregate_store.rs index ea725ad34..681f21b63 100644 --- a/daphne_worker/src/durable/aggregate_store.rs +++ b/daphne_worker/src/durable/aggregate_store.rs @@ -16,7 +16,7 @@ use daphne::{ use prio::{ codec::{Decode, Encode}, field::FieldElement, - vdaf::{AggregateShare, OutputShare}, + vdaf::AggregateShare, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use tracing::Instrument; @@ -190,8 +190,7 @@ impl AggregateStore { .expect("string never fails to convert to JsValue"), ) })?; - // TODO(mendess): this an abuse of this API, this type should not be constructed this way. - Ok(AggregateShare::from(OutputShare::from(share))) + Ok(AggregateShare::from(share)) } let data = match kind {