- A standardised environment using Docker for :
- Running the Xian Node
- Running a Xian Node / Blockchain Data Service (BDS) w/ Postgres DB
- Developing the xian-core / xian-contracting packages
- Running unit tests
- The necessary environments are configured & built by Docker.
xian-contracting
,xian-core
,.cometbft
&.bds.db
folders are mounted from the host machine inside the docker containers.- Any changes to these folders on the host machine are reflected in the docker containers, and visa-versa
- Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose rm get-docker.sh
- Pull xian repositories
make setup
- Clone Contracting
git clone https://github.com/xian-network/contracting
- (optional) : create a new feature branch for making changes to contracting
git checkout -b <new-branch-name>
- Build the environment
make contracting-dev-build
- Start the container shell
make contracting-dev-up
- Run contracting unit tests
pytest contracting/
- When you're finished
- from the test-shell
exit
- from the test-shell
For running a xian-node with postgres for BDS
- Build the xian core environment
make core-dev-build
- Start the xian core container shell
make core-dev-shell
- Initialise CometBFT
make init
- Enter the test shell :
make core-dev-shell
- Run tests:
pytest xian-core/tests/
- Exit the shell when finished
exit
- Build the container :
make core-build
/make core-dev-build
/make core-bds-build
- Enter the shell :
make core-dev-shell
/make core-shell
/make core-bds-shell
- Start the node :
make up
- Stop the node :
make down
- Exit the shell when finished
exit
- Start the container:
make core-dev-up
/make core-up
/make core-bds-up
- Start the node:
make up
- Stop the node:
make down
- Stop the container:
make core-dev-down