From f7adac32a582c2d7f06d279a5edf6b94249a1e57 Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Mon, 13 Jan 2025 15:47:22 +0100 Subject: [PATCH 1/4] hotfix: Ignore broken batch --- iris-mpc/src/bin/server.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index 2ba9c657c..2f4862e88 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -239,7 +239,7 @@ async fn receive_batch( msg_counter += 1; let shares_encryption_key_pairs = shares_encryption_key_pairs.clone(); - + let smpc_request: UniquenessRequest = serde_json::from_str(&message.message).map_err(|e| { ReceiveRequestError::json_parse_error("Uniqueness request", e) @@ -266,6 +266,25 @@ async fn receive_batch( continue; } + let force_ignore = vec![ + "00123b99c044484346788cea00000000", + "001148c4cff8e0fe6f15953a00000000", + "00123b99c044484346788cea00000000", + "0011885f03fb4c4ac4a0c0d000000000", + "0011adcf9e8051ed55eb0dee00000000", + "0012aa221ad51123f638ad6a00000000", + "0011d5cbfa08bedd1ef7e7e900000000", + "0011ace3eaab0926fd8f47d400000000", + "0012f21b417e50c799517c7d00000000", + "0011d065d2795f3a55f741da00000000", + ]; + if force_ignore.contains(&smpc_request.signup_id.as_str()) { + // Some party (maybe us) already meant to delete this request, so we + // skip it. Ignore this message when calculating the batch size. + msg_counter -= 1; + continue; + } + if let Some(batch_size) = smpc_request.batch_size { // Updating the batch size instantly makes it a bit unpredictable, since // if we're already above the new limit, we'll still process the current From e3c33b2fd27ebc7d2be7fce2db9936f52bc260bc Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Mon, 13 Jan 2025 15:48:24 +0100 Subject: [PATCH 2/4] fmt --- iris-mpc/src/bin/server.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index 2f4862e88..7183dbeee 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -239,7 +239,7 @@ async fn receive_batch( msg_counter += 1; let shares_encryption_key_pairs = shares_encryption_key_pairs.clone(); - + let smpc_request: UniquenessRequest = serde_json::from_str(&message.message).map_err(|e| { ReceiveRequestError::json_parse_error("Uniqueness request", e) From 26afee5499abfcf5c661a4bdfdf88d4ade501f78 Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Mon, 13 Jan 2025 15:50:51 +0100 Subject: [PATCH 3/4] comment for reason --- iris-mpc/src/bin/server.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index 7183dbeee..cd709fde7 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -279,8 +279,7 @@ async fn receive_batch( "0011d065d2795f3a55f741da00000000", ]; if force_ignore.contains(&smpc_request.signup_id.as_str()) { - // Some party (maybe us) already meant to delete this request, so we - // skip it. Ignore this message when calculating the batch size. + // This needs to be ignored due to incident-196. Ignore this message when calculating the batch size. msg_counter -= 1; continue; } From 0c3af280c1a1b7917ba329aa39c8900c0c99695a Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Mon, 13 Jan 2025 15:51:38 +0100 Subject: [PATCH 4/4] fmt --- iris-mpc/src/bin/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iris-mpc/src/bin/server.rs b/iris-mpc/src/bin/server.rs index cd709fde7..33ded9018 100644 --- a/iris-mpc/src/bin/server.rs +++ b/iris-mpc/src/bin/server.rs @@ -279,7 +279,8 @@ async fn receive_batch( "0011d065d2795f3a55f741da00000000", ]; if force_ignore.contains(&smpc_request.signup_id.as_str()) { - // This needs to be ignored due to incident-196. Ignore this message when calculating the batch size. + // This needs to be ignored due to incident-196. Ignore this message + // when calculating the batch size. msg_counter -= 1; continue; }