From 2b64c8ffe4dbf54fe6873cc50765c7f3536d54f5 Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Fri, 3 Jan 2025 14:01:18 +0100 Subject: [PATCH 1/4] step --- deploy/e2e/iris-mpc-0.yaml.tpl | 8 +++++++- deploy/e2e/iris-mpc-1.yaml.tpl | 8 +++++++- deploy/e2e/iris-mpc-2.yaml.tpl | 8 +++++++- iris-mpc-common/src/bin/key_manager.rs | 4 ++-- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/deploy/e2e/iris-mpc-0.yaml.tpl b/deploy/e2e/iris-mpc-0.yaml.tpl index 72e38feb1..493fd0f4d 100644 --- a/deploy/e2e/iris-mpc-0.yaml.tpl +++ b/deploy/e2e/iris-mpc-0.yaml.tpl @@ -93,6 +93,12 @@ iris-mpc-0: - name: AWS_REGION value: "$AWS_REGION" + - name: AWS_ACCESS_KEY_ID + value: "access_key" + + - name: AWS_SECRET_ACCESS_KEY + value: "secret_key" + - name: AWS_ENDPOINT_URL value: "http://localstack:4566" @@ -196,7 +202,7 @@ iris-mpc-0: initContainer: enabled: true - image: "ghcr.io/worldcoin/iris-mpc:2694d8cbb37c278ed84951ef9aac3af47b21f146" # no-cuda image + image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image name: "iris-mpc-0-copy-cuda-libs" env: - name: AWS_REGION diff --git a/deploy/e2e/iris-mpc-1.yaml.tpl b/deploy/e2e/iris-mpc-1.yaml.tpl index 15b3cd127..9cab8f98f 100644 --- a/deploy/e2e/iris-mpc-1.yaml.tpl +++ b/deploy/e2e/iris-mpc-1.yaml.tpl @@ -93,6 +93,12 @@ iris-mpc-1: - name: AWS_REGION value: "$AWS_REGION" + - name: AWS_ACCESS_KEY_ID + value: "access_key" + + - name: AWS_SECRET_ACCESS_KEY + value: "secret_key" + - name: AWS_ENDPOINT_URL value: "http://localstack:4566" @@ -196,7 +202,7 @@ iris-mpc-1: initContainer: enabled: true - image: "ghcr.io/worldcoin/iris-mpc:2694d8cbb37c278ed84951ef9aac3af47b21f146" # no-cuda image + image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image name: "iris-mpc-1-copy-cuda-libs" env: - name: AWS_REGION diff --git a/deploy/e2e/iris-mpc-2.yaml.tpl b/deploy/e2e/iris-mpc-2.yaml.tpl index 485734c90..9e3943ea9 100644 --- a/deploy/e2e/iris-mpc-2.yaml.tpl +++ b/deploy/e2e/iris-mpc-2.yaml.tpl @@ -93,6 +93,12 @@ iris-mpc-2: - name: AWS_REGION value: "$AWS_REGION" + - name: AWS_ACCESS_KEY_ID + value: "access_key" + + - name: AWS_SECRET_ACCESS_KEY + value: "secret_key" + - name: AWS_ENDPOINT_URL value: "http://localstack:4566" @@ -196,7 +202,7 @@ iris-mpc-2: initContainer: enabled: true - image: "ghcr.io/worldcoin/iris-mpc:2694d8cbb37c278ed84951ef9aac3af47b21f146" # no-cuda image + image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image name: "iris-mpc-2-copy-cuda-libs" env: - name: AWS_REGION diff --git a/iris-mpc-common/src/bin/key_manager.rs b/iris-mpc-common/src/bin/key_manager.rs index bc8346f1b..b1a117e4c 100644 --- a/iris-mpc-common/src/bin/key_manager.rs +++ b/iris-mpc-common/src/bin/key_manager.rs @@ -28,7 +28,7 @@ struct KeyManagerCli { )] node_id: String, - #[arg(short, long, env, default_value = "stage")] + #[arg(long, env, default_value = "stage")] env: String, #[arg(short, long, env, default_value = "eu-north-1")] @@ -237,7 +237,7 @@ async fn rotate_keys( return Err(eyre::eyre!("Error uploading public key to S3")); } } - + println!("{}", private_key_secret_id); match upload_private_key_to_asm(&sm_client, private_key_secret_id, priv_key_str.as_str()).await { Ok(output) => { From 03de5d4d001f7007802d0c5727230c6f6c96526a Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Fri, 3 Jan 2025 14:25:56 +0100 Subject: [PATCH 2/4] correct command in mpc-0 node and add latest tag --- .github/workflows/build-and-push.yaml | 1 + deploy/e2e/iris-mpc-0.yaml.tpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index 54cd3cb73..864d895ee 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -43,6 +43,7 @@ jobs: tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest platforms: linux/amd64 cache-from: type=gha cache-to: type=gha,mode=max diff --git a/deploy/e2e/iris-mpc-0.yaml.tpl b/deploy/e2e/iris-mpc-0.yaml.tpl index 493fd0f4d..298b600cf 100644 --- a/deploy/e2e/iris-mpc-0.yaml.tpl +++ b/deploy/e2e/iris-mpc-0.yaml.tpl @@ -224,4 +224,4 @@ iris-mpc-0: aws s3 cp s3://wf-smpcv2-stage-libs/libcublas.so.12.2.5.6 . aws s3 cp s3://wf-smpcv2-stage-libs/libcublasLt.so.12.2.5.6 . - key-manager --node-id 0 --env $ENV --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-stage-public-keys --region $AWS_REGION + key-manager --node-id 0 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys From 9b2dee395cbd78c3b5162dbfe431dfc0b54b721a Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Fri, 3 Jan 2025 16:33:34 +0100 Subject: [PATCH 3/4] remove debug, adjust config --- deploy/e2e/iris-mpc-0.yaml.tpl | 5 +++-- deploy/e2e/iris-mpc-1.yaml.tpl | 5 +++-- deploy/e2e/iris-mpc-2.yaml.tpl | 5 +++-- iris-mpc-common/src/bin/key_manager.rs | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/deploy/e2e/iris-mpc-0.yaml.tpl b/deploy/e2e/iris-mpc-0.yaml.tpl index 298b600cf..2e9ea56de 100644 --- a/deploy/e2e/iris-mpc-0.yaml.tpl +++ b/deploy/e2e/iris-mpc-0.yaml.tpl @@ -109,7 +109,7 @@ iris-mpc-0: value: "eth0" - name: NCCL_COMM_ID - value: "iris-mpc-0.svc.cluster.local:4000" + value: "iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local:4000" - name: SMPC__ENVIRONMENT value: "$ENV" @@ -195,7 +195,7 @@ iris-mpc-0: value: "true" - name: SMPC__NODE_HOSTNAMES - value: '["iris-mpc-0.svc.cluster.local","iris-mpc-1.svc.cluster.local","iris-mpc-2.svc.cluster.local"]' + value: '["iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local","iris-mpc-1.iris-mpc-1.$ENV.svc.cluster.local","iris-mpc-2.iris-mpc-2.$ENV.svc.cluster.local"]' - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" @@ -225,3 +225,4 @@ iris-mpc-0: aws s3 cp s3://wf-smpcv2-stage-libs/libcublasLt.so.12.2.5.6 . key-manager --node-id 0 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys + key-manager --node-id 0 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys diff --git a/deploy/e2e/iris-mpc-1.yaml.tpl b/deploy/e2e/iris-mpc-1.yaml.tpl index 9cab8f98f..87c992cb3 100644 --- a/deploy/e2e/iris-mpc-1.yaml.tpl +++ b/deploy/e2e/iris-mpc-1.yaml.tpl @@ -109,7 +109,7 @@ iris-mpc-1: value: "eth0" - name: NCCL_COMM_ID - value: "iris-mpc-1.svc.cluster.local:4000" + value: "iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local:4000" - name: SMPC__ENVIRONMENT value: "$ENV" @@ -195,7 +195,7 @@ iris-mpc-1: value: "true" - name: SMPC__NODE_HOSTNAMES - value: '["iris-mpc-0.svc.cluster.local","iris-mpc-1.svc.cluster.local","iris-mpc-2.svc.cluster.local"]' + value: '["iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local","iris-mpc-1.iris-mpc-1.$ENV.svc.cluster.local","iris-mpc-2.iris-mpc-2.$ENV.svc.cluster.local"]' - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" @@ -225,3 +225,4 @@ iris-mpc-1: aws s3 cp s3://wf-smpcv2-stage-libs/libcublasLt.so.12.2.5.6 . key-manager --node-id 1 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys + key-manager --node-id 1 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys diff --git a/deploy/e2e/iris-mpc-2.yaml.tpl b/deploy/e2e/iris-mpc-2.yaml.tpl index 9e3943ea9..86f7879de 100644 --- a/deploy/e2e/iris-mpc-2.yaml.tpl +++ b/deploy/e2e/iris-mpc-2.yaml.tpl @@ -109,7 +109,7 @@ iris-mpc-2: value: "eth0" - name: NCCL_COMM_ID - value: "iris-mpc-2.svc.cluster.local:4000" + value: "iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local:4000" - name: SMPC__ENVIRONMENT value: "$ENV" @@ -195,7 +195,7 @@ iris-mpc-2: value: "true" - name: SMPC__NODE_HOSTNAMES - value: '["iris-mpc-0.svc.cluster.local","iris-mpc-1.svc.cluster.local","iris-mpc-2.svc.cluster.local"]' + value: '["iris-mpc-0.iris-mpc-0.$ENV.svc.cluster.local","iris-mpc-1.iris-mpc-1.$ENV.svc.cluster.local","iris-mpc-2.iris-mpc-2.$ENV.svc.cluster.local"]' - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" @@ -225,3 +225,4 @@ iris-mpc-2: aws s3 cp s3://wf-smpcv2-stage-libs/libcublasLt.so.12.2.5.6 . key-manager --node-id 2 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys + key-manager --node-id 2 --env $ENV --region $AWS_REGION --endpoint-url "http://localstack:4566" rotate --public-key-bucket-name wf-$ENV-public-keys diff --git a/iris-mpc-common/src/bin/key_manager.rs b/iris-mpc-common/src/bin/key_manager.rs index b1a117e4c..520a7e62e 100644 --- a/iris-mpc-common/src/bin/key_manager.rs +++ b/iris-mpc-common/src/bin/key_manager.rs @@ -237,7 +237,7 @@ async fn rotate_keys( return Err(eyre::eyre!("Error uploading public key to S3")); } } - println!("{}", private_key_secret_id); + match upload_private_key_to_asm(&sm_client, private_key_secret_id, priv_key_str.as_str()).await { Ok(output) => { From 27a8b4e6d986b10da9ec3d53af02a80f1811d0b2 Mon Sep 17 00:00:00 2001 From: Wojciech Sromek Date: Tue, 7 Jan 2025 15:47:57 +0100 Subject: [PATCH 4/4] a lot of initial heartbeats --- deploy/e2e/iris-mpc-0.yaml.tpl | 3 +++ deploy/e2e/iris-mpc-1.yaml.tpl | 3 +++ deploy/e2e/iris-mpc-2.yaml.tpl | 3 +++ 3 files changed, 9 insertions(+) diff --git a/deploy/e2e/iris-mpc-0.yaml.tpl b/deploy/e2e/iris-mpc-0.yaml.tpl index 2e9ea56de..2f98c25b0 100644 --- a/deploy/e2e/iris-mpc-0.yaml.tpl +++ b/deploy/e2e/iris-mpc-0.yaml.tpl @@ -200,6 +200,9 @@ iris-mpc-0: - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" + - name: SMPC__HEARTBEAT_INITIAL_RETRIES + value: "1000" + initContainer: enabled: true image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image diff --git a/deploy/e2e/iris-mpc-1.yaml.tpl b/deploy/e2e/iris-mpc-1.yaml.tpl index 87c992cb3..5f52de2bd 100644 --- a/deploy/e2e/iris-mpc-1.yaml.tpl +++ b/deploy/e2e/iris-mpc-1.yaml.tpl @@ -200,6 +200,9 @@ iris-mpc-1: - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" + - name: SMPC__HEARTBEAT_INITIAL_RETRIES + value: "1000" + initContainer: enabled: true image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image diff --git a/deploy/e2e/iris-mpc-2.yaml.tpl b/deploy/e2e/iris-mpc-2.yaml.tpl index 86f7879de..3d1f20250 100644 --- a/deploy/e2e/iris-mpc-2.yaml.tpl +++ b/deploy/e2e/iris-mpc-2.yaml.tpl @@ -200,6 +200,9 @@ iris-mpc-2: - name: SMPC__IMAGE_NAME value: "ghcr.io/worldcoin/iris-mpc:$IRIS_MPC_IMAGE_TAG" + - name: SMPC__HEARTBEAT_INITIAL_RETRIES + value: "1000" + initContainer: enabled: true image: "ghcr.io/worldcoin/iris-mpc:4913ef30024615c5dca0132a22c2971158e1cc0e" # no-cuda image