Step 8: Creating an Allocation on Blobber
To create storage space on the blobber we have to use the zboxcli to interface with the blockchain.
Install zwalletcli ,create wallet(if you have not created one) and get test tokens into your wallet using the command below:
On Successful response:
Check Token balance in zwallet using the
Response-
Note : Before Proceeding further at least have 3 ZCN balance in the wallet. The tokens are required for staking before creating an allocation. Run ./zwallet faucet --methodName pour --input "{Pay day}"
command three times to get 3 ZCN tokens.
4. Once the wallet has an available balance, you have to lock tokens into stake pool .To lock tokens into stake pool you need a id of blobbers to stake which can be fetched using the zboxcli command
The sample response will show all the active blobbers:
5. Export Blobber IDs to variables.
6.Add tokens to the stake pools of all the active blobbers to allow them to accept allocations.
Sample Response:
7. Once the tokens are locked into stake pool you can create and fun storage allocation by using the zbox newallocation
command. To understand the syntax type
This will output the mandatory and optional flags that need to be added with the newallocation
command.
7.For getting started we can create a basic allocation with 1 data
and parity
shard. Lock some tokens using lock float
variable(for example 0.5) .
The complete command would be :
Successful Response will create an allocation with allocation ID:
Note: For creating allocation with more data and parity shards, run more blobbers. The sum of data
and parity
shards should be equal or smaller than the number of running blobbers.
8.If you have successfully created an allocation verify it by running
You will see your allocation ID listed with the specified configuration:
Response:
Notes:
If you are not able to create allocation and getting "transaction not found on any of the sharders", check error causes in zbox Tips and Troubleshooting Section.
To upload files on an allocation, modify allocation and use advanced features check zboxcli documentation.
Last updated