Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit ec8a429

Browse files
committed
update client doc
1 parent e355510 commit ec8a429

File tree

1 file changed

+53
-50
lines changed

1 file changed

+53
-50
lines changed

docs/getting-started/deployment/client.md

Lines changed: 53 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,40 @@ NOTARY_SERVER_HOST=127.0.0.1
3333
## Installation
3434
There are three ways to install the client CLI:
3535

36-
### 1. Using Pre-Built Binary
36+
### 1. From Source Code
37+
This method involves building the client entirely from the source code, offering the most security through full transparency and control.
38+
39+
- Bandwidth requirement: Moderate
40+
- 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.
41+
42+
#### Steps
43+
1. Clone the repository and cd to the repository root:
44+
```bash
45+
git clone https://github.com/ZKStats/mpc-demo-infra.git
46+
cd mpc-demo-infra
47+
```
48+
49+
1. Set up the environment:
50+
51+
```bash
52+
./setup_env.sh --client
53+
```
54+
55+
### 2. Using Pre-Built Binary
3756
This method relies on trusting pre-compiled binary. It is the least secure but the simplest and fastest way to install the client.
3857

3958
- Bandwidth requirement: Low
4059
- Downloads a shell script and two binaries (less than 50MB).
4160

4261
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.
43-
4462
#### Steps
4563
1. Download the script to fetch and execute appropriate binary
4664
```
4765
curl -L -o share-data.sh https://github.com/ZKStats/mpc-demo-infra/releases/latest/download/share-data.sh
4866
```
4967
1. Follow the instructions in Client CLI Configuration to create an appropriate `.env.client_cli` file in the current directory.
5068

51-
### 2. Using Docker
69+
### 3. Using Docker
5270
This method builds the client in an isolated environment using publicly available images, providing moderate security.
5371

5472
- Bandwidth requirement: Very High
@@ -73,75 +91,60 @@ Note: The Dockerfile used for building the client is included in this repository
7391
./build.sh
7492
```
7593

76-
1. Execute `Client CLI`:
77-
```
78-
./share-data.sh <eth-address> <binance-api-key> <binance-api-secret>
79-
```
80-
81-
### 3. From Source Code
82-
83-
This method involves building the client entirely from the source code, offering the most security through full transparency and control.
84-
85-
- Bandwidth requirement: Moderate
86-
- 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.
87-
88-
#### Steps
89-
1. Clone the repository and cd to the repository root:
90-
```bash
91-
git clone https://github.com/ZKStats/mpc-demo-infra.git
92-
cd mpc-demo-infra
93-
```
94-
95-
1. Set up the environment:
94+
## Execution
9695

97-
```bash
98-
./setup_env.sh --client
99-
```
96+
### Sharing ETH Balance
97+
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)
10098

10199
1. Follow the instructions in Client CLI Configuration to create a `.env.client_cli` in the repository root directory
102100

103101
1. Execute `Client CLI`:
104-
```bash
105-
poetry run client-share-data <eth-address> <binance-api-key> <binance-api-secret>
106-
```
107-
108-
## Execution
109102

110-
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)
103+
- Using Source Code
111104

112-
1. Get a voucher from the Coordination Server
113-
```bash
114-
poetry run get-api-key
115-
```
105+
Make sure that you are at the repository root before proceeding.
116106

117-
### Sharing ETH Balance
118-
1. Share your ETH balance at Binance with the voucher:
107+
- Single-Server Local Configuration
108+
1. Get the container ID of the Notary Server container:
109+
```bash
110+
CONTAINER=$(docker ps | grep notary | awk '{print $1}'
111+
```
112+
1. Copy `notary.crt` from the container:
113+
```bash
114+
docker cp $CONTAINER:/root/tlsn/notary/target/release/fixture/tls/notary.crt .
115+
```
116+
1. Follow the instructions in Client CLI Configuration to create a `.env.client_cli` in the repository root directory
117+
118+
1. Execute `Client CLI`:
119+
```bash
120+
poetry run client-share-data <eth-address> <binance-api-key> <binance-api-secret> --notary-crt-path $(pwd)/notary.crt
121+
```
122+
- Multi-Server Configuration
123+
```bash
124+
poetry run client-share-data <eth-address> <binance-api-key> <binance-api-secret>
125+
```
119126
120127
- Using Pre-Built Binary
121-
```
128+
```bash
122129
chmod +x share-data.sh
123130
./share-data.sh <eth-address> <binance-api-key> <binance-api-secret>
124131
```
125132
126133
- Using Docker
127134
Make sure that you are at the repository root before proceeding.
128135
129-
```
136+
```bash
130137
cd ./mpc_demo_infra/client_cli/docker/
131138
./share-data.sh <eth-address> <binance-api-key> <binance-api-secret>
132139
```
133140
134-
- Using Source Code
135-
136-
Make sure that you are at the repository root before proceeding.
137-
```bash
138-
poetry run client-share-data <eth_address> <binance_api_key> <binance_api_secret>
139-
```
140-
141141
### Query Computation
142142
Make sure that you are at the repository root before proceeding.
143143
144-
```bash
145-
poetry run client-query
146-
```
144+
1. Follow the instructions in Client CLI Configuration to create a `.env.client_cli` in the repository root directory
145+
146+
1. Execute `Client CLI`:
147+
```bash
148+
poetry run client-query
149+
```
147150

0 commit comments

Comments
 (0)