Giter VIP home page Giter VIP logo

network-docker-containers's Introduction

LUKSO Docker containers

This repo provides a base template to use Docker images to run LUKSO node validator nodes).

Note: it has been tested on Ubuntu 22.04. It won't work on macOS (because of network_mode: host).

LUKSO network configs are fetched from: lukso-network/network-configs.

It is provided "as is" and you are encouraged to adjust the configuration files for your own needs. The most important configuration files are the genesis files:

  • genesis.ssz
  • genesis.json

⚠️ Important: for mainnet launch, you have to select the genesis files with the initial supply you want to have (cf. step 6 below):

  • genesis_32.ssz, genesis_42.ssz or genesis_100.ssz
  • genesis_32.json, genesis_42.json or genesis_100.json

They can be found in our lukso-network/network-configs repo.

For more information, check the LUKSO Docs.

How to use

  1. Log into your node.

  2. Install docker. Here is a tutorial for Ubuntu 22.04

  3. Clone the repo.

git clone [email protected]:lukso-network/network-docker-containers.git
cd network-docker-containers

⚠️ NOTE: if you want to support multiple networks, it is recommended to clone this repo again and work from different directories. This is to avoid mixing data and keystore folders.

  1. Download the config files from lukso-network/network-configs repo.
mkdir configs
wget -O ./configs/genesis.ssz https://raw.githubusercontent.com/lukso-network/network-configs/main/mainnet/shared/genesis_42.ssz
wget -O ./configs/genesis.json https://raw.githubusercontent.com/lukso-network/network-configs/main/mainnet/shared/genesis_42.json
wget -O ./configs/config.yaml https://raw.githubusercontent.com/lukso-network/network-configs/main/mainnet/shared/config.yaml

⚠️ NOTE: The example above is for the 42M LYX supply. If you want to use another supply, replace 42 with 35 or 100 in the commands above.

  1. IMPORTANT: Create .env file and adjust the values in .env file (node name, fee recipient address, etc.).
cp .env.example .env
  1. Copy your keystore-xxx.json files in the ./keystores/ folder.

  2. Write your keystore password in a temporary txt file:

echo "yourPassword" > /tmp/secrets/password.txt

NOTE 1: This password will also be used for the validator wallet.

NOTE 2: You can set your keystore password differently by changing the configuration in the docker-compose.yml file for the prysm_validator_import service.

  1. Start the services:
docker compose up

# To run in the background, use detached mode with -d flag

Erigon

An example docker compose file for erigon is provided in docker-compose.erigon.yml. It only supports erigon execution engine. You will need to run an execution engine for your node to work properly. This file is provded "as is" and you can reuse it in the main docker-compose.yml file if you wish to use erigon client instead of geth.

Useful commands

Check the status of the containers:

docker ps

# CONTAINER ID   IMAGE                                       COMMAND                  CREATED              STATUS                         PORTS                    NAMES
# 1ffeefcbcfb4   prysmaticlabs/prysm-validator:v4.0.3        "/app/cmd/validator/…"   About a minute ago   Up About a minute                                       prysm_validator
# 1dff26d8026a   prysmaticlabs/prysm-beacon-chain:v4.0.3     "/app/cmd/beacon-cha…"   About a minute ago   Up About a minute                                       prysm_beacon
# b3e2c814ddb5   ethereum/client-go:v1.11.6                  "geth --config /conf…"   About a minute ago   Up About a minute                                       geth

Check the logs to make sure everything is running fine:

docker compose logs -f geth

# You can see the logs of each service:
# docker compose logs -f prysm_validator
# ...

Monitoring

We provide another repo which can help you set up monitoring for your node: lukso-network/network-docker-monitoring.

Execution stats

To add your node on the execution stats page, fill out this form to receive the secret.

You will then need to update these values in the .env file:

NODE_NAME=myNodeName
ETH_STATS_SECRET=xxx

Images

This repo is using the following docker images:

Resources

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.