Skip to content

Commit bc5253a

Browse files
update README.md
1 parent e0ae5c1 commit bc5253a

File tree

1 file changed

+31
-34
lines changed

1 file changed

+31
-34
lines changed

README.md

+31-34
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dots Application: Distributed Signature Signing
22

3-
### Installations
3+
## Installations
44

55
Install Rust and GMP arithmetic library:
66

@@ -12,68 +12,49 @@ brew install rust
1212
brew install gmp
1313
```
1414

15-
# Setup Nodes
16-
First configure the server nodes in `server_conf.yml`. Any number of servers can be added. The default configuration runs with three servers;
15+
## Setup Nodes
16+
Before you begin, make sure you set up the workspace following the instructions in [dots-server](https://github.com/dots-platform/dots-server). We assume you have a workspace folder named `dots` and you are in this workspace. First, install the repo in this workspace:
1717

18-
Ensure that the application configuration stanza is present in the server config. By default, the client uses the application name `signing`. If this repository is cloned as a sibling of the <https://github.com/dtrust-project/dots-server> repo, the following stanza should work:
18+
```
19+
git clone https://github.com/dots-platform/signing-app.git
20+
```
21+
22+
Configure the server nodes in `dots-server/server_conf.yml`. Any number of servers can be added. The default configuration runs with three servers, so you should change the server config to set up three servers.
1923

24+
Next, add the `signing` application to the config. By default, the following stanza should work:
2025
```yaml
2126
apps:
2227
signing:
2328
path: ../signing-app/target/debug/rust_app
2429
```
2530
26-
# Start Nodes
31+
## Start Nodes
2732
Run the following command in one terminal in the `dots-server` repo.
2833
```bash
29-
./start-n.sh 0 <N-1>
30-
```
31-
32-
Where `<N-1>` is the number of servers minus one, or the index of the last server node.
33-
34-
MacOS has a [known issue](https://github.com/ZenGo-X/multi-party-ecdsa/issues/66) where `rustc` has trouble locating the `gmp` library. You may see something similar to the following error:
35-
36-
```jsx
37-
ld: library not found for -lgmp
38-
clang: error: linker command failed with exit code 1
34+
./start-n.sh 0 2
3935
```
4036

41-
If this happens, link the library manually by running:
42-
43-
```jsx
44-
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
45-
export INCLUDE_PATH=$INCLUDE_PATH:/opt/homebrew/include
46-
```
47-
Now, restart the server.
48-
49-
# Register user
37+
## Register user
5038
Register a user with the given username and password.
5139
```jsx
5240
cargo run --bin client register username password
5341
```
5442

55-
# KeyGen
43+
## KeyGen
5644
We will generate keys for a scheme that has 3 separate parties and a threshold of 1 party. In a new terminal, run:
5745

5846
```jsx
5947
cargo run --bin client keygen username password 3 1 key.json
6048
```
6149
The local key shares will be generated as files:
62-
- In `dtrust/signing/files/node1/key.json`, you will find the key for party 1.
63-
- In `dtrust/signing/files/node2/key.json`, you will find the key for party 2.
64-
- In `dtrust/signing/files/node3/key.json`, you will find the key for party 3.
65-
66-
# Signing
50+
- In `dots-server/files/node{i}/key.json`, you will find the key for party i.
51+
## Signing
6752

6853
We will sign the message `“hello”` by passing in the indices of the parties who attended the signing (`1,2`). In a new terminal, run:
6954

7055
```jsx
7156
cargo run --bin client sign username password 3 1 key.json 1,2 hello
7257
```
73-
The resulting signature will be generated as a file:
74-
- In `dtrust/signing/files/node1/signature.json`, you will find the joint signature.
75-
- In `dtrust/signing/files/node2/signature.json`, you will find the joint signature.
76-
- In `dtrust/signing/files/node3/signature.json`, you will find nothing (not an active party).
7758

7859
The joint signature will look something like this:
7960
```jsx
@@ -155,3 +136,19 @@ The joint signature will look something like this:
155136
"recid":0
156137
}
157138
```
139+
140+
## Troubleshooting
141+
MacOS has a [known issue](https://github.com/ZenGo-X/multi-party-ecdsa/issues/66) where `rustc` has trouble locating the `gmp` library. You may see something similar to the following error:
142+
143+
```jsx
144+
ld: library not found for -lgmp
145+
clang: error: linker command failed with exit code 1
146+
```
147+
148+
If this happens, link the library manually by running:
149+
150+
```jsx
151+
export LIBRARY_PATH=$LIBRARY_PATH:/opt/homebrew/lib
152+
export INCLUDE_PATH=$INCLUDE_PATH:/opt/homebrew/include
153+
```
154+
Now, restart the server.

0 commit comments

Comments
 (0)