Skip to content

bitsongofficial/docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker 4 BitSong

This repository contains docker helpers utility for go-bitsong

Prerequisites

Install Docker Utility

  1. Run the following commands::
git clone https://github.com/bitsongofficial/docker.git
cd docker
  1. Make sure your Docker daemon is running in the background and docker-compose is installed.

If running on linux, you can install these tools with the following commands:

  • docker
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt install docker.io -y
  • docker-compose
sudo apt install docker-compose -y

Start, stop, and reset bitsong and osmosis

  • Start bitsong and osmosis:
make start

Your environment now contains:

Stop all (and retain chain data):

make stop

Stop all (and delete chains data):

make restart

Modifying node configuration

You can modify the node configuration of your validator in the config/config.toml and config/app.toml files.

Pro tip: Speed Up Block Time

To decrease block time, edit the [consensus] parameters in the config/config.toml file, and specify your own values.

The following example configures all timeouts to 200ms:

##### consensus configuration options #####
[consensus]

wal_file = "data/cs.wal/wal"
- timeout_propose = "3s"
- timeout_propose_delta = "500ms"
- timeout_prevote = "1s"
- timeout_prevote_delta = "500ms"
- timeout_precommit_delta = "500ms"
- timeout_commit = "5s"
+ timeout_propose = "200ms"
+ timeout_propose_delta = "200ms"
+ timeout_prevote = "200ms"
+ timeout_prevote_delta = "200ms"
+ timeout_precommit_delta = "200ms"
+ timeout_commit = "200ms"

Additionally, you can use the following single line to configure timeouts:

sed -E -i '/timeout_(propose|prevote|precommit|commit)/s/[0-9]+m?s/200ms/' config/config.toml

Modifying genesis

You can change the genesis.json file by altering config/genesis.json. To load your changes, restart your LocalOsmosis.

Accounts

Docker is pre-configured with one validator.

Account Address Mnemonic
validator bitsong1gws6wz8q5kyyu4gqze48fwlmm4m0mdjz0620gw
osmo12smx2wdlyttvyzvzg54y2vnqwq2qjateuf7thj
human visual corn anchor pond buffalo limit radar used winner orphan taxi library warm finger pattern doctor disagree ask minimum frequent electric foam program

Common issues

Docker permissions problems

In case you get permission denied while trying to run make start

make start

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

Check that the docker engine is running:

sudo systemctl status docker

If not:

# Configure Docker to start on boot
sudo systemctl enable docker.service

# Start docker service
sudo systemctl start docker.service

Ensure that the current user is in the docker group:

  1. Create the docker group and add your user
# Create the docker group
sudo groupadd docker

# Add your user to the docker group.
sudo usermod -aG docker $USER
  1. Log out and log back in so that your group membership is re-evaluated.

More details can be found here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published