Skip to content

Commit

Permalink
Merge pull request #14 from zama-ai/chore/rename-docker-services
Browse files Browse the repository at this point in the history
Chore/rename docker services
  • Loading branch information
leventdem authored Jul 4, 2024
2 parents 9865572 + fecb048 commit afc893d
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ init-ethermint-node:
@$(MAKE) init-ethermint-node-from-registry

init-ethermint-node-from-registry:
@docker compose -f docker-compose/docker-compose-full.yml run validator bash /config/setup.sh
@docker compose -f docker-compose/docker-compose-full.yml run fhevm-validator bash /config/setup.sh
$(MAKE) change-running-node-owner
$(MAKE) generate-fhe-keys-registry

Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,20 @@ cd work_dir/fhevm & npx hardhat test --grep 'test async decrypt several addresse

```bash
# Check logs for Gateway
docker logs zama-kms-gateway-1 -f
docker logs zama-dev-gateway-1 -f

# On the second try you should see
# 2024-07-04T09:29:06.649194Z INFO gateway::events::manager: ⭐ event_decryption: 1
# 2024-07-04T09:29:06.649215Z INFO gateway::events::manager: Handled event decryption: 1
# 2024-07-04T09:29:06.649255Z INFO gateway::blockchain::handlers: 🧵 decrypt thread started
# 2024-07-04T09:29:06.654205Z INFO gateway::blockchain::ciphertext_provider: Getting ciphertext for ct_handle: "aa9f8f90ebf0fa8e30caee92f0b97e158f1ec659b363101d07beac9b0cc90200"
# 2024-07-04T09:29:06.667907Z INFO gateway::blockchain::kms_blockchain: 📦 Stored ciphertext, handle: 00008138b65173b5c57fc98d0fce54e5ff10635127e526144ffbe21d7099e3a1e1516574
# 2024-07-04T09:29:06.667927Z INFO gateway::blockchain::kms_blockchain: 🍊 Decrypting ciphertext of size: 33080
# 2024-07-04T09:29:06.670033Z INFO execute_contract: kms_blockchain_client::client: Body Raw bytes length: 609

# 2024-06-27T16:59:35.432399Z INFO gateway::events::manager: ⭐ event_decryption: 1
# 2024-06-27T16:59:35.432410Z INFO gateway::events::manager: Handled event decryption: 1
# 2024-06-27T16:59:35.432460Z INFO gateway::blockchain::ciphertext_provider: Getting ciphertext for ct_handle: "aa9f8f90ebf0fa8e30caee92f0b97e158f1ec659b363101d07beac9b0cc90200"
# 2024-06-27T16:59:35.436144Z INFO gateway::blockchain::handlers: 🚀 request_id: 1, fhe_type: euint8
# 2024-06-27T16:59:35.439802Z INFO gateway::blockchain::kms_blockchain: 📦 Stored ciphertext, handle: 00008138b65173b5c57fc98d0fce54e5ff10635127e526144ffbe21d7099e3a1e1516574
# 2024-06-27T16:59:35.439813Z INFO gateway::blockchain::kms_blockchain: 🍊 Decrypting ciphertext of size: 33080

# Check the logs for the node
docker logs zama-kms-validator-1 -f
docker logs zama-dev-fhevm-validator-1 -f
```

</p>
Expand Down Expand Up @@ -175,20 +176,20 @@ Initialize and generate/copy FHE keys based on `KEY_GEN` value in `.env`.
```bash
make run-full
# Check the logs for the node
docker logs zama-kms-validator-1 -f
docker logs zama-dev-fhevm-validator-1 -f
# Check logs for Gateway
docker logs zama-kms-gateway-1 -f
docker logs zama-dev-gateway-1 -f
```

You should see the following docker images:

