Züs
Search
K

Step 5 : Create a wallet using zwalletcli

This part assumes that your sharder, and miner containers are perfectly running. In this part, we will create a wallet using zwalletcli and then start the blobber using the wallet id.
  1. 2.
    Once the wallet is created . Navigate back to the .zcn folder
cd $HOME/.zcn/
  1. 3.
    Open the wallet.json file. It should be similar to the similar to the output below:
{"client_id":"xxxxxxxxxxxxxxxxxxxxxxxx",
"client_key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"keys":[{"public_key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
"private_key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}],
"mnemonics":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
"version":"1.0","date_created":"xxxxxxxxxxxxxxxxxxxxxx"}
  1. 4.
    Copy the wallet client_id value and paste it into blobbers and validators settings. These are found in blobber/config directory.
  2. 5.
    Navigate to the blobber config directory :
cd blobber/config
You will see blobber and validation files listed
~/blobber/config$ ls
0chain_blobber.yaml 0chain_validator.yaml localhost.crt localhost.key
  1. 6.
    Open both the configuration files 0chain_blobber.yaml 0chain_validator.yaml and edit the delegate_wallet value with client_id copied from wallet. Here is a sample configuration file below:
# [configurations above]
# for testing
# 500 MB - 536870912
# 1 GB - 1073741824
# 2 GB - 2147483648
# 3 GB - 3221225472
capacity: 1073741824 # 1 GB bytes total blobber capacity
read_price: 0.01 # token / GB for reading
write_price: 1.00 # token / GB for writing
# min_lock_demand is value in [0; 1] range; it represents number of tokens the
# blobber earned even if a user will not read or write something
# to an allocation; the number of tokens will be calculated by the following
# formula
#
# allocation_size * write_price * min_lock_demand
#
min_lock_demand: 0.1
# max_offer_duration restrict long contacts where,
# in the future, prices can be changed
max_offer_duration: 744h # 31 day
challenge_completion_time: 1m # 15m # duration to complete a challenge
# delegate wallet for all rewards, if it's empty, then blobber ID used
delegate_wallet: 'b145bf241eab00c9865a3551b18028a6d12b3ef84df8b4a5c317c8d184a82412'
  1. 7.
    Create a network.yaml file in your ~/.zcn directory and add the following lines of code
    1
    miners:
    2
    - http://localhost:7071
    3
    - http://localhost:7072
    4
    - http://localhost:7073
    5
    sharders:
    6
    - http://localhost:7171