Skip to content

Commit d0d53cd

Browse files
nboisdemanoranjith
authored andcommitted
chore(test-suite): applying new config for v0.6.0 relayer (#1338)
* chore(test-suite): upgrating test suite for relayer v0.6.0-rc.1 * chore(test-suite): fix config value for relayer, the time is treated as seconds * chore(test-suite): removing oracle in fhevm-cli * ci(test-suite): removing public-decryption oracle flow from ci * chore(test-suite): moving to v0.6.0 relayer on fhevm-cli * chore(test-suite): adding next environment variables for relayer versions --------- Co-authored-by: manoranjith <[email protected]>
1 parent de2e91e commit d0d53cd

File tree

6 files changed

+60
-74
lines changed

6 files changed

+60
-74
lines changed

.github/workflows/test-suite-e2e-tests-with-build.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ jobs:
8989
run: |
9090
./fhevm-cli test input-proof
9191
92-
- name: Public Decryption test
93-
working-directory: test-suite/fhevm
94-
run: |
95-
./fhevm-cli test public-decryption
96-
9792
- name: User Decryption test
9893
working-directory: test-suite/fhevm
9994
run: |

.github/workflows/test-suite-e2e-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ jobs:
157157
run: |
158158
./fhevm-cli test input-proof
159159
160-
- name: Public Decryption test
161-
working-directory: test-suite/fhevm
162-
run: |
163-
timeout 5m ./fhevm-cli test public-decryption
164-
165160
- name: User Decryption test
166161
working-directory: test-suite/fhevm
167162
run: |

test-suite/README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This repository provides a docker based setup to locally run an integration of Z
55
For overview of the system, architecture and details on individual components, refer to our [documentation](https://docs.zama.ai/fhevm).
66

77
## Main features
8+
89
KMS can be configured to two modes:
910

1011
- Centralized
@@ -23,10 +24,10 @@ KMS can be configured to two modes:
2324
- [Reporting Security Issues](#reporting-security-issues)
2425
- [Support](#support)
2526

26-
2727
## Get started
2828

2929
### Quickstart
30+
3031
The test suite offers a unified CLI for all operations:
3132

3233
```sh
@@ -40,7 +41,8 @@ cd test-suite/fhevm
4041
# Trivial
4142
./fhevm-cli test user-decryption
4243
# Trivial
43-
./fhevm-cli test public-decryption
44+
./fhevm-cli test public-decrypt-http-mixed
45+
./fhevm-cli test public-decrypt-http-ebool
4446
./fhevm-cli test erc20
4547

4648
# Upgrade a specific service
@@ -68,14 +70,16 @@ Therefore, for external developers or anyone setting up the stack for the first
6870
```
6971

7072
This command instructs Docker Compose to:
73+
7174
1. Build the images locally using the `Dockerfile` and context specified in the respective `docker-compose/*.yml` files for each service. This process uses the source code available in your local checkout (or cloned sub-repositories).
7275
2. Tag the newly built images with the versions specified in the `fhevm-cli` script.
7376
3. Then, start the services using these freshly built local images.
7477

7578
**Why `--build` is essential for external developers:**
76-
* **Image Access:** Since pre-built images are private, `--build` allows you to construct the necessary images from the publicly available source code.
77-
* **Local Modifications:** If you have made local changes to any of the Dockerfiles or the build context of a service (e.g., you've cloned one of the sub-repositories like `fhevm-contracts` or `fhevm-coprocessor` into the expected relative paths and made changes), `--build` ensures these changes are incorporated.
78-
* **Ensuring Correct Setup:** It guarantees that you are running with images built directly from the provided source, eliminating discrepancies that could arise from attempting to pull non-existent or inaccessible public images.
79+
80+
- **Image Access:** Since pre-built images are private, `--build` allows you to construct the necessary images from the publicly available source code.
81+
- **Local Modifications:** If you have made local changes to any of the Dockerfiles or the build context of a service (e.g., you've cloned one of the sub-repositories like `fhevm-contracts` or `fhevm-coprocessor` into the expected relative paths and made changes), `--build` ensures these changes are incorporated.
82+
- **Ensuring Correct Setup:** It guarantees that you are running with images built directly from the provided source, eliminating discrepancies that could arise from attempting to pull non-existent or inaccessible public images.
7983

8084
🚧 **In summary:** Until public images are made available, external users should always use `./fhevm-cli deploy --build` to ensure a successful deployment.
8185

@@ -90,6 +94,7 @@ This document outlines security best practices for the FHEVM project, particular
9094
Our repository contains example environment files `env/staging` that include sensitive values like private keys, mnemonics, and API keys. **These values are for testing purposes only** and should never be used in production environments.
9195

9296
For production deployments:
97+
9398
- **Do not** use the same keys, passwords, or mnemonics that appear in the example files
9499
- **Do not** commit actual production secrets to any repository
95100
- **Do** use a proper secrets management solution:
@@ -99,6 +104,7 @@ For production deployments:
99104
- Kubernetes Secrets (with proper encryption)
100105

101106
Example of replacing sensitive data in production:
107+
102108
```bash
103109
# Replace test mnemonic with environment variable reference
104110
# TEST: MNEMONIC=coyote sketch defense hover finger envelope celery urge panther venue verb cheese
@@ -108,6 +114,7 @@ MNEMONIC=${PRODUCTION_MNEMONIC}
108114
# TEST: TX_SENDER_PRIVATE_KEY=0x8f82b3f482c19a95ac29c82cf048c076ed0de2530c64a73f2d2d7d1e64b5cc6e
109115
TX_SENDER_PRIVATE_KEY=${SECURE_PRIVATE_KEY}
110116
```
117+
111118
#### Development environment
112119

113120
When developing locally:
@@ -117,8 +124,8 @@ When developing locally:
117124
- Consider using environment-specific configuration files (dev, staging, prod)
118125
- Use fake/test data for local development whenever possible
119126

120-
121127
#### Common sensitive data
128+
122129
The following values should NEVER be committed to repositories:
123130

124131
- Private keys
@@ -128,6 +135,7 @@ The following values should NEVER be committed to repositories:
128135
- JWT secrets
129136

130137
### Reporting security issues
138+
131139
Please report security vulnerabilities to `[email protected]` rather than creating public issues.
132140

133141
Include:
@@ -137,7 +145,6 @@ Include:
137145
- Potential impact
138146
- Suggested mitigation (if any)
139147

140-
141148
## Support
142149

143150
<a target="_blank" href="https://community.zama.ai">
Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,46 @@
11
environment: development
22

3-
http_endpoint: "0.0.0.0:3000"
4-
5-
transaction:
6-
private_key_fhevm: FHEVM_PRIVATE_KEY
7-
private_key_gateway: GATEWAY_PRIVATE_KEY
8-
gas_limit: 150000
9-
max_priority_fee: 2000000000
10-
timeout_secs: 60
11-
confirmations: 1
12-
retry:
13-
enabled: false
14-
max_attempts: 3
15-
base_delay_secs: 2
16-
max_delay_secs: 60
17-
ciphertext_check_retry:
18-
enabled: false
19-
max_attempts: 75
20-
base_delay_secs: 3
21-
max_delay_secs: 225
22-
23-
metrics_endpoint: "0.0.0.0:9898"
24-
http_metrics:
25-
histogram_buckets: [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40]
3+
gateway:
4+
listener:
5+
ws_reconnect_config:
6+
max_attempts: 20
7+
retry_interval_ms: 500
8+
tx_engine:
9+
private_key: GATEWAY_PRIVATE_KEY
10+
max_concurrency: 100
11+
retry:
12+
max_attempts: 100
13+
retry_interval_ms: 500
14+
readiness_checker:
15+
max_concurrency: 100
16+
retry:
17+
max_attempts: 30
18+
# The time is treated as seconds in code, even the config name has _ms suffix.
19+
# This will be fixed in next rc, until then treat the value as seconds.
20+
retry_interval_ms: 2
2621

22+
http:
23+
endpoint: "0.0.0.0:3000"
24+
rate_limit_post_endpoints:
25+
requests_per_second: 30
26+
burst_size: 30
27+
retry_after_seconds: 5
28+
jitter_max_ms: 2000
29+
metrics:
30+
histogram_buckets: [0, 0.5, 1, 1.25, 1.5, 1.75, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 25, 30]
2731

2832
log:
29-
# Log level should be set using RUST_LOG environment variable
30-
# Choose format: compact, pretty, or json
31-
format: "pretty"
32-
# Show source code location for debugging
33-
show_file_line: false
34-
# Show thread IDs for concurrency debugging
33+
format: "compact"
34+
show_file_line: true
3535
show_thread_ids: false
36-
# Include timestamps in logs
3736
show_timestamp: true
38-
# Optional: Set specific log levels for different modules
37+
show_target: true
38+
39+
metrics:
40+
endpoint: "0.0.0.0:9898"
3941

40-
db_path_rocksdb: "./.database"
42+
storage:
43+
db_path_rocksdb: "./.database"
4144

42-
# Development-specific settings
4345
development:
44-
# Enable for detailed error messages
45-
verbose_errors: true
46+
verbose_errors: true

test-suite/fhevm/env/staging/.env.relayer

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,22 @@
22
# WALLET CONFIGURATION - SENSITIVE
33
# =============================================================================
44
# IMPORTANT: For testing only - move to secure storage in production
5-
APP_TRANSACTION__PRIVATE_KEY_FHEVM=0x2e014a0b381171ae1ec813ccb82e1d9fed7e6cf2d860844e43e4ac072bf0e50a # accounts[3] - gateway
6-
APP_TRANSACTION__PRIVATE_KEY_GATEWAY=0xcb97ef45d352446a6adf810cf8f63c73ada027160c271da9bb8cfcb3d944d257 # accounts[3] - gateway
7-
5+
APP_GATEWAY__TX_ENGINE__PRIVATE_KEY=0xcb97ef45d352446a6adf810cf8f63c73ada027160c271da9bb8cfcb3d944d257 # accounts[3] - gateway
86

97
# Key URL configuration
108
APP_KEYURL__FHE_PUBLIC_KEY__DATA_ID="fhe-public-key-data-id"
119
APP_KEYURL__FHE_PUBLIC_KEY__URL=http://minio:9000/kms-public/PUB/PublicKey/0400000000000000000000000000000000000000000000000000000000000001
1210
APP_KEYURL__CRS__DATA_ID="crs-data-id"
1311
APP_KEYURL__CRS__URL=http://minio:9000/kms-public/PUB/CRS/0500000000000000000000000000000000000000000000000000000000000001
1412

15-
1613
# Network configuration
17-
APP_NETWORKS__FHEVM__WS_URL="ws://host-node:8545"
18-
APP_NETWORKS__FHEVM__HTTP_URL="http://host-node:8545"
19-
APP_NETWORKS__FHEVM__CHAIN_ID=12345
20-
APP_NETWORKS__FHEVM__RETRY_DELAY=1000
21-
APP_NETWORKS__FHEVM__MAX_RECONNECTION_ATTEMPTS=3
22-
23-
APP_NETWORKS__GATEWAY__WS_URL="ws://gateway-node:8546"
24-
APP_NETWORKS__GATEWAY__HTTP_URL="http://gateway-node:8546"
25-
APP_NETWORKS__GATEWAY__CHAIN_ID=54321
26-
APP_NETWORKS__GATEWAY__RETRY_DELAY=1000
27-
APP_NETWORKS__GATEWAY__MAX_RECONNECTION_ATTEMPTS=3
28-
14+
APP_GATEWAY__BLOCKCHAIN_RPC__WS_URL="ws://gateway-node:8546"
15+
APP_GATEWAY__BLOCKCHAIN_RPC__HTTP_URL="http://gateway-node:8546"
16+
APP_GATEWAY__BLOCKCHAIN_RPC__CHAIN_ID=54321
2917

3018
# Contract addresses
31-
APP_CONTRACTS__DECRYPTION_ORACLE_ADDRESS=0xD0fA6194Db6cfCDF733c64F1F272AeA66e968D3C
32-
APP_CONTRACTS__DECRYPTION_ADDRESS=0x35760912360E875DA50D40a74305575c23D55783
33-
APP_CONTRACTS__INPUT_VERIFICATION_ADDRESS=0x1ceFA8E3F3271358218B52c33929Cf76078004c1
34-
APP_CONTRACTS__USER_DECRYPT_SHARES_THRESHOLD=1
19+
APP_GATEWAY__CONTRACTS__DECRYPTION_ADDRESS=0x35760912360E875DA50D40a74305575c23D55783
20+
APP_GATEWAY__CONTRACTS__INPUT_VERIFICATION_ADDRESS=0x1ceFA8E3F3271358218B52c33929Cf76078004c1
21+
APP_GATEWAY__CONTRACTS__USER_DECRYPT_SHARES_THRESHOLD=1
3522

3623
RUST_LOG=info

test-suite/fhevm/fhevm-cli

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export HOST_VERSION=${HOST_VERSION:-"v0.10.0-3"}
3737

3838
# Other services.
3939
export CORE_VERSION=${CORE_VERSION:-"v0.12.4"}
40-
export RELAYER_VERSION=${RELAYER_VERSION:-"v0.5.0-2"}
40+
export RELAYER_VERSION=${RELAYER_VERSION:-"v0.6.0"}
4141
export TEST_SUITE_VERSION=${TEST_SUITE_VERSION:-"ca47672"}
4242

4343

@@ -75,7 +75,8 @@ function usage {
7575
echo -e " ${PURPLE}./fhevm-cli deploy --build${RESET}"
7676
echo -e " ${PURPLE}./fhevm-cli test input-proof${RESET}"
7777
echo -e " ${PURPLE}./fhevm-cli test user-decryption ${RESET}"
78-
echo -e " ${PURPLE}./fhevm-cli test public-decryption -n staging${RESET}"
78+
echo -e " ${PURPLE}./fhevm-cli test public-decrypt-http-ebool ${RESET}"
79+
echo -e " ${PURPLE}./fhevm-cli test public-decrypt-http-mixed -n staging${RESET}"
7980
echo -e " ${PURPLE}./fhevm-cli test erc20${RESET}"
8081
echo -e " ${PURPLE}./fhevm-cli upgrade coprocessor${RESET}"
8182
echo -e "${BLUE}============================================================${RESET}"

0 commit comments

Comments
 (0)