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

Refactor HMSS to remove sketch params #1689

Merged
merged 9 commits into from
Jul 19, 2024

Conversation

renjiezh
Copy link
Contributor

@renjiezh renjiezh commented Jul 15, 2024

@wfa-reviewable
Copy link

This change is Reviewable

@renjiezh renjiezh requested review from ple13 and SanjayVas July 15, 2024 16:36
Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 25 of 25 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ple13 and @renjiezh)


src/main/kotlin/org/wfanet/measurement/duchy/service/api/v2alpha/RequisitionFulfillmentService.kt line 129 at r1 (raw file):

            recordLlv2RequisitionLocally(computationToken, externalRequisitionKey, blob.blobKey)
          }
          val seed =

Why is this changed? It doesn't appear to be related to the API change.


src/main/proto/wfa/measurement/system/v1alpha/computation.proto line 168 at r1 (raw file):

    // Configuration for the Honest Majority Share Shuffle protocol.
    message HonestMajorityShareShuffle {

FYI this change is only okay because this hasn't been used yet. Otherwise the system API follows similar rules to the CMMS public API.


src/test/kotlin/org/wfanet/measurement/duchy/daemon/mill/shareshuffle/HonestMajorityShareShuffleMillTest.kt line 960 at r1 (raw file):

            registerCount = 100
            maximumCombinedFrequency = 30
            ringModulus = 127

If changing the value in HMSS_PARAMETERS would also require this value to change, then this should just come from that constant.

Copy link
Contributor Author

@renjiezh renjiezh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 23 of 25 files reviewed, 2 unresolved discussions (waiting on @ple13 and @SanjayVas)


src/main/kotlin/org/wfanet/measurement/duchy/service/api/v2alpha/RequisitionFulfillmentService.kt line 129 at r1 (raw file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

Why is this changed? It doesn't appear to be related to the API change.

This is unused code which raises compiler warning.


src/test/kotlin/org/wfanet/measurement/duchy/daemon/mill/shareshuffle/HonestMajorityShareShuffleMillTest.kt line 960 at r1 (raw file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

If changing the value in HMSS_PARAMETERS would also require this value to change, then this should just come from that constant.

Done.

Copy link
Contributor

@ple13 ple13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 23 of 25 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @renjiezh and @SanjayVas)


src/main/k8s/testing/secretfiles/hmss_protocol_config_config.textproto line 6 at r2 (raw file):

  noise_mechanism: DISCRETE_GAUSSIAN
  reach_and_frequency_ring_modulus: 127
  reach_ring_modulus: 127
  1. nit: use reach_only to mirror the reach_and_frequency?
  2. The modulus for the reach only protocol is a prime number. We should have a comment to indicate that the modulus used in the reach only protocol must be a prime.

src/main/proto/wfa/measurement/internal/kingdom/protocol_config.proto line 145 at r2 (raw file):

    // The modulus used in the protocol for Reach Measurement.
    int32 reach_ring_modulus = 4;

nit: same as above. pls consider reach_only_ring_modulus to mirror the R/F name.


src/main/proto/wfa/measurement/system/v1alpha/computation.proto line 173 at r2 (raw file):

          [(google.api.field_behavior) = REQUIRED];
      // The modulus used in the MPC protocol for Reach Measurement.
      int32 reach_ring_modulus = 2 [(google.api.field_behavior) = REQUIRED];

nit: same about the name as above.

@SanjayVas SanjayVas requested a review from ple13 July 16, 2024 17:19
Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ple13 and @renjiezh)


src/main/k8s/testing/secretfiles/hmss_protocol_config_config.textproto line 6 at r2 (raw file):

nit: use reach_only to mirror the reach_and_frequency?

This is mirroring the Measurement types of REACH and REACH_AND_FREQUENCY.

The only place we use "reach only" is for reach only LLv2, as that's a separate protocol. The Measurement type is still REACH.

Copy link
Contributor Author

@renjiezh renjiezh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 24 of 25 files reviewed, 1 unresolved discussion (waiting on @ple13 and @SanjayVas)


src/main/k8s/testing/secretfiles/hmss_protocol_config_config.textproto line 6 at r2 (raw file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

nit: use reach_only to mirror the reach_and_frequency?

This is mirroring the Measurement types of REACH and REACH_AND_FREQUENCY.

The only place we use "reach only" is for reach only LLv2, as that's a separate protocol. The Measurement type is still REACH.

Done.
Comment added in protocol_config.proto.

@renjiezh renjiezh force-pushed the renjiez-refactor-hmms-sketch-param branch from 8de4f90 to 0138535 Compare July 16, 2024 19:23
@renjiezh renjiezh force-pushed the renjiez-refactor-hmms-sketch-param branch from 0138535 to 9e4f323 Compare July 16, 2024 19:27
Copy link
Contributor

@ple13 ple13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3, 16 of 16 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

Copy link
Collaborator

@stevenwarejones stevenwarejones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 10 of 25 files at r1, 1 of 2 files at r2, 1 of 1 files at r3, 16 of 16 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

@renjiezh renjiezh requested a review from SanjayVas July 18, 2024 17:32
Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r2, 1 of 1 files at r3, 16 of 16 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @renjiezh)


src/main/proto/wfa/measurement/internal/duchy/protocol/BUILD.bazel line 126 at r4 (raw file):

proto_library(
    name = "share_shuffle_sketch_params_proto",

proto library name must match file name

Code quote:

share_shuffle_sketch_params_proto

Copy link
Contributor Author

@renjiezh renjiezh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 27 of 28 files reviewed, 1 unresolved discussion (waiting on @ple13, @SanjayVas, and @stevenwarejones)


src/main/proto/wfa/measurement/internal/duchy/protocol/BUILD.bazel line 126 at r4 (raw file):

Previously, SanjayVas (Sanjay Vasandani) wrote…

proto library name must match file name

Done.
Nice catch!

@renjiezh renjiezh force-pushed the renjiez-refactor-hmms-sketch-param branch from cda913c to 0ec4e7e Compare July 18, 2024 20:43
Copy link
Member

@SanjayVas SanjayVas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

Copy link
Contributor Author

@renjiezh renjiezh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9 of 25 files at r1, 1 of 2 files at r2, 1 of 1 files at r3, 13 of 16 files at r4, 2 of 2 files at r5, 3 of 3 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @renjiezh)

@renjiezh renjiezh enabled auto-merge (squash) July 19, 2024 20:41
@renjiezh renjiezh merged commit 5681e76 into main Jul 19, 2024
4 checks passed
@renjiezh renjiezh deleted the renjiez-refactor-hmms-sketch-param branch July 19, 2024 20:56
SanjayVas added a commit that referenced this pull request Jul 31, 2024
This was missed in #1689.

This includes an update to the build-test workflow to ensure the lockfile is up-to-date.
ple13 pushed a commit that referenced this pull request Aug 16, 2024
ple13 pushed a commit that referenced this pull request Aug 16, 2024
This was missed in #1689.

This includes an update to the build-test workflow to ensure the lockfile is up-to-date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants