Skip to content

Useful scripts to run Over Protocol with Docker 🐳

Notifications You must be signed in to change notification settings

overprotocol/docker-scripts

Repository files navigation

Docker Scripts for Over Protocol

Useful scripts to run Over Protocol with Docker 🐳

Contents

Initial Set Up

  1. Check if the latest version of Docker is installed
docker -v
  1. Export your public IP for discovery
export PUBLIC_IP=$(curl -s ifconfig.me)
echo $PUBLIC_IP
  1. Initialize data directory and JWT token
make init

Run a full node

Run containers using script:

docker compose -f mainnet.yml up -d

To check logs, you can use following command:

docker logs kairos -f  # For inspect the execution client
docker logs chronos -f # For inspect the consensus client

Run a validator node

To run a validator, you must stake your OVER to the network. You can refer to our official docs to send deposit transactions, or use the following guides if you prefer Docker.

Generate validator keys

Our staking-deposit-cli provides a tool to generate validator keys and deposit data. Run the following command to generate them:

docker run -it --rm -v $(pwd)/validator_keys:/app/validator_keys overfoundation/staking-deposit-cli:latest new-mnemonic

deposit_data-*.json and keystore-m_*.json will be generated inside ./validator_keys folder.

Send deposit transactions

You can use our Docker container to send deposit transactions. First, build the staking container:

docker build -t over-staking send-deposit/.

Then run the container with your private key and deposit data:

docker run -v $(pwd)/validator_keys:/app/validator_keys \
  -e PUBLIC_RPC_URL=PUBLIC_RPC_URL \
  -e PRIVATE_KEY=YOUR_PRIVATE_KEY_WITH_0x_PREFIX \
  -e DEPOSIT_DATA_FILE_NAME=YOUR_DEPOSIT_DATA_FILE_NAME \
  over-staking

You need to provide three environment variables:

  • PUBLIC_RPC_URL: Refer to Network Configurations.
  • YOUR_PRIVATE_KEY_WITH_0x_PREFIX: A private key with sufficient funds.
  • YOUR_DEPOSIT_DATA_FILE_NAME: File name that starts with deposit_data-.

The result will be printed like:

Transaction 1:
Transaction Hash: 0x512157ba292f64b048ba449fbc44bacb598dec365e597a954fbb3c43f2cf14ec
Transaction 2:
Transaction Hash: 0x559a315785a069fffd023f03fe9b06d2640a32067042f7a37aff6c63a3cf79db
// ...

Import keystores

docker run -it -v $(pwd)/validator_keys:/keys \
  -v $(pwd)/wallet:/wallet \
  --name validator \
  overfoundation/chronos-validator:latest \
  accounts import \
  --keys-dir=/keys \
  --wallet-dir=/wallet \
  --accept-terms-of-use

Run a validator client

Before running this container, we strongly recommend you to add flag --suggested-fee-recipient to your Over address.

You can run validator client with the current full node by:

docker compose -f mainnet-validator.yml up -d

Check out logs by this command:

docker logs validator -f

Q&A

Q) I would like to run a consensus client without checkpoint sync.

A) The scripts are based on the usage of our official checkpoint sync URL. If you want to sync your consensus client from genesis, you could replace --checkpoint-sync-url flag into --genesis-beacon-api-url.

About

Useful scripts to run Over Protocol with Docker 🐳

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published