```
zama-kms-gateway-1 ghcr.io/zama-ai/kms-blockchain-gateway-dev:aa90d98
zama-kms-connector-1 ghcr.io/zama-ai/kms-blockchain-connector-dev:50872c4
zama-kms-validator-1 ghcr.io/zama-ai/ethermint-node:v0.5.0
zama-kms-core-1 ghcr.io/zama-ai/kms-service-dev:aa90d98
zama-kms-kv-store-1 ghcr.io/zama-ai/kms-blockchain-gateway-dev:aa90d98
zama-kms-blockchain-validator-1 ghcr.io/zama-ai/kms-blockchain-asc-dev:50872c4
zama-dev-gateway-1 ghcr.io/zama-ai/kms-blockchain-gateway-dev:v0.7.1
zama-dev-connector-1 ghcr.io/zama-ai/kms-blockchain-connector-dev:v0.7.1
zama-dev-fhevm-validator-1 ghcr.io/zama-ai/ethermint-node:v0.5.0
zama-dev-kms-core-1 ghcr.io/zama-ai/kms-service-dev:v0.7.1
zama-dev-kms-validator-1 ghcr.io/zama-ai/kms-blockchain-asc-dev:v0.7.1
zama-dev-gateway-store-1 ghcr.io/zama-ai/kms-blockchain-gateway-dev:v0.7.1
```

### Stop fhEVM-native + KMS
Expand Down
4 changes: 2 additions & 2 deletions default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ tick_interval_secs = 1
storage_path = "./temp/events.toml"

[oracle]
addresses = ["http://validator:26657"]
addresses = ["http://fhevm-validator:26657"]

[blockchain]
addresses = ["http://blockchain-validator:9090"]
addresses = ["http://kms-validator:9090"]
contract = "wasm14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s0phg4d"

[blockchain.signkey]
Expand Down
2 changes: 1 addition & 1 deletion docker-compose/docker-compose-full.override.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'

services:
validator:
fhevm-validator:
# To avoid panic this env variable is added at run and not init (calling setup.sh)
environment:
- FHEVM_GO_KEYS_DIR=/root/.ethermintd/zama/keys/network-fhe-keys
Expand Down
34 changes: 17 additions & 17 deletions docker-compose/docker-compose-full.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: zama-kms
name: zama-dev

services:

kv-store:
gateway-store:
image: ghcr.io/zama-ai/kms-blockchain-gateway-dev:v0.7.1
command:
- "kv_store"
ports:
- "8088:8088"

blockchain-validator:
kms-validator:
image: ghcr.io/zama-ai/kms-blockchain-asc-dev:v0.7.1
ports:
- "36656:26656"
Expand All @@ -29,20 +29,20 @@ services:
command:
- "kms-blockchain-connector"
environment:
- ASC_CONN__BLOCKCHAIN__ADDRESSES=http://blockchain-validator:9090
- ASC_CONN__CORE__ADDRESSES=http://core:50051
- ASC_CONN__STORE__URL=http://kv-store:8088
- ASC_CONN__BLOCKCHAIN__ADDRESSES=http://kms-validator:9090
- ASC_CONN__CORE__ADDRESSES=http://kms-core:50051
- ASC_CONN__STORE__URL=http://gateway-store:8088
- ASC_CONN__CORE__TIMEOUT_CONFIG__DECRYPTION__INITIAL_WAIT_TIME=1
- ASC_CONN__CORE__TIMEOUT_CONFIG__DECRYPTION__RETRY_INTERVAL=1
- ASC_CONN__CORE__TIMEOUT_CONFIG__REENCRYPTION__INITIAL_WAIT_TIME=1
- ASC_CONN__CORE__TIMEOUT_CONFIG__REENCRYPTION__RETRY_INTERVAL=1
depends_on:
blockchain-validator:
kms-validator:
condition: service_healthy
core:
kms-core:
condition: service_healthy

core:
kms-core:
image: ghcr.io/zama-ai/kms-service-dev:v0.7.1
ports:
- "50051:50051"
Expand All @@ -63,23 +63,23 @@ services:
- ../default.toml:/app/gateway/config/default.toml:Z
environment:
- GATEWAY__ETHEREUM__LISTENER_TYPE=FHEVM_V1_1
- GATEWAY__ETHEREUM__WSS_URL=ws://validator:8546
- GATEWAY__ETHEREUM__HTTP_URL=http://validator:8545
- GATEWAY__ETHEREUM__WSS_URL=ws://fhevm-validator:8546
- GATEWAY__ETHEREUM__HTTP_URL=http://fhevm-validator:8545
- GATEWAY__ETHEREUM__FHE_LIB_ADDRESS=000000000000000000000000000000000000005d
- GATEWAY__ETHEREUM__ORACLE_PREDEPLOY_ADDRESS=c8c9303Cd7F337fab769686B593B87DC3403E0ce
- GATEWAY__KMS__ADDRESS=http://blockchain-validator:9090
- GATEWAY__KMS__ADDRESS=http://kms-validator:9090
- GATEWAY__KMS__KEY_ID=408d8cbaa51dece7f782fe04ba0b1c1d017b1088
- GATEWAY__STORAGE__URL=http://kv-store:8088
- ASC_CONN__BLOCKCHAIN__ADDRESSES=http://blockchain-validator:9090
- GATEWAY__STORAGE__URL=http://gateway-store:8088
- ASC_CONN__BLOCKCHAIN__ADDRESSES=http://kms-validator:9090
- GATEWAY__ETHEREUM__RELAYER_KEY=7ec931411ad75a7c201469a385d6f18a325d4923f9f213bd882bbea87e160b67
- RUST_BACKTRACE=1
depends_on:
validator:
fhevm-validator:
condition: service_healthy
blockchain-validator:
kms-validator:
condition: service_healthy

validator:
fhevm-validator:
environment:
- TFHE_EXECUTOR_CONTRACT_ADDRESS=0x05fD9B5EFE0a996095f42Ed7e77c390810CF660c
image: ghcr.io/zama-ai/ethermint-node:v0.5.0
Expand Down
22 changes: 11 additions & 11 deletions scripts/fund_test_addresses_docker.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#!/usr/bin/env bash

docker exec -i zama-kms-validator-1 faucet a5e1defb98efe38ebb2d958cee052410247f4c80
docker exec -i zama-dev-fhevm-validator-1 faucet a5e1defb98efe38ebb2d958cee052410247f4c80
sleep 8
docker exec -i zama-kms-validator-1 faucet fCefe53c7012a075b8a711df391100d9c431c468
docker exec -i zama-dev-fhevm-validator-1 faucet fCefe53c7012a075b8a711df391100d9c431c468
sleep 8
docker exec -i zama-kms-validator-1 faucet a44366bAA26296c1409AD1e284264212029F02f1
docker exec -i zama-dev-fhevm-validator-1 faucet a44366bAA26296c1409AD1e284264212029F02f1
sleep 8
docker exec -i zama-kms-validator-1 faucet c1d91b49A1B3D1324E93F86778C44a03f1063f1b
docker exec -i zama-dev-fhevm-validator-1 faucet c1d91b49A1B3D1324E93F86778C44a03f1063f1b
sleep 8
docker exec -i zama-kms-validator-1 faucet 305F1F471e9baCFF2b3549F9601f9A4BEafc94e1
docker exec -i zama-dev-fhevm-validator-1 faucet 305F1F471e9baCFF2b3549F9601f9A4BEafc94e1
sleep 8
docker exec -i zama-kms-validator-1 faucet 8B8f5091f8b9817EF69cFC1E8B2f721BafF60DF4
docker exec -i zama-dev-fhevm-validator-1 faucet 8B8f5091f8b9817EF69cFC1E8B2f721BafF60DF4
sleep 8
docker exec -i zama-kms-validator-1 faucet 03734276e8f8ab253ff4295e66228DAC936FF5b8
docker exec -i zama-dev-fhevm-validator-1 faucet 03734276e8f8ab253ff4295e66228DAC936FF5b8
sleep 8
docker exec -i zama-kms-validator-1 faucet 9FE8958A2920985AC7ab8d320fDFaB310135a05B
docker exec -i zama-dev-fhevm-validator-1 faucet 9FE8958A2920985AC7ab8d320fDFaB310135a05B
sleep 8
docker exec -i zama-kms-validator-1 faucet 466f26442DD182C9A1b018Cd06671F9791DdE8Ef
docker exec -i zama-dev-fhevm-validator-1 faucet 466f26442DD182C9A1b018Cd06671F9791DdE8Ef
sleep 8
docker exec -i zama-kms-validator-1 faucet c45994e4098271c3140117ebD5c74C70dd56D9cd
docker exec -i zama-dev-fhevm-validator-1 faucet c45994e4098271c3140117ebD5c74C70dd56D9cd
sleep 8
docker exec -i zama-kms-validator-1 faucet 97F272ccfef4026A1F3f0e0E879d514627B84E69
docker exec -i zama-dev-fhevm-validator-1 faucet 97F272ccfef4026A1F3f0e0E879d514627B84E69

0 comments on commit afc893d

Please sign in to comment.