Skip to content

Commit

Permalink
Update README to cover v0.4.3 functionality (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx authored May 12, 2024
1 parent 5b3623e commit 527b80b
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,43 @@
# Dkg nodes
[![Test](https://github.com/maxirmx/dkg-nodes/actions/workflows/test.yml/badge.svg)](https://github.com/maxirmx/dkg-nodes/actions/workflows/test.yml)

## Background
This project continues [Implementation of a distributed key generation algorithm (Pedersen 91) in C#](https://github.com/maxirmx/dkg).
Pedersen 91 algorithm is synchronous by its nature. In ```dkg-nodes``` project we provide a wrapper for Pedersen 91 that help to run it in truly asynchronous distributed environment.
Implementation includes two types of entities
* ```dkg node``` that is a participant of distributed key generation algorithm. ```dkg node``` is REST API client and thus does not require any of its resources to be published

* ```dkg service node``` which orchestrates ```dkg nodes```. ```dkg service node``` is REST API server

## Starting dkg node in docker container

__Parameters__
* ```<host>``` -- external address of the system where the node will run
* ```<port>``` -- public port dedicated for the node. Please note that there is current limitation that the port exposed from container shall be the same as public port.
* ```<name>``` -- node public name, optional, defaults to ```<host>:<port>```
* ```<Name>``` -- ```dkg node``` name, optional, defaults to ```<GUID>```
* ```<GUID>``` -- ```dkg node``` GUID, optional. If GUID is not provided, it is autmatically generated upon node start.
Note, that with autogenerated GUID the node is considered "different" for each run, while explicitly provided GUID ensures that the node is considered "the same"
* ```<Service node URL>``` -- fully qualified service node URL
* ```<Polling interval>``` -- delay between attempts to get updated algorithm information or command from ```service node```, milliseconds. Optional, defaults to 3000 (3 seconds)

__Command__
```
docker run --env=DKG_NODE_SERVER_GRPC_PORT=<port> --env=DKG_NODE_SERVER_GRPC_HOST=<host> \
--env=DKG_SERVICE_NODE_URL=http://dkg.samsonov.net:8080 --env=DKG_NODE_SERVER_NAME=<name> \
docker run --env=DKG_SERVICE_NODE_URL=<Service node URL> --env=DKG_NODE_NAME=<Name> \
--env=DKG_NODE_GUID=<GUID> DKG_NODE_POLLING_INTERVAL=<Polling interval> \
--env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
--env=DOTNET_RUNNING_IN_CONTAINER=true --env=DOTNET_VERSION=8.0.4 --env=ASPNET_VERSION=8.0.4 \
--workdir=/app -p <port>:<port> --runtime=runc -d ghcr.io/maxirmx/dkg-node:0.3.0
--workdir=/app --runtime=runc -d ghcr.io/maxirmx/dkg-node:0.4.3
```
__Example__

```
docker run --env=DKG_SERVICE_NODE_URL=http://dkg.samsonov.net:8080 --env=DKG_NODE_NAME=TheNodeAtKreel0 \
--env=DKG_NODE_GUID=ADC13255-AEDB-49F8-869E-153D8A2F0FAE \
--env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
--env=DOTNET_RUNNING_IN_CONTAINER=true --env=DOTNET_VERSION=8.0.4 --env=ASPNET_VERSION=8.0.4 \
--workdir=/app --runtime=runc -d ghcr.io/maxirmx/dkg-node:0.4.3
```
## Service node front end

We provide a simple GUI to control ```dkg service node``` in a [separate project](https://github.com/maxirmx/dkg-frontend).

## Project financing
Initial development of this project was financed by [NarayanaSupramati](https://www.github.com/NarayanaSupramati)

0 comments on commit 527b80b

Please sign in to comment.