Skip to content

Configure zbox network

Harshit Mehndiratta edited this page Oct 31, 2023 · 9 revisions

Configuration for the Züs network by default is stored in network/config.yaml file of the zbox github repo which we will copy to a new config.yaml file in our local system. The config.yaml file and all the other zbox component information will be stored in a .zcn folder located in the home directory of the file system.

  1. Open terminal and make a new .zcn folder in the home linux and mac directory using the command below:
mkdir $HOME/.zcn

Note: For windows create a folder named .zcn at C:\Users\<windows_username>path.

  1. Copy contents of config.yaml from zboxcli repo network directory to a new config.yaml file using the command below:
cp network/config.yaml $HOME/.zcn/config.yaml
  1. To verify whether the config.yaml exists and network configuration is stored properly. Check the config.yaml details using the command
cat config.yaml

Response:

---
block_worker: https://demo.zus.network/dns
signature_scheme: bls0chain
min_submit: 50
min_confirmation: 50
confirmation_chain_length: 3
max_txn_query: 5
query_sleep_time: 5
# # OPTIONAL - Uncomment to use/ Add more if you want
# preferred_blobbers:
#   - http://one.devnet-0chain.net:31051
#   - http://one.devnet-0chain.net:31052
#   - http://one.devnet-0chain.net:31053

Zbox connects to the Züs network using the block_worker field. These network details are automatically fetched from the blockWorker's network API. Preferred Blobbers are also present which you can uncomment for using specified storage providers for handling your files.

Use custom miner/sharder

As indicated in the build guides above, a ./zcn folder is created specifically for storing configuration files used by zboxcli. Below is a sample network configuration file.

  ---
  block_worker: https://demo.zus.network/dns
  signature_scheme: bls0chain
  min_submit: 50 # in percentage
  min_confirmation: 50 # in percentage
  confirmation_chain_length: 3

A blockWorker is used to connect to the network instead of giving network details directly, It will fetch the network details automatically from the blockWorker's network API. By default it will use the miner/sharder values which it will get using the block_worker_url/network. In case you want to override those values and give custom miner/sharder to use, You have to create a network.yaml in your ~/.zcn (config) folder and paste the miner/sharder values in format below.

miners:
  - http://localhost:7071
  - http://localhost:7072
  - http://localhost:7073
sharders:
  - http://localhost:7171

Note: This is helpful for the users deploying a test Züs network locally. Instructions are available here.

Clone this wiki locally