Skip to content

Commit

Permalink
Rename prio_09 and prio_latest
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoyla committed Dec 15, 2024
1 parent 925c6a6 commit 032f242
Show file tree
Hide file tree
Showing 47 changed files with 115 additions and 115 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ mappable-rc = "0.1.1"
matchit = "0.7.3"
p256 = { version = "0.13.2", features = ["ecdsa-core", "ecdsa", "pem"] }
paste = "1.0.15"
prio_09 = { package = "prio", version = "0.16.7" }
prio_latest = { package = "prio", git = "https://github.com/divviup/libprio-rs.git", branch = "main" }
prio_draft09 = { package = "prio", version = "0.16.7" }
prio = { git = "https://github.com/divviup/libprio-rs.git", branch = "main" }
prometheus = "0.13.4"
rand = "0.8.5"
rayon = "1.10.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/dapf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ daphne = { path = "../daphne", features = ["report-generator", "prometheus"] }
daphne-service-utils = { path = "../daphne-service-utils", features = ["test-utils"] }
futures.workspace = true
hex.workspace = true
prio_latest.workspace = true
prio.workspace = true
prometheus.workspace = true
rand.workspace = true
reqwest = { workspace = true, features = ["json"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/dapf/src/functions/helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use daphne::{
DapVersion,
};
use daphne_service_utils::{bearer_token::BearerToken, http_headers};
use prio_latest::codec::{ParameterizedDecode as _, ParameterizedEncode as _};
use prio::codec::{ParameterizedDecode as _, ParameterizedEncode as _};
use reqwest::header;
use url::Url;

Expand Down
2 changes: 1 addition & 1 deletion crates/dapf/src/functions/hpke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{io::Cursor, path::Path};
use anyhow::{anyhow, Context as _};
use daphne::messages::{decode_base64url_vec, HpkeConfigList};
use daphne_service_utils::http_headers;
use prio_latest::codec::Decode as _;
use prio::codec::Decode as _;
use url::Url;
use webpki::{EndEntityCert, ECDSA_P256_SHA256};
use x509_parser::pem::Pem;
Expand Down
2 changes: 1 addition & 1 deletion crates/dapf/src/functions/leader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use daphne::{
DapVersion,
};
use daphne_service_utils::{bearer_token::BearerToken, http_headers};
use prio_latest::codec::{ParameterizedDecode as _, ParameterizedEncode as _};
use prio::codec::{ParameterizedDecode as _, ParameterizedEncode as _};
use rand::{thread_rng, Rng};
use reqwest::StatusCode;
use url::Url;
Expand Down
2 changes: 1 addition & 1 deletion crates/dapf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use daphne_service_utils::{
bearer_token::BearerToken,
test_route_types::{InternalTestAddTask, InternalTestVdaf},
};
use prio_latest::codec::{ParameterizedDecode, ParameterizedEncode};
use prio::codec::{ParameterizedDecode, ParameterizedEncode};
use rand::{thread_rng, Rng};
use serde::Serialize;
use std::{
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hex.workspace = true
http.workspace = true
mappable-rc.workspace = true
p256.workspace = true
prio_latest.workspace = true
prio.workspace = true
prometheus = { workspace = true, optional = true }
serde.workspace = true
serde_json.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/src/roles/leader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use daphne::{
};
use daphne_service_utils::http_headers;
use http::StatusCode;
use prio_latest::codec::ParameterizedEncode;
use prio::codec::ParameterizedEncode;
use tracing::{error, info};
use url::Url;

Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/src/roles/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mod test_utils {
bearer_token::BearerToken,
test_route_types::{InternalTestAddTask, InternalTestEndpointForTask},
};
use prio_latest::codec::Decode;
use prio::codec::Decode;
use std::num::NonZeroUsize;

use crate::storage_proxy_connection::kv;
Expand Down
4 changes: 2 additions & 2 deletions crates/daphne-server/src/router/extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use daphne::{
};
use daphne_service_utils::{bearer_token::BearerToken, http_headers};
use http::{header::CONTENT_TYPE, HeaderMap};
use prio_latest::codec::ParameterizedDecode;
use prio::codec::ParameterizedDecode;
use serde::Deserialize;

use crate::metrics;
Expand Down Expand Up @@ -370,7 +370,7 @@ mod test {

use super::{dap_sender::FROM_LEADER, resource_parsers, DecodeFromDapHttpBody};
use http::{header, StatusCode};
use prio_latest::codec::ParameterizedEncode;
use prio::codec::ParameterizedEncode;

const BEARER_TOKEN: &str = "test-token";

Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/src/router/leader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use daphne::{
roles::leader::{self, DapLeader},
DapError, DapVersion,
};
use prio_latest::codec::ParameterizedEncode;
use prio::codec::ParameterizedEncode;

use super::{
extractor::dap_sender::FROM_COLLECTOR, AxumDapResponse, DapRequestExtractor, DaphneService,
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/tests/e2e/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use daphne::{
};
use daphne_service_utils::http_headers;
use http::Method;
use prio_latest::codec::{Encode, ParameterizedDecode, ParameterizedEncode};
use prio::codec::{Encode, ParameterizedDecode, ParameterizedEncode};
use rand::prelude::*;
use serde::Deserialize;
use serde_json::json;
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne-server/tests/e2e/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use daphne::{
use daphne_service_utils::http_headers;
use futures::StreamExt;
use hpke_rs::{HpkePrivateKey, HpkePublicKey};
use prio_latest::codec::{Decode, Encode};
use prio::codec::{Decode, Encode};
use rand::prelude::*;
use serde::{Deserialize, Serialize};
use serde_json::json;
Expand Down
6 changes: 3 additions & 3 deletions crates/daphne-service-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ repository.workspace = true
[dependencies]
capnp = { workspace = true, optional = true }
daphne = { path = "../daphne", default-features = false }
prio_09 = { workspace = true, optional = true }
prio_latest = { workspace = true, optional = true }
prio_draft09 = { workspace = true, optional = true }
prio = { workspace = true, optional = true }
serde.workspace = true
url = { workspace = true, optional = true }

Expand All @@ -28,7 +28,7 @@ capnpc = { workspace = true, optional = true }

[features]
test-utils = ["dep:url", "daphne/prometheus", "daphne/test-utils"]
durable_requests = ["dep:capnp", "dep:capnpc", "dep:prio_09", "dep:prio_latest"]
durable_requests = ["dep:capnp", "dep:capnpc", "dep:prio_draft09", "dep:prio"]
experimental = ["daphne/experimental"]

[lints]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ use crate::{
};

use super::DurableRequestPayload;
use prio_09::{
field::{FieldElement as FieldElementDraft09, FieldError as FieldErrorDraft09},
vdaf::AggregateShare as AggregateShareDraft09,
};
use prio_latest::{
use prio::{
field::{FieldElement, FieldError},
vdaf::AggregateShare,
};
use prio_draft09::{
field::{FieldElement as FieldElementDraft09, FieldError as FieldErrorDraft09},
vdaf::AggregateShare as AggregateShareDraft09,
};

super::define_do_binding! {
const BINDING = "DAP_AGGREGATE_STORE";
Expand Down Expand Up @@ -284,19 +284,19 @@ pub enum AggregateStoreMergeResp {

#[cfg(test)]
mod test {
use prio_09::{
use prio::{
codec::Decode,
field::{Field128, Field64, FieldElement, FieldPrio2},
vdaf::AggregateShare,
};
use prio_draft09::{
codec::Decode as DecodeDraft09,
field::{
Field128 as Field128Draft09, Field64 as Field64Draft09,
FieldElement as FieldElementDraft09, FieldPrio2 as FieldPrio2Draft09,
},
vdaf::AggregateShare as AggregateShareDraft09,
};
use prio_latest::{
codec::Decode,
field::{Field128, Field64, FieldElement, FieldPrio2},
vdaf::AggregateShare,
};
use rand::{thread_rng, Rng};

use crate::durable_requests::bindings::DurableRequestPayloadExt;
Expand Down
4 changes: 2 additions & 2 deletions crates/daphne-worker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ getrandom = { workspace = true, features = ["js"] }
headers.workspace = true
hex.workspace = true
http.workspace = true
prio_09.workspace = true
prio_latest.workspace = true
prio_draft09.workspace = true
prio.workspace = true
prometheus.workspace = true
rand.workspace = true
serde-wasm-bindgen.workspace = true
Expand Down
8 changes: 4 additions & 4 deletions crates/daphne-worker/src/durable/aggregate_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ use daphne_service_utils::durable_requests::bindings::{
DurableMethod,
};

use prio_09::{
field::FieldElement as FieldElementDraft09, vdaf::AggregateShare as AggregateShareDraft09,
};
use prio_latest::{
use prio::{
codec::{Decode, Encode},
field::FieldElement,
vdaf::AggregateShare,
};
use prio_draft09::{
field::FieldElement as FieldElementDraft09, vdaf::AggregateShare as AggregateShareDraft09,
};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use worker::{
js_sys, wasm_bindgen::JsValue, Env, Error, Request, Response, Result, ScheduledTime, State,
Expand Down
8 changes: 4 additions & 4 deletions crates/daphne/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ hex.workspace = true
hpke-rs = { workspace = true, features = ["hazmat", "serialization"] }
hpke-rs-crypto.workspace = true
hpke-rs-rust-crypto.workspace = true
prio_09 = { workspace = true, features = ["experimental"] }
prio_latest = { workspace = true, features = ["experimental"] }
prio_draft09 = { workspace = true, features = ["experimental"] }
prio = { workspace = true, features = ["experimental"] }
prometheus = { workspace = true, optional = true }
rand.workspace = true
ring.workspace = true
Expand All @@ -43,8 +43,8 @@ criterion.workspace = true
deepsize.workspace = true
matchit.workspace = true
paste.workspace = true
prio_09 = { workspace = true, features = ["test-util"] }
prio_latest = { workspace = true, features = ["test-util"] }
prio_draft09 = { workspace = true, features = ["test-util"] }
prio = { workspace = true, features = ["test-util"] }
prometheus.workspace = true
rayon.workspace = true
regex.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/benches/pine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use daphne::pine::Pine;
use prio_09::{
use prio_draft09::{
field::random_vector,
flp::Type,
vdaf::{
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/benches/vdaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SPDX-License-Identifier: BSD-3-Clause

use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use prio_09::{
use prio_draft09::{
field::Field64,
flp::{
gadgets::{Mul, ParallelSum},
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/src/error/aborts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::{
messages::{AggregationJobId, ReportId, TaskId, TransitionFailure},
DapError, DapRequestMeta, DapVersion,
};
use prio_latest::codec::CodecError;
use prio::codec::CodecError;
use serde::{Deserialize, Serialize};

use super::FatalDapError;
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::fmt::{Debug, Display};

use crate::{messages::TransitionFailure, vdaf::VdafError};
pub use aborts::DapAbort;
use prio_latest::codec::CodecError;
use prio::codec::CodecError;

use self::aborts::ProblemDetails;

Expand Down
4 changes: 2 additions & 2 deletions crates/daphne/src/hpke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ pub mod info_and_aad {
messages::{encode_u32_bytes, encode_u32_prefixed, BatchSelector, ReportMetadata, TaskId},
DapAggregationParam, DapVersion,
};
use prio_latest::codec::{CodecError, Encode, ParameterizedEncode};
use prio::codec::{CodecError, Encode, ParameterizedEncode};

const CTX_INPUT_SHARE_DRAFT09: &[u8] = b"dap-09 input share";
const CTX_INPUT_SHARE_DRAFT13: &[u8] = b"dap-13 input share";
Expand Down Expand Up @@ -600,7 +600,7 @@ mod test {
use hpke_rs::{Hpke, HpkePrivateKey, HpkePublicKey, Mode};
use hpke_rs_crypto::types::{AeadAlgorithm, KdfAlgorithm, KemAlgorithm};
use hpke_rs_rust_crypto::HpkeRustCrypto as ImplHpkeCrypto;
use prio_latest::codec::{Encode, ParameterizedEncode};
use prio::codec::{Encode, ParameterizedEncode};
use rand::seq::IteratorRandom;

fn encrypt_roundtrip_x25519_hkdf_sha256(version: DapVersion) {
Expand Down
12 changes: 6 additions & 6 deletions crates/daphne/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ pub use error::DapError;
use error::FatalDapError;
use hpke::{HpkeConfig, HpkeKemId};
use messages::taskprov::TaskprovAdvertisement;
use prio::{
codec::{CodecError, Encode, ParameterizedDecode},
vdaf::Aggregatable as AggregatableTrait,
};
#[cfg(feature = "experimental")]
use prio_09::{codec::Decode, vdaf::poplar1::Poplar1AggregationParam};
use prio_09::{
use prio_draft09::{codec::Decode, vdaf::poplar1::Poplar1AggregationParam};
use prio_draft09::{
codec::{
CodecError as CodecErrorDraft09, Encode as EncodeDraft09,
ParameterizedDecode as ParameterizedDecodeDraft09,
},
vdaf::Aggregatable as AggregatableTraitDraft09,
};
use prio_latest::{
codec::{CodecError, Encode, ParameterizedDecode},
vdaf::Aggregatable as AggregatableTrait,
};
pub use protocol::aggregator::ReplayProtection;
use serde::{Deserialize, Serialize};
use std::{
Expand Down
4 changes: 2 additions & 2 deletions crates/daphne/src/messages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
};
use base64::engine::{general_purpose::URL_SAFE_NO_PAD, Engine};
use hpke_rs::HpkePublicKey;
use prio_latest::codec::{
use prio::codec::{
decode_u16_items, decode_u32_items, encode_u16_items, encode_u32_items, CodecError, Decode,
Encode, ParameterizedDecode, ParameterizedEncode,
};
Expand Down Expand Up @@ -1569,7 +1569,7 @@ mod test {

use crate::test_versions;
use hpke_rs::HpkePublicKey;
use prio_latest::codec::{Decode, ParameterizedDecode, ParameterizedEncode};
use prio::codec::{Decode, ParameterizedDecode, ParameterizedEncode};
use rand::prelude::*;

fn read_report(version: DapVersion) {
Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/src/messages/taskprov.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::messages::{
};
use crate::pine::PineParam;
use crate::{DapError, DapVersion};
use prio_latest::codec::{
use prio::codec::{
decode_u8_items, encode_u8_items, CodecError, Decode, Encode, ParameterizedDecode,
ParameterizedEncode,
};
Expand Down
4 changes: 2 additions & 2 deletions crates/daphne/src/pine/flp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use std::marker::PhantomData;

use prio_09::{
use prio_draft09::{
field::FftFriendlyFieldElement,
flp::{
gadgets::{Mul, ParallelSum, ParallelSumGadget, PolyEval},
Expand Down Expand Up @@ -617,7 +617,7 @@ fn range_checked<F: FftFriendlyFieldElement>(x: F, lower_bound: F, upper_bound:

#[cfg(test)]
mod tests {
use prio_09::{
use prio_draft09::{
field::{Field128, FieldElement, FieldElementWithInteger},
flp::{test_utils::FlpTest, Type},
vdaf::xof::XofTurboShake128,
Expand Down
4 changes: 2 additions & 2 deletions crates/daphne/src/pine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::marker::PhantomData;

use prio_09::{
use prio_draft09::{
field::{FftFriendlyFieldElement, Field128, Field64},
vdaf::{xof::XofTurboShake128, VdafError},
};
Expand Down Expand Up @@ -389,7 +389,7 @@ pub mod vdaf;

#[cfg(test)]
mod tests {
use prio_09::field::Field128;
use prio_draft09::field::Field128;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion crates/daphne/src/pine/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::iter;

use prio_09::{
use prio_draft09::{
codec::{CodecError, Decode, Encode, ParameterizedDecode},
field::FftFriendlyFieldElement,
flp::Type,
Expand Down
Loading

0 comments on commit 032f242

Please sign in to comment.