From 36d18a239e6d69d67ad9d5bd4a148eca3e8236ab Mon Sep 17 00:00:00 2001 From: Alex Koshelev Date: Tue, 19 Nov 2024 21:44:38 -0800 Subject: [PATCH] Docs --- ipa-core/src/helpers/gateway/mod.rs | 1 + ipa-core/src/query/runner/sharded_shuffle.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ipa-core/src/helpers/gateway/mod.rs b/ipa-core/src/helpers/gateway/mod.rs index 9ecde1377..c14bfb0fd 100644 --- a/ipa-core/src/helpers/gateway/mod.rs +++ b/ipa-core/src/helpers/gateway/mod.rs @@ -122,6 +122,7 @@ impl ShardConfiguration for &Gateway { } fn shard_count(&self) -> ShardIndex { + // total number of shards include this instance and all its peers, so we add 1. ShardIndex::from(self.transports.shard.peer_count() + 1) } } diff --git a/ipa-core/src/query/runner/sharded_shuffle.rs b/ipa-core/src/query/runner/sharded_shuffle.rs index 0025f07cb..a90161b25 100644 --- a/ipa-core/src/query/runner/sharded_shuffle.rs +++ b/ipa-core/src/query/runner/sharded_shuffle.rs @@ -18,6 +18,9 @@ use crate::{ sync::Arc, }; +/// This executes the sharded shuffle protocol that consists of only one step: +/// permute the private inputs using a permutation that is not known to any helper +/// and client. pub async fn execute_sharded_shuffle<'a>( prss: &'a PrssEndpoint, gateway: &'a Gateway,