You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/getting-started/deployment/client.md
+76-74Lines changed: 76 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,32 +3,49 @@ title: "Client"
3
3
sidebar_position: 1
4
4
---
5
5
6
-
# Client CLI Deployment
6
+
# Client CLI
7
+
Client CLI provides the following functionalities:
7
8
8
-
## Assumptions
9
-
Below instructions assume that the servers have been installed on:
10
-
-`192.168.0.100` (Coordination Server)
11
-
-`192.168.0.101` (Computation Party Server 0)
12
-
-`192.168.0.102` (Computation Party Server 1)
13
-
-`192.168.0.103` (Computation Party Server 2)
9
+
- Sharing ETH Balance
10
+
You can anonymously share your ETH balance at Binance as follows:
11
+
12
+
- Query Computation
13
+
You can retrieve statistical metrics such as mean, median, max, min, and Gini coefficient based on users’ historical ETH balance contributions with the following command:
14
+
15
+
## Configuration
16
+
To configure the `Client CLI`, create a `.env.client_cli` file in the configuration directory.
17
+
18
+
### Default Configuration (Single-Server, Local HTTP)
1. Set PARTY_WEB_PROTOCOL=https and update COORDINATION_SERVER_URL to use https.
28
+
1. Rename the private key and certificate files of your domain as `privkey.pem` and `fullchain.pem` respectively and add them to `ssl_certs` directory at the repository root.
29
+
30
+
- If using multiple servers, update both COORDINATION_SERVER_URL and PARTY_HOSTS with the appropriate IP addresses.
14
31
15
32
## Installation
16
33
There are three ways to install the client CLI:
17
34
18
-
### 1. Using Pre-Built Binaries
19
-
This method relies on trusting pre-compiled binaries. It is the least secure but the simplest and fastest way to install the client.
35
+
### 1. Using Pre-Built Binary
36
+
This method relies on trusting pre-compiled binary. It is the least secure but the simplest and fastest way to install the client.
20
37
21
38
- Bandwidth requirement: Low
22
39
- Downloads a shell script and two binaries (less than 50MB).
23
40
24
41
Note: The binaries are built directly from the source code using public GitHub workflows, defined and available in this repository. This ensures participants can verify the process and confirm binary integrity.
25
42
26
-
27
43
#### Steps
28
-
1.Execute the following:
44
+
1.Download the script to fetch and execute appropriate binary
@@ -57,88 +85,62 @@ This method involves building the client entirely from the source code, offering
57
85
- Downloads one repository and dependencies for a Rust executable and a Python3 script. Additionally, it may require downloading Rust, Python3, and Poetry if not already installed.
58
86
59
87
#### Steps
60
-
1. Clone the `mpc-demo-infra`repository and cd to the repository root:
88
+
1. Clone the repository and cd to the repository root:
1. Follow the instructions in Client CLI Configuration to create a `.env.client_cli` in the repository root directory
86
101
87
-
```
88
-
brew install python
89
-
```
90
-
91
-
5. Install Poetry
92
-
```
93
-
python3 -m venv venv
94
-
source venv/bin/activate
95
-
venv/bin/pip install -U pip setuptools
96
-
venv/bin/pip install poetry
97
-
```
102
+
1. Execute `Client CLI`:
103
+
```bash
104
+
poetry run client-share-data <eth-address><binance-api-key><binance-api-secret>
105
+
```
98
106
99
-
6. Install the MPC demo infrastructure
107
+
## Execution
100
108
101
-
Make sure that you are at the repository root before proceeding.
102
-
```
103
-
poetry install
104
-
```
109
+
1. Get the Binance API key and secret, following the instructions in [Get Your Binance API Key](https://github.com/ZKStats/mpc-demo-infra/blob/main/mpc_demo_infra/client_cli/docker/README.md#step-1-get-your-binance-api-key)
105
110
106
-
## Configuration
107
-
1. Create a `.env.client_cli` file at the repository root with the following contents:
1. Set `PARTY_WEB_PROTOCOL=https` in the `.env.client_cli` file.
116
-
2. Rename the private key and certificate files of your domain as `privkey.pem` and `fullchain.pem` respectively and add them to `ssl_certs` directory at the repository root.
117
115
118
-
3. Move `.env.client_cli` to the appropriate location based on your installation method:
119
-
- Pre-built binaries: The directory where the binaries were downloaded
120
-
- Docker: Under `./mpc_demo_infra/client_cli/docker/` directory
121
-
- Source code: The repository root directory
116
+
### Sharing ETH Balance
117
+
1. Share your ETH balance at Binance with the voucher:
122
118
123
-
## Using Client CLI
124
-
Client CLI provides two main functionalities: sharing data and querying computation.
You can anonymously share your ETH balance at Binance as follows:
125
+
- Using Docker
126
+
Make sure that you are at the repository root before proceeding.
128
127
129
-
1. Get the Binance API key and secret, following the instructions in [Get Your Binance API Key](https://github.com/ZKStats/mpc-demo-infra/blob/main/mpc_demo_infra/client_cli/docker/README.md#step-1-get-your-binance-api-key)
1. Share your ETH balance at Binance with the voucher:
134
-
135
-
```bash
136
-
poetry run client-share-data <eth_address><binance_api_key><binance_api_secret>
137
-
```
135
+
Make sure that you are at the repository root before proceeding.
136
+
```bash
137
+
poetry run client-share-data <eth_address> <binance_api_key> <binance_api_secret>
138
+
```
138
139
139
140
### Query Computation
140
-
You can retrieve statistical metrics such as mean, median, max, min, and Gini coefficient based on users’ historical ETH balance contributions with the following command:
141
+
Make sure that you are at the repository root before proceeding.
Copy file name to clipboardExpand all lines: docs/getting-started/deployment/servers/remote/manually.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Follow the steps below on each server before deploying:
24
24
```
25
25
26
26
## `setup_env.sh` Options
27
-
The `setup_env.sh` script can take multiple options to set up the environment for running multiple servers. For example, if you intend to run `Coordination Server`, `Data Compumer API Server` and `Notary Server` on one server, you can execute the following:
27
+
The `setup_env.sh` script can take multiple options to set up an environment for running multiple servers. For example, if you intend to run `Coordination Server`, `Data Compumer API Server` and `Notary Server` on one server, you can execute the following:
0 commit comments