Quickstart

System Requirements

Required Free Space: 20 GB RAM: 8GB Minimum,16 GB Minimum for Windows Setup. CPU: 8 Core CPU Minimum, 16 Core CPU Recommended OS: Linux (Ubuntu Preferred) Version: 20.04 and Above Mac(Apple Silicon or Intel) Version: Big Sur and Above Windows(Requires WSL2 ) Version: Windows 11 or 10 version 2004 and above.

Note: Before proceeding further with the guide, setting up Windows Subsystem LInux(WSL) on Windows requires additional steps which can be found here.

Prerequisites

Docker

Docker is available for Linux, macOS and Windows platforms. Find instructions for the preferred operating system here. Note: Docker Desktop for Windows provides WSL 2 backend support so you can work in a Linux-based development environment and build ,run linux-based containers. Enable that by following the instructions here before proceeding further.

Go

Go installation instructions for different operating systems can be found here .

Download the Script

Deployment Process

  1. Create a New Directory: Start by creating a dedicated folder to store your deployment script.

mkdir chaindeploy
  1. Open Terminal and Set Execution Permissions: Grant execute permissions to the deployment script using the following command:

chmod +x deployment.sh
  1. Initiate Deployment: Run the deployment script using the command:

./deployment.sh
  1. Configure for Local or Server: The script will prompt you to specify whether you are deploying for a local environment or a server. Choose the option that aligns with your intended deployment scenario.

ubuntu@Züs:~/chaindeploy$ ./deployment.sh
+ echo 'Choose deployment option:'
Choose deployment option:
+ echo '1. Local'
1. Local
+ echo '2. Server'
2. Server
+ read -p 'Enter your choice (1/2): ' choice
Enter your choice (1/2): 1
  1. Directory Creation: The script will create a dedicated directory named 'zus-repos' and proceed to clone all the required repositories inside this folder.

  2. Local Deployment Configuration: If you opt for local deployment, the script will make specific configuration changes to the DNS settings in the configuration file(config.yaml) created at $HOME/.zcn directory path. For blockchain network to work seamlessly in a local environment, the block worker URL in config.yaml is set to http://198.18.0.98:9091/dns automatically.

  3. Note: During the deployment the script at Building Mocks in Progress stage will take 5-10 mins(depending on internet connection). Let that complete and not terminate the process in between until Mocks Build completed is displayed. See code snippet for reference:

+ echo 'Build-Mocks in progress'
Build-Mocks in progress
+ make build-mocks
+ echo ' Build-Mocks completed'
 Build-Mocks completed
  1. Deployment Success: Upon successful execution of the script, you will have the following Züs components as docker containers deployed on your local machine:

  • 2 Sharders that stores the blockchain and other related data, such as the event database. They also support a query REST API.

  • 3 Miners for producing blocks.

  • 6 Blobbers/Validators for storing user data files .

  • 1 0dns for communication between miner sharder and blobbers.

  1. Follow Step 8 from here to create an allocation on local Züs blockchain network and complete the deployment process.

  2. To understand the working of the deployment script, please refer to the "Understanding the Tech" section.

  3. Facing any errors? Try Redeploying the network.

Redeploying the network

To rebuild and restart the sharders miners and blobber containers with no previous file and processes:

Stop all the running containers using the command below.

docker stop $(docker ps -a -q)

Clean up Docker environment for new Züs deployment .

docker system prune -a 

Delete the created zus-repos directory by the script manually.

sudo rm -r zus-repos

Rerun the deployment script

./deployment.sh

Last updated