-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change sever to operator and clint to initiator * update readme about operator`s priv key * change plaintext password to file * add logs about message signature verification * change fork hex to name * add identity to initiator * add security notes to readme * update flags + docker * rename project * readme update * fix tests + work on comments * add test of initiator identity * update test operator * add linter + fixes * comment fixes * update configs and paths to store * readme update * add .dockerignore * add logging to file same as ssv * update board logger * readme update * - Break dkg function into smaller functions - add tests for these funcs - fix logs * update tests * update tests * add unhappy flow * add threshold tests * clean up * fix makefile * add more threshold checks for 4 ops * groom log reports * minor fix * add test shares order ar ssv payload * move NewID to crypto * remove VerifyFunc * move VerifyInitiatorMessage to state * removed rsa priv from local owner * logs path * change payload strcuture * fix payload to v4 * correct help for flag * set default nonce to 0 * fixed integration tests to new format * added single operator/initiator to Makefile * change withdrawl address to be ETH1 * fix test to look for the ETH1 addr * add hexToAddress function with error handling * add error wrapper at state * fix operator test * - change ssvpayload name to keyshares - change deposit and keyshares results param names * change error to show bad sigs --------- Co-authored-by: y0sher <[email protected]>
- Loading branch information
1 parent
97e1ff6
commit 214ec16
Showing
75 changed files
with
3,592 additions
and
4,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea/ | ||
bin/ | ||
bin/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
FROM golang:1.20 | ||
FROM golang:1.20-alpine3.17 | ||
RUN apk add build-base | ||
|
||
WORKDIR / | ||
|
||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
RUN go mod download && go mod verify | ||
|
||
COPY ./ ./ | ||
|
||
# Build | ||
RUN CGO_ENABLED=1 GOOS=linux go build -o /app /cmd/dkgcli/dkgcli.go | ||
RUN CGO_ENABLED=1 GOOS=linux go build -o /app /cmd/ssv-dkg/ssv-dkg.go | ||
|
||
|
||
EXPOSE 3030 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,45 +2,79 @@ | |
# with Go source code. If you know what GOPATH is then you probably | ||
# don't need to bother with make. | ||
|
||
.PHONY: dkgcli test clean build docker-build | ||
.PHONY: install clean build test docker-build-image docker-operators docker-initiator mockgen-install lint-prepare lint | ||
|
||
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 | ||
# Name of the Go binary output | ||
BINARY_NAME=./bin/dkgcli | ||
BINARY_NAME=./bin/ssv-dkg | ||
# Docker image name | ||
DOCKER_IMAGE=ssv-dkg-tool | ||
DOCKER_IMAGE=ssv-dkg | ||
|
||
install: | ||
$(GOINSTALL) cmd/dkgcli/dkgcli.go | ||
$(GOINSTALL) cmd/ssv-dkg/ssv-dkg.go | ||
@echo "Done building." | ||
@echo "Run dkgcli to launch the tool." | ||
@echo "Run ssv-dkg to launch the tool." | ||
|
||
clean: | ||
env GO111MODULE=on go clean -cache | ||
|
||
# Recipe to compile the Go program | ||
build: | ||
@echo "Building Go binary..." | ||
go build -o $(BINARY_NAME) ./cmd/dkgcli/dkgcli.go | ||
go build -o $(BINARY_NAME) ./cmd/ssv-dkg/ssv-dkg.go | ||
|
||
# Recipe to run tests | ||
test: | ||
@echo "running tests" | ||
go test -p 1 ./... | ||
go test -v -p 1 ./... | ||
|
||
# Recipe to build the Docker image | ||
docker-build: | ||
docker-build-image: | ||
@echo "Building Docker image..." | ||
docker build -t $(DOCKER_IMAGE) . | ||
|
||
docker-servers: | ||
@echo "Running servers in docker demo" | ||
docker-compose up --build server1 server2 server3 server4 | ||
docker-demo-operators: | ||
@echo "Running operators in docker demo" | ||
docker-compose up --build operator1 operator2 operator3 operator4 | ||
|
||
docker-client: | ||
@echo "Running client in docker demo" | ||
docker-compose up --build client | ||
docker-demo-initiator: | ||
@echo "Running initiator in docker demo" | ||
docker-compose up --build initiator | ||
|
||
docker-operator: | ||
@echo "Running operator docker, make sure to update ./examples/config/operator1.example.yaml" | ||
docker run -d \ | ||
--name svv-dkg-operator \ | ||
-p 3030:3030 \ | ||
-v $(shell pwd)/examples:/data \ | ||
--entrypoint /app \ | ||
$(DOCKER_IMAGE):latest \ | ||
start-operator --configPath /data/config/operator1.example.yaml | ||
|
||
docker-initiator: | ||
@echo "Running initiator docker, make sure to update ./examples/config/initiator.example.yaml" | ||
docker run -d \ | ||
--name ssv-dkg-initiator \ | ||
-v $(shell pwd)/examples:/data \ | ||
--entrypoint /app \ | ||
$(DOCKER_IMAGE):latest \ | ||
init --configPath /data/config/initiator.example.yaml | ||
|
||
mockgen-install: | ||
go install github.com/golang/mock/[email protected] | ||
@which mockgen || echo "Error: ensure `go env GOPATH` is added to PATH" | ||
|
||
lint-prepare: | ||
@echo "Preparing Linter" | ||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s latest | ||
|
||
lint: | ||
./bin/golangci-lint run -v ./... | ||
@if [ ! -z "${UNFORMATTED}" ]; then \ | ||
echo "Some files requires formatting, please run 'go fmt ./...'"; \ | ||
exit 1; \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.