-
Notifications
You must be signed in to change notification settings - Fork 15
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
integrating bounded l2 norm fixed point vector sum types. #893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks sound to me, but the Janus team is debating how we want to handle this. For one thing, we may want to gate this VDAF behind a feature (much as the fixed point implementation in libprio-rs
is gated behind feature experimental
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Tim mentioned, let's gate this with crate features, disabled by default. (Tests can enable the features in order to allow testing this functionality by default.)
collector/src/lib.rs
Outdated
@@ -822,7 +823,7 @@ mod tests { | |||
let collector = setup_collector(vdaf); | |||
|
|||
let batch_interval = Interval::new( | |||
Time::from_seconds_since_epoch(1_000_000), | |||
Time::from_seconds_since_epoch(2_000_000), // TODO why??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure offhand -- if you don't know why this change is necessary, I think it's OK to just drop the TODO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a test flake in this module yesterday, so it was probably random chance, unconnected to this timestamp. (I suspect we may be running into a backoff
timer we need to tweak, but I haven't had a chance to dig into it yet)
we are now hiding behind a feature.
we had to adjust the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we had to adjust the Dockerfile.interop and Dockerfile.interop_aggregator to enable the feature during tests. is that what you meant, or should we do something more?
I meant to modify the dependency in the dev-dependencies
so that it enables the new feature, allowing the relevant tests to not be gated by the feature & thus tested by cargo test
without additional flags. (My goal is to make a release binary not include these "experimental"/non-standardized VDAFs by default, but I think it is wise to test them by default.)
See
Line 98 in f8ad519
janus_aggregator = { workspace = true, features = ["kube-openssl", "test-util"] } |
Cargo.toml
-- there are a number of dev-dependencies
throughout the workspace that enable the test-util
feature.
@@ -998,6 +1000,73 @@ mod tests { | |||
mocked_collect_complete.assert(); | |||
} | |||
|
|||
#[tokio::test] | |||
#[cfg(feature = "fpvec_bounded_l2")] | |||
async fn successful_collect_prio3_fixedpoint_boundedl2_vec_sum() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test, for example, doesn't need to be gated by the feature if we enable the feature by default in tests.
interop_binaries/tests/end_to_end.rs
Outdated
@@ -656,6 +659,228 @@ async fn e2e_prio3_count_vec() { | |||
} | |||
} | |||
|
|||
#[tokio::test] | |||
#[cfg(feature = "fpvec_bounded_l2")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests also don't need to be gated by the feature if we enable the feature by default in tests.
I did this (and the other changes you suggested) in the latest commit. Is there another way of enabling the feature on the containers used in the interop end-to-end test except passing the feature flag to the build command in the |
collector/src/lib.rs
Outdated
@@ -822,7 +824,7 @@ mod tests { | |||
let collector = setup_collector(vdaf); | |||
|
|||
let batch_interval = Interval::new( | |||
Time::from_seconds_since_epoch(1_000_000), | |||
Time::from_seconds_since_epoch(2_000_000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change can be backed out, #916 properly fixes this test.
Enabling the features via flags in |
I merged the current main branch, as there were conflicting changes. Also squashed into one commit. Could you run the workflow again? :) |
the workflow cannot be run on forks because they have no access to your github secrets. there seems to be an event that gives them access: |
I ran the tests locally; I am OK merging with that level of testing. I would prefer not to enable running with secrets against forks; perhaps if you will be creating many PRs, we can flip the appropriate bits so that you can create a branch on the main repository, and then we can enable you to run CI directly. |
As discussed here, this PR enables using our prio3 type for aggregating vectors of fixed-point numbers with janus. It mainly adds the enum cases and match branches required to dispatch on the 16-, 32- and 64-bit variants of fixed-point vector aggregation.
One notable thing I did is adding a helper enum to enable tagging the JSON from the upload request with the fixedpoint type in the end-to-end interop test only for our vectors, as the standard string representation of fixedpoint numbers does not carry that information.
Looking forward to your comments :)