Useful scripts to run Over Protocol with Docker 🐳
- Check if the latest version of Docker is installed
docker -v
- Export your public IP for discovery
export PUBLIC_IP=$(curl -s ifconfig.me)
echo $PUBLIC_IP
- Initialize data directory and JWT token
make init
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
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.
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.
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 withdeposit_data-
.
The result will be printed like:
Transaction 1:
Transaction Hash: 0x512157ba292f64b048ba449fbc44bacb598dec365e597a954fbb3c43f2cf14ec
Transaction 2:
Transaction Hash: 0x559a315785a069fffd023f03fe9b06d2640a32067042f7a37aff6c63a3cf79db
// ...
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
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) 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
.