Skip to content

stakewise/dvt-relayer

 
 

Repository files navigation

DVT-relayer

DVT Relayer is a service providing validators' registration data to Stakewise v3-operator in DVT setup.

As a general introduction in DVT read the article on Ethereum web-site. For technical details see Obol docs or SSV docs.

Generating DV keystores

Distributed validator (DV) keystores are used:

  • on DVT sidecars
  • for Relayer testing

The easiest way to generate DV keys for testing is Obol launchpad. Works for Hoodi, Mainnet and Gnosis. Select appropriate network. Then select "Create a distributed validator alone". Follow instructions. Use vault address as withdrawal address.

In production environment:

  • Validators' keystores should be created via distributed key generation (DKG) procedure
  • DVT Relayer should not have access to DV keystores.

Setup

  1. Install poetry
  2. Install dependencies: poetry install
  3. cp .env.example .env
  4. Fill .env file with appropriate values

Run from sources

  1. poetry shell
  2. export PYTHONPATH=.
  3. python src/app.py

Run with Docker

export DVT_RELAYER_VERSION=v1.0.0

Pull the image:

docker pull europe-west4-docker.pkg.dev/stakewiselabs/public/dvt-relayer:$DVT_RELAYER_VERSION

You can also build the image from source:

docker build --pull -t europe-west4-docker.pkg.dev/stakewiselabs/public/dvt-relayer:$DVT_RELAYER_VERSION .

Run the container, mounting a directory with your .env and key files:

docker run --rm -ti \
  --env-file /path/to/.env \
  -v /path/to/data:/data \
  -p 8000:8000 \
  europe-west4-docker.pkg.dev/stakewiselabs/public/dvt-relayer:$DVT_RELAYER_VERSION

Set paths in .env to point inside the container, e.g.:

VALIDATORS_MANAGER_KEY_FILE=/data/validators-manager-key.json
VALIDATORS_MANAGER_PASSWORD_FILE=/data/validators-manager-password.txt
PUBLIC_KEYS_FILE=/data/public_keys.txt

Test

Running the whole cluster of DVT sidecars locally may be cumbersome. For testing purpose single sidecar may work on behalf of several DVT operators. See DVT sidecar readme for details.

DVT sidecar:

  1. Loads distributed validator (DV) keystores.
  2. Retrieves validator data from the Relayer.
  3. Submits deposit signature shares and exit signature shares to the Relayer on behalf of DVT operators.

About

The relayer for the v3-operator service to register DVT validators that used DKG to generate the private keys.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors