From cc5f5a60848a6e1af72cf797f2614f43b8365a24 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Tue, 9 Jul 2024 12:48:28 +0800 Subject: [PATCH 1/2] reducing latency to 1s to pass on ci --- chain-signatures/node/src/storage/secret_storage.rs | 6 ++++-- integration-tests/chain-signatures/tests/cases/mod.rs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/chain-signatures/node/src/storage/secret_storage.rs b/chain-signatures/node/src/storage/secret_storage.rs index 4ea0e37b5..f463f83a2 100644 --- a/chain-signatures/node/src/storage/secret_storage.rs +++ b/chain-signatures/node/src/storage/secret_storage.rs @@ -69,10 +69,12 @@ impl SecretNodeStorage for SecretManagerNodeStorage { if let Ok(persistent_node_data) = serde_json::from_slice(&data) { Ok(Some(persistent_node_data)) } else { - tracing::info!("failed to convert stored data to key share, presuming it is missing"); + tracing::info!( + "failed to convert stored data to key share, presuming it is missing" + ); Ok(None) } - }, + } _ => { tracing::info!("failed to load existing key share, presuming it is missing"); Ok(None) diff --git a/integration-tests/chain-signatures/tests/cases/mod.rs b/integration-tests/chain-signatures/tests/cases/mod.rs index d3a46a1f1..fdc135a80 100644 --- a/integration-tests/chain-signatures/tests/cases/mod.rs +++ b/integration-tests/chain-signatures/tests/cases/mod.rs @@ -352,7 +352,7 @@ async fn test_multichain_reshare_with_lake_congestion() -> anyhow::Result<()> { assert!(state.participants.len() == 3); // add latency to node1->rpc, but not node0->rpc - add_latency(&ctx.nodes.proxy_name_for_node(1), true, 1.0, 2_000, 200).await?; + add_latency(&ctx.nodes.proxy_name_for_node(1), true, 1.0, 1_000, 100).await?; // remove node2, node0 and node1 should still reach concensus // this fails if the latency above is too long (10s) assert!(ctx.remove_participant(None).await.is_ok()); @@ -364,7 +364,7 @@ async fn test_multichain_reshare_with_lake_congestion() -> anyhow::Result<()> { assert!(state.participants.len() == 2); assert!(ctx.add_participant().await.is_ok()); // add latency to node2->rpc - add_latency(&ctx.nodes.proxy_name_for_node(2), true, 1.0, 2_000, 200).await?; + add_latency(&ctx.nodes.proxy_name_for_node(2), true, 1.0, 1_000, 100).await?; let state = wait_for::running_mpc(&ctx, Some(0)).await?; assert!(state.participants.len() == 3); assert!(ctx.remove_participant(None).await.is_ok()); From 706ffdb45a5d0c307bcf09a48ad79b4355797dc8 Mon Sep 17 00:00:00 2001 From: Bo Yao Date: Wed, 10 Jul 2024 11:19:52 +0800 Subject: [PATCH 2/2] fmt --- chain-signatures/node/src/storage/secret_storage.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain-signatures/node/src/storage/secret_storage.rs b/chain-signatures/node/src/storage/secret_storage.rs index de19822a4..fc5f7f938 100644 --- a/chain-signatures/node/src/storage/secret_storage.rs +++ b/chain-signatures/node/src/storage/secret_storage.rs @@ -71,7 +71,7 @@ impl SecretNodeStorage for SecretManagerNodeStorage { tracing::warn!(%err, data_len = data.len(), "failed to convert stored data to key share, presuming it is missing"); Ok(None) } - } + }, _ => { tracing::warn!("failed to load existing key share, presuming it is missing"); Ok(None)