Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add disclaimer + makefile #5

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This Makefile is meant to be used by people that do not usually work
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.

.PHONY: dkgcli test clean

GOBIN = ./build/bin
GO ?= latest
GORUN = env GO111MODULE=on go run
GOINSTALL = env GO111MODULE=on go install -v
GOTEST = env GO111MODULE=on go test -v

dkgcli:
$(GOINSTALL) cmd/dkgcli/dkgcli.go
@echo "Done building."
@echo "Run dkgcli to launch the tool."

clean:
env GO111MODULE=on go clean -cache

test:
$(GOTEST) -p 1 ./...
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The data of the operators (ID, IP, Pubkey) can be collected in any way, for exam
### Build

```sh
go build cmd/dkgcli/dkgcli.go
make dkgcli
```

### Server
Expand All @@ -21,7 +21,7 @@ Whenever the server receives a message it directs it to the right instance by th
Start a DKG server

```sh
./dkgcli start-dkg-server --privKey ./examples/server1/encrypted_private_key.json --port 3030 --password 12345678
dkgcli start-dkg-server --privKey ./examples/server1/encrypted_private_key.json --port 3030 --password 12345678

### where
--privKey ./examples/server1/key # path to base 64 encoded RSA private key in PKCS #1, ASN.1 DER form.
Expand All @@ -39,12 +39,18 @@ password: 12345678
port: 3030
```

When using configuration file, run:

```sh
dkgcli start-dkg-server
```

### Initiator of DKG key generation

The initiator uses `ssv-dkg-init` to create the initial details needed to run DKG between all operators.

```sh
./dkgcli init-dkg \
dkgcli init-dkg \
--operatorIDs 1,2,3,4 \
--operatorsInfoPath ./examples/operators_integration.csv \
--owner 0x81592c3de184a3e2c0dcb5a261bc107bfa91f494 \
Expand Down Expand Up @@ -75,6 +81,12 @@ fork: "00000000"
operatorsInfoPath: ./examples/operators_integration.csv
```

When using configuration file, run:

```sh
dkgcli init-dkg
```

### Generate RSA operator key

```sh
Expand Down
7 changes: 0 additions & 7 deletions build_for_testing.sh

This file was deleted.

16 changes: 16 additions & 0 deletions cli/initiator/initiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ var StartDKG = &cobra.Command{
}

logger.Info("DKG protocol finished successfull")
fmt.Println(`
▓█████▄ ██▓ ██████ ▄████▄ ██▓ ▄▄▄ ██▓ ███▄ ▄███▓▓█████ ██▀███
▒██▀ ██▌▓██▒▒██ ▒ ▒██▀ ▀█ ▓██▒ ▒████▄ ▓██▒▓██▒▀█▀ ██▒▓█ ▀ ▓██ ▒ ██▒
░██ █▌▒██▒░ ▓██▄ ▒▓█ ▄ ▒██░ ▒██ ▀█▄ ▒██▒▓██ ▓██░▒███ ▓██ ░▄█ ▒
░▓█▄ ▌░██░ ▒ ██▒▒▓▓▄ ▄██▒▒██░ ░██▄▄▄▄██ ░██░▒██ ▒██ ▒▓█ ▄ ▒██▀▀█▄
░▒████▓ ░██░▒██████▒▒▒ ▓███▀ ░░██████▒▓█ ▓██▒░██░▒██▒ ░██▒░▒████▒░██▓ ▒██▒
▒▒▓ ▒ ░▓ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒░▓ ░▒▒ ▓▒█░░▓ ░ ▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ▒ ▒ ▒ ░░ ░▒ ░ ░ ░ ▒ ░ ░ ▒ ░ ▒ ▒▒ ░ ▒ ░░ ░ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ░ ▒ ▒ ░░ ░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
░ ░

This tool was not audited.
When using distributed key generation you understand all the risks involved with
experimental cryptography.
`)
},
}

Expand Down
2 changes: 1 addition & 1 deletion config/initiator.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
threshold: 3
operatorIDs: [1, 2, 3, 4]
withdrawAddress: "0x0000000000000000000000000000000000000009"
withdrawAddress: "0000000000000000000000000000000000000009"
owner: "0x81592c3de184a3e2c0dcb5a261bc107bfa91f494"
nonce: 4
fork: "00000000"
Expand Down