This repository contains docker helpers utility for go-bitsong
- Run the following commands::
git clone https://github.com/bitsongofficial/docker.git
cd docker
- 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
bitsong
andosmosis
:
make start
Your environment now contains:
- go-bitsong RPC node running on
tcp://localhost:26657
- LCD running on http://localhost:1317
- osmosis RPC node running on
tcp://localhost:27657
- LCD running on http://localhost:1427
Stop all
(and retain chain data):
make stop
Stop all
(and delete chains data):
make restart
You can modify the node configuration of your validator in the config/config.toml
and config/app.toml
files.
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
You can change the genesis.json
file by altering config/genesis.json
. To load your changes, restart your LocalOsmosis.
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 |
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:
- 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
- Log out and log back in so that your group membership is re-evaluated.
More details can be found here.