Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastic aggregator and collector implementation #1107

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
6 changes: 5 additions & 1 deletion benches/speed_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ use prio::dp::distributions::DiscreteGaussian;
use prio::idpf::test_utils::generate_zipf_distributed_batch;
#[cfg(feature = "experimental")]
use prio::vdaf::prio2::Prio2;
#[cfg(feature = "experimental")]
use prio::vidpf::VidpfServerId;
use prio::{
benchmarked::*,
field::{random_vector, Field128 as F, FieldElement},
Expand Down Expand Up @@ -813,7 +815,9 @@ fn vidpf(c: &mut Criterion) {
let (public, keys) = vidpf.gen(&input, &weight, NONCE).unwrap();

b.iter(|| {
let _ = vidpf.eval(&keys[0], &public, &input, NONCE).unwrap();
let _ = vidpf
.eval(VidpfServerId::S0, &keys[0], &public, &input, NONCE)
.unwrap();
});
});
}
Expand Down
10 changes: 5 additions & 5 deletions src/bt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ type SubTree<V> = Option<Box<Node<V>>>;

/// Represents a node of a binary tree.
pub struct Node<V> {
value: V,
left: SubTree<V>,
right: SubTree<V>,
pub(crate) value: V,
pub(crate) left: SubTree<V>,
pub(crate) right: SubTree<V>,
}

impl<V> Node<V> {
fn new(value: V) -> Self {
pub(crate) fn new(value: V) -> Self {
Self {
value,
left: None,
Expand Down Expand Up @@ -181,7 +181,7 @@ impl<V> Node<V> {

/// Represents an append-only binary tree.
pub struct BinaryTree<V> {
root: SubTree<V>,
pub(crate) root: SubTree<V>,
}

impl<V> BinaryTree<V> {
Expand Down
Loading