MacOS:
# The easiest and recommended way to get Docker and
# Docker Compose is to install Docker Desktop here:
https://docs.docker.com/desktop/install/mac-install/
Ubuntu:
# Follow the below link to install docker on ubuntu
https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
# Follow the below link to install standalone docker compose
https://docs.docker.com/compose/install/other/
Detailed instruction: see the Makefile
in the root of the repo
To start a single local node (Not Recommended)
make build-docker-node && make run-local-node
To start 4 node cluster
This will start a 4 node sei chain cluster as well as having the oracle price feeder run for each node.
# If this is the first time or you want to rebuild the binary:
make docker-cluster-start
# If you have run docker-cluster-start and build/seid exist,
# you can skip the build process to quick start by:
make docker-cluster-start-skipbuild
All the logs and genesis files will be generated under the temporary build/generated folder.
# To monitor logs after cluster is started
tail -f build/generated/logs/seid-0.log
To ssh into a single node
# List all containers
docker ps -a
# SSH into a running container
docker exec -it [container_name] /bin/bash
Requirement: Follow the above steps to start a 4 node docker cluster before starting any state sync node
# Be sure to start up a 4-node cluster before you start a state sync node
make docker-cluster-start
# Wait for at least a few minutes till the latest block height exceed 500 (this can be changed via app.toml)
seid status |jq
# Start up a state sync node
make run-rpc-node
One of the fanciest thing of using docker is fast iteration. Here we support:
- Being able to make changes locally and start up the chain to see the immediate impact
- Being able to make changes to local dependency repo (Cosmo SDK/Tendermint) and start the chain with the latest changes without bumping or release any binary version
In order to make local debugging work, you can follow these steps:
# Clone your dependency repo and put them under the same path as sei-chain
cd sei-chain
cd ../
git clone https://github.com/sei-protocol/sei-tendermint.git
git clone https://github.com/sei-protocol/sei-cosmos.git
# Modify go.mod file to point to local repo, must use the exact same path as below:
go mod edit -replace github.com/cosmos/cosmos-sdk=../sei-cosmos
go mod edit -replace github.com/tendermint/tendermint=../sei-tendermint
# You are good to go now! Make changes as you wish to any of the dependency repo and run docker to test it out.
If you are interested in building with Sei Network: Email us at team@seinetwork.io DM us on Twitter https://twitter.com/SeiNetwork