Skip to content

Commit

Permalink
Some more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
richajaindce committed Oct 25, 2023
1 parent dd07816 commit 51e05fe
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 14 deletions.
4 changes: 2 additions & 2 deletions benches/oneshot/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ async fn run(args: Args) -> Result<(), Error> {
.collect::<Vec<_>>();

let order = if args.oprf {
CappingOrder::CapOldestFirst
} else {
CappingOrder::CapMostRecentFirst
} else {
CappingOrder::CapOldestFirst
};
let expected_results = ipa_in_the_clear(
&raw_data,
Expand Down
1 change: 0 additions & 1 deletion pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ check "Arithmetic circuit benchmark" \

check "Sort benchmark" \
cargo bench --bench oneshot_sort --no-default-features --features="enable-benches descriptive-gate"

6 changes: 3 additions & 3 deletions scripts/collect_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,15 @@ def ipa_steps(steps):
print(" ".join(args), file=sys.stderr)
steps.update(collect_steps(args))

OPRF_BREAKDOWN_KEYS = [256]
OPRF_USER_CAP = [16, 64, 128]
OPRF_SECURITY_MODEL = ["semi-honest"]
OPRF_TRIGGER_VALUE = [4]
OPRF_TRIGGER_VALUE = [7]

def oprf_steps(steps):
for c in OPRF_USER_CAP:
for w in ATTRIBUTION_WINDOW:
for b in BREAKDOWN_KEYS:
for b in OPRF_BREAKDOWN_KEYS:
for m in OPRF_SECURITY_MODEL:
for tv in OPRF_TRIGGER_VALUE:
args = ARGS + [
Expand Down Expand Up @@ -207,4 +208,3 @@ def oprf_steps(steps):

for step in sorted_steps:
print(step)

4 changes: 2 additions & 2 deletions src/bin/report_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use ipa::{
protocol::{BreakdownKey, MatchKey},
report::{KeyIdentifier, DEFAULT_KEY_ID},
test_fixture::{
ipa::{ipa_in_the_clear, IpaSecurityModel, TestRawDataRecord},
ipa::{ipa_in_the_clear, CappingOrder, IpaSecurityModel, TestRawDataRecord},
EventGenerator, EventGeneratorConfig,
},
};
Expand Down Expand Up @@ -247,7 +247,7 @@ async fn ipa(
ipa_query_config.per_user_credit_cap,
ipa_query_config.attribution_window_seconds,
ipa_query_config.max_breakdown_key,
CappingOrder::CapOldestFirst,
&CappingOrder::CapOldestFirst,
);

// pad the output vector to the max breakdown key, to make sure it is aligned with the MPC results
Expand Down
238 changes: 235 additions & 3 deletions src/protocol/step/steps.txt

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions src/test_fixture/input/sharing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,14 @@ where
} else {
EventType::Source
};
let timestamp = TS::truncate_from(self.timestamp).share_with(rng);
let breakdown_key = BK::truncate_from(self.breakdown_key).share_with(rng);
let trigger_value = TV::truncate_from(self.trigger_value).share_with(rng);
let timestamp: [Replicated<TS>; 3] =
TS::try_from(self.timestamp.into()).unwrap().share_with(rng);
let breakdown_key = BK::try_from(self.breakdown_key.into())
.unwrap()
.share_with(rng);
let trigger_value = TV::try_from(self.trigger_value.into())
.unwrap()
.share_with(rng);

zip(zip(timestamp, breakdown_key), trigger_value)
.map(|((ts_share, bk_share), tv_share)| OprfReport {
Expand Down
1 change: 1 addition & 0 deletions steps1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No steps in the output

0 comments on commit 51e05fe

Please sign in to comment.