ObolNetwork / charon-distributed-validator-cluster

Run a Distributed Validator Cluster locally using docker-compose

Home Page:https://docs.obol.tech/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

generate manifest and p2p keys on startup

corverroos opened this issue · comments

Problem to solve

Currently, the cluster manifest and p2pkeys are hardcoded and checked into the repository. This is obviously not great.

Proposed solution

Generate the cluster manifest and p2pkeys on startup:

  • Since the nodes 1-n already wait for node0 be up before starting, they do not need to change.
  • Add a bool environment flag to the run script, BOOTSTRAP and provide it to node0.
  • If the flag is enabled, then run charon gen-simnet command first to generate a 3-of-4 cluster (to temp dir).
  • Copy the resulting manifest and p2pkeys into the correct folders
  • Continue with run script.

Delete the manifest.json and p2pkey files from the repo.