0CHAIN
Search…
Deploying the 0chain on Linux
0Chain is a high-performance decentralized storage network that offers privacy, GDPR compliance, tokenization, and security features for mission-critical applications
0chain provides an easy-to-scale infrastructure through Miners, Sharders, and Blobbers that perform several duties necessary for functional blockchain and storage systems.
Miners
Miners build, verify, notarize, and finalize blocks based on consensus. Miners need to store wallet and smart contract states on their ledger to ensure submitted transactions are executed correctly.
Sharders
Sharder store blocks, keep records of View Changes through magic blocks and respond to queries from users. Anyone joining the network queries the Sharders to determine the active members of the blockchain.
Blobbers
They store data of any size and provide a single source of truth for that data.

Deploying 0chain Locally: Overview

At a high level, the steps you need to carry out in order to deploy and test a 0chain network locally include:
    Step 1: Set up your project — Install the prerequisites to configure and run 0chain network
    Step 2: Setup a network for the 0chain components
    Step 3: Initialize and build the 0chain components.
    Step 4: Start the Sharder and Miner Containers.
    Step 5: Register a Wallet using zboxcli.
    Step 6: Start the Blobber Containers.
    Step 7: Validate the 0chain deployment.
    Step 8: Creating an Allocation on Blobber.

Step 1: Set up the project

System Requirements

Free Space: 50 GB Required Linux (Ubuntu Preferred) Ram: 4GB Minimum,8 GB Recommended CPU: 4 CPU's

Prerequisites

Docker

1.Update the package index and install packages.
1
sudo apt-get update
Copied!
2.Install the necessary Docker dependencies
1
sudo apt-get install \
2
apt-transport-https \
3
ca-certificates \
4
curl \
5
gnupg \
6
lsb-release
Copied!
3.Add Docker's official GPG key:
1
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Copied!
4.Set up a stable repository using the following command.
1
echo \
2
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
3
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Copied!
5.Install the latest version of Docker Engine and containerd,
1
sudo apt-get update
2
sudo apt-get install docker-ce docker-ce-cli containerd.io
Copied!
6.Verify whether the Docker is successfully installed using.
1
docker --version
Copied!
Sample Response:
1
Docker version 20.10.7, build f0df350
Copied!

Docker Compose

1.Run this command to download the current stable release of Docker Compose:
1
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
Copied!
2.Apply executable permissions to the binary:
1
sudo chmod +x /usr/local/bin/docker-compose
Copied!
3.Verify whether the docker-compose is successfully installed using.
1
docker-compose --version
Copied!
Response:
1
docker-compose version 1.29.2, build 1110ad01
Copied!

Cloning the Repositories

Deploying the 0Chain network requires cloning of the GitHub repos below.
0chain
1
git clone https://github.com/0chain/0chain.git
Copied!
blobber
1
git clone https://github.com/0chain/blobber.git
Copied!
0dns
1
git clone https://github.com/0chain/0dns.git
Copied!
Confirm whether all the cloned directories exist.
1
0chain/
2
blobber/
3
0dns/
Copied!

Step 2: Setup the network for 0chain components

Get the Magic Block

A magic block file contains miners and sharders values that will be used for further 0chain network operations. It is important to get the magic block from the chain you want to connect and update the magic_block.json file.
Let's get the magic block from the 0chain directory and update the magic_block.json file in the 0dns directory.
1
cp 0chain/docker.local/config/b0magicBlock_4_miners_1_sharder.json 0dns/docker.local/config/magic_block.json
Copied!

Build and Configure 0dns

0dns service is responsible for connecting to the network and fetching all the magic blocks from the network, which are saved in the DB. 1.Navigate to 0dns directory
1
cd 0dns
Copied!
2.Open the 0dns configuration file(0dns.yaml) using the nano editor.
1
nano docker.local/config/0dns.yaml
Copied!
3.Disable both use_https and use_path (set them to false).This is requ fix the miner and sharder URLs so they work locally.
4.Save the changes and run the following command inside the 0dns directory
1
./docker.local/bin/build.sh
Copied!
Here is the screenshot of the console after a successful build

Set up a Docker Network

To create sharder, blobber, miner containers and allow interaction between them. You need to create a network using Docker, which connects them with each other.
    1.
    To set up a network go to the 0chain directory
    1
    cd 0chain
    Copied!
    2.
    Run the setup network script
    1
    docker.local/bin/setup_network.sh
    Copied!
    On successful Setup, you will receive a network ID in response :
    1
    d9c238b3f21899137c905b13a4c52fbcab46bee4527d0b6525031c3401b4d329
    Copied!

Start the 0dns container

To connect to the test network we just created and to fetch all the magic blocks. Run the 0dns container.
1.Navigate to 0dns/docker.local/bin directory
1
cd 0dns/docker.local/bin
Copied!
2.Run the start script located in the directory using the command.
1
./start.sh
Copied!
Here is the screenshot of the output after a successful start.

Step 3: Initialize and Build the 0chain components

Initialize the Sharder and Miner directories

1.Navigate to 0chain directory
1
cd 0chain
Copied!
2.Run the init.setup.sh script located in the docker.local/bin directory using the command
1
./docker.local/bin/init.setup.sh
Copied!
After running the script you will see the sharder and miner directories populated in docker.local folder
3.Lets verify whether the directories exist by navigating to docker.local folder and running
1
ls
Copied!
The output should be like this:
1
bin build.sc_unit_test docker-clean miner5 sharder2
2
build.base build.sharder miner1 miner6 sharder3
3
build.genkeys build.test.multisigsc miner2 miner7
4
build.magicBlock build.unit_test miner3 miner8
5
build.miner config miner4 sharder1
Copied!

Build the miner and sharder containers

1.Navigate to 0chain directory
1
cd 0chain
Copied!
2.First build the base containers using the script.(This may take few minutes)
1
./docker.local/bin/build.base.sh
Copied!
Screenshot after successful build:
3.Build the sharder containers using
1
./docker.local/bin/build.sharders.sh
Copied!
Screenshot of successful build:
4.Build the miner containers using
1
./docker.local/bin/build.miners.sh
Copied!
Screenshot of a successful build

Initialize the blobber directories

1.Navigate to blobber directory
1
cd blobber
Copied!
2.Run the init.setup.sh script located in the Docker.local/bin directory using the command
1
./docker.local/bin/blobber.init.setup.sh
Copied!
After running the script you will see the blobber directories populated in docker.local folder
3.Let's verify whether the directories exist by navigating to docker.local folder and running
1
ls
Copied!
The output should be like this:
1
b0docker-compose.yml blobber4 Dockerfile
2
bin blobber5 IntegrationTestsBlobberDockerfile
3
blobber1 blobber6 keys_config
4
blobber2 docker-clean p0docker-compose.yml
5
blobber3 docker-compose.yml ValidatorDockerfile
Copied!

Build the blobber containers

1.Go back to blobber directory-path 2.Log in to your docker account using the command
1
docker login
Copied!
3.Now run the following scripts located in the docker.local/bin directory .
1
./docker.local/bin/build.base.sh
2
./docker.local/bin/build.blobber.sh
3
./docker.local/bin/build.validator.sh
Copied!
Screenshot after a successful build

Step 4: Start Sharder and Miner Containers

To start all the miner and sharder containers navigate to the 0chain/docker.local/<miner/sharder|i> directories and run the start script. For example, let's run 1 sharder and 3 miners.
1.Open four different terminal tabs and in the first terminal tab navigate to the 0chain/docker.local/sharder1 directory using
1
cd 0chain/docker.local/sharder1/
Copied!
2.Run the following command for starting the sharder
1
../bin/start.b0sharder.sh
Copied!
3.Wait till the Cassandra is started and the sharder is ready to listen to requests. Here is a screenshot of sharder up and running.
4.Repeat steps 1 and 2 by changing the sharder1 directory to (sharder 2,3 etc) in new terminal tabs to start more sharders.
Notes :
    Run each sharder on new terminal tab and start sharder before miners as they need the genesis magic block.
    Run the command specified in step 2 by only navigating to sharder directories.
    If you are not able to locate sharder directories, have a look at the Initialize the Miner and sharder directories section.
5.To run the miner containers in other three terminal tabs,first navigate to 0chain/docker.local/miner1 directory using
1
cd 0chain/docker.local/miner1/
Copied!
6. Run the following command for starting the miner
1
../bin/start.b0miner.sh
Copied!
Wait till the miner is ready to accept connections. Here is a screenshot of miner up and running.
7.Repeat steps 5 and 6 by changing the miner1 directory to (miner 2,3 etc) in new terminal tabs to start more miners.
Notes:
    Run each miner on a new terminal tab
    To avoid errors, run the command specified in step 6 by only navigating to miner directories.
    If you are not able to locate miner directories, have a look at the Initialize the Miner and sharder directories section.
    For a minimal working setup, at least run 1 sharder and 3 miners.

Step 5 : Register a Wallet using zboxcli

This part assumes that your sharder, and miner containers are perfectly running. In this part, we will register a wallet using zwalletcli and then start the blobber using the wallet id.
1.Now clone the zbox CLI repository using the command
1
git clone https://github.com/0chain/zboxcli.git
Copied!
2.Install the zboxcli dependencies
GoLang Binaries
Use the Linux built-in Wget tool is used to fetch the golang archive from the google server using the command
1
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
Copied!
The tar command is used to extract the group of files into a usr/local directory.
1
tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
Copied!
Path Variable is set to usr/local directory using
1
export PATH=$PATH:/usr/local/go/bin
Copied!
Build-Essential
The build-essential package is required to build and make Zbox application. It includes the necessary GCC/g++ compilers and other essential critical libraries and utilities.
Run apt update command to update the packages.
1
sudo apt update
Copied!
Get Build-essential package.
1
sudo apt-get install build-essential
Copied!
Once dependencies are installed navigate into zboxcli directory using
1
cd zboxcli
Copied!
3. Use the make install command to compile the source code.
1
make install
Copied!
This might take couple of minutes. Sample output after successful compiling:
4.Now Connect the Zbox to the 0Chain network Configuration for the 0chain network by default is stored in network/one.yaml file which we will copy to a new config.yaml file.
The config.yaml file and all the other Zbox component information will be stored in a new zcn folder located in home directory of file system.
5. Make a new zcn folder in home linux directory using
1
mkdir $HOME/.zcn
Copied!
.zcn is used to denote a hidden folder.
6. Copy the content from one.yaml to a new config.yaml file using
1
cp network/one.yaml $HOME/.zcn/config.yaml
Copied!
To verify whether the config.yaml exist and network configuration is stored properly. From the home directory navigate to zcn folder . You will see config.yaml listed.
7. Check the config file configuration using
1
nano config.yaml
Copied!
According to the config mentioned in block worker field of your file, zbox will connect to 8. https://one.devnet-0chain.net/.change it to http://198.18.0.98:9091 for the local network.
8. Also create a network.yaml file in .zcn directory which specify the local miner and sharder ports.To check ports run the docker ps command. Here is a sample network.yaml file for 1 sharder and 3 miners.
1
miners:
2
- http://localhost:7071
3
- http://localhost:7072
4
- http://localhost:7073
5
sharders:
6
- http://localhost:7171
Copied!
9. Start the Zbox by navigating back to zboxcli directory using
1
cd zboxcli
Copied!
and type
1
./zbox
Copied!
On a successful run you will see a help section like this:
1
zbox is a decentralized storage application written on the 0Chain platform.
2
Complete documentation is available at https://docs.0chain.net/0chain/
3
4
Usage:
5
zbox [command]
6
7
Available Commands:
8
add-collab add collaborator for a file
9
alloc-cancel Cancel an allocation
10
alloc-fini Finalize an expired allocation
11
bl-info Get blobber info
12
bl-update Update blobber settings by its delegate_wallet owner
13
commit commit a file changes to chain
14
copy copy an object(file/folder) to another folder on blobbers
15
cp-info Challenge pool information.
16
delete delete file from blobbers
17
delete-collab delete collaborator for a file
18
download download file from blobbers
19
get Gets the allocation info
20
get-diff Get difference of local and allocation root
21
get-download-cost Get downloading cost
22
get-upload-cost Get uploading cost
23
getwallet Get wallet information
24
help Help about any command
25
list list files from blobbers
26
list-all list all files from blobbers
27
listallocations List allocations for the client
28
ls-blobbers Show active blobbers in storage SC.
29
meta get meta data of files from blobbers
30
move move an object(file/folder) to another folder on blobbers
31
newallocation Creates a new allocation
32
register Registers the wallet with the blockchain
33
rename rename an object(file/folder) on blobbers
34
rp-create Create read pool if missing
35
rp-info Read pool information.
36
rp-lock Lock some tokens in read pool.
37
rp-unlock Unlock some expired tokens in a read pool.
38
sc-config Show storage SC configuration.
39
share share files from blobbers
40
sign-data Sign given data
41
sp-info Stake pool information.
42
sp-lock Lock tokens lacking in stake pool.
43
sp-pay-interests Pay interests not payed yet.
44
sp-unlock Unlock tokens in stake pool.
45
sp-user-info Stake pool information for a user.
46
start-repair start repair file to blobbers
47
stats stats for file from blobbers
48
sync Sync files to/from blobbers
49
update update file to blobbers
50
update-attributes update object attributes on blobbers
51
updateallocation Updates allocation's expiry and size
52
upload upload file to blobbers
53
version Prints version information
54
wp-info Write pool information.
55
wp-lock Lock some tokens in write pool.
56
wp-unlock Unlock some expired tokens in a write pool.
57
58
Flags:
59
--config string config file (default is config.yaml)
60
--configDir string configuration directory (default is $HOME/.zcn)
61
-h, --help help for zbox
62
--network string network file to overwrite the network details (if required, default is network.yaml)
63
--silent Do not show interactive sdk logs (shown by default)
64
--wallet string wallet file (default is wallet.json)
65
--wallet_client_id string wallet client_id
66
--wallet_client_key string wallet client_key
67
68
Use "zbox [command] --help" for more information about a command.
Copied!
9.To register a wallet on Zbox to be used both by the blockchain and blobbers. Use the following Zbox command
1
./zbox register
Copied!
Successful Response:
1
Wallet Registered
Copied!
By default, the wallet information will be stored in wallet.json located in the .zcn folder of the Linux home directory. 10.Navigate back to the .zcn folder
1
cd $HOME/.zcn/
Copied!
11. Open the wallet.json file. It should be similar to the similar to the output below:
1
{"client_id":"4af719e1fdb6244159f17922382f162387bae3708250cab6bc1c20cd85fb594c",
2
"client_key":"da1769bd0203b9c84dc19846ed94155b58d1ffeb3bbe35d38db5bf2fddf5a91c91b22bc7c89dd87e1f1fecbb17ef0db93517dd3886a64274997ea46824d2c119",
3
"keys":[{"public_key":"da1769bd0203b9c84dc19846ed94155b58d1ffeb3bbe35d38db5bf2fddf5a91c91b22bc7c89dd87e1f1fecbb17ef0db93517dd3886a64274997ea46824d2c1>
4
"private_key":"542f6be49108f52203ce75222601397aad32e554451371581ba0eca56b093d19"}],
5
"mnemonics":"butter whisper wheat hope duck mention bird half wedding aim good regret maximum illegal much inch immune unlock resource congress drift>
6
"version":"1.0","date_created":"2021-09-09T20:22:56+05:30"}
Copied!
12..Copy the client_id value and paste it into blobbers and validators settings. These are found in blobber/config directory. 13. Navigate to the config directory :
1
cd blobber/config
Copied!
You will see blobber and validation files listed
14.Open both the configuration files and edit the delegate_wallet value with client_id copied from wallet. Here is a sample configuration file below:
1
# [configurations above]
2
3
# for testing
4
# 500 MB - 536870912
5
# 1 GB - 1073741824
6
# 2 GB - 2147483648
7
# 3 GB - 3221225472
8
capacity: 1073741824 # 1 GB bytes total blobber capacity
9
read_price: 0.01 # token / GB for reading
10
write_price: 1.00 # token / GB for writing
11
# min_lock_demand is value in [0; 1] range; it represents number of tokens the
12
# blobber earned even if a user will not read or write something
13
# to an allocation; the number of tokens will be calculated by the following
14
# formula
15
#
16
# allocation_size * write_price * min_lock_demand
17
#
18
min_lock_demand: 0.1
19
# max_offer_duration restrict long contacts where,
20
# in the future, prices can be changed
21
max_offer_duration: 744h # 31 day
22
challenge_completion_time: 1m # 15m # duration to complete a challenge
23
24
# delegate wallet for all rewards, if it's empty, then blobber ID used
25
delegate_wallet: 'b145bf241eab00c9865a3551b18028a6d12b3ef84df8b4a5c317c8d184a82412'
Copied!

Step 6: Starting the blobber containers

To start all the blobber containers navigate to the blobber/docker.local/blobber|i> directories and run the start script. For instance, let's run 2 blobbers.
1.Open two different terminal tabs and first navigate to the blobber/docker.local/blobber1 directory using
1
cd blobber/docker.local/blobber1
Copied!
2.Run the following command for starting the sharder
1
../bin/blobber.start_bls.sh
Copied!
Wait till blobber is ready to listen to requests. Here is a screenshot of blobber up and running.
3.Repeat steps 1 and 2 by changing the blobber directory to (blobber 2,3 etc) in new terminal tabs to start more blobbers
Notes :
    Run each blobber on the new terminal tab
    To avoid errors, run the command specified in step 2 by only navigating to blobber directories.
    If you are not able to locate blobber directories, have a look at the Initialize the blobber directories section.

Step 7: Validate 0chain deployment.

1.After starting sharders, miners and blobbers verify whether they are up and running perfectly using the command
1
docker ps
Copied!
In the response, the following containers should be up and running (see the screenshot below )
Note: if your containers are restarting and are not showing up when using the docker ps command. Try to check the following things
    Ensure ports mapped to these containers are not mapped to other services.
    Also, check your RAM and storage space. If you are not using the amount of compute resources specified in the System Requirements section. Your machine will not be able to start all the services and containers
2.If the containers are showing up properly as mentioned in the above screenshot you will also see their port mappings listed in the ports section(see the screenshot above) . To verify the status of a particular miner sharder or blobber open the http://localhost:<portnumber>/_diagnostics.
3. For example let's check the status of our miners hosted on port 7071 by opening the following link http://localhost:7071/_diagnostics in the browser.
In response, you should see a page responding to the miner details as shown below:

Note: The State Health Must be 0 for all the miners and sharders as shown in the image above with a red highlight. This signifies the blockchain is working fine.

Miner and Sharder Stats Glossary Table

Parameter
Description
Current Round:
Current round signifies the active round that the miners are working on to generate a block, and then verify and notarize it. A particular round gets completed when there is a consensus threshold met among miners to notarize the block.
VRFs:
Stands for verifiable random function. This is used by 0Chain to randomize the order in which blocks are generated. VRFs are also used by miners to check 'random' chunks of data stored on blobbers
RRS:
Stands for random round seed and is the verifiable random number generated by the miners using the VRF.
Notarization:
Stands for the number of verified block tickets that have been processed,needs to be greater than the consensus threshold.
LFB:
Stands for last finalized block or round. The miners run finalization routine on penultimate round, after completion of the current round.
Latest finalized round:
This refers to the most active round of challenges that got completed.
Deterministic finalized round:
This refers to predicted round of challenges that got completed.
Rollbacks:
The number of rollbacks performed by a miner node to undo a block(s) that was previously confirmed on the blockchain.
Timeouts:
Number of timeouts happened when mining a block. A timeout for a node is recorded when the time to validate a block exceeds the set limit.
Round Timeout Count:
When Timeouts occur, the block is resent several times to account for DDoS attack and network issues. However, if the DDoS is focused toward generators then the only defense is to retry the round with a new VRF and have a new set of generators and blocks.
goroutine:
Number of concurrent go executing functions/activities. The number represent Stack traces of all current goroutines
Heap allocs:
It is a live memory allocation of the current miner or sharder.
State missing nodes:
State Nodes that are missing a valid health state. Pending indicates an invalid health state. This is corrected by restarting the blockchain
Redis Collection:
Redis is a key value store. It represents the number of key value stores.
LFB state(computed/initialized):
This indicates the state of last finalized blocks that are computed and still in progress.
Fetching blocks from miners,sharders:
This indicates the number of fetched miners and sharders blocks to sync up the state.
Is active in chain:
This indicates whether the particular miner node is actively participating in the blockchain.

Step 8:Creating an Allocation on Blobber

To create storage space on the blobber we have to use the zboxcli and zwalletcli to interface with the blockchain.
    1.
    Get the test tokens into your wallet using the zwallet CLI tool. If you have not installed zwallet CLI clone the repository and install using these commands
1
git clone https://github.com/0chain/zwalletcli.git
2
cd zwalletcli
3
export PATH=$PATH:/usr/local/go/bin
4
make install
Copied!
After a successful build, you should see the following output:
2. Now register and get the test tokens into your wallet by using
1
./zwallet register
2
./zwallet faucet --methodName pour --input "{Pay day}"
Copied!
On Successful response:
1
Wallet Registered !
2
Execute faucet smart contract success with txn : 50e6cf293567e456527a13a6981f1188fb6eb6b930c805c7ddba5e7e26ba9e6f
Copied!
3.Check Token balance in zwallet using the
1
./zwallet getbalance
Copied!
Response-
1
Balance: 1.000 ZCN (0.44 USD)
Copied!
Note : Before Proceeding further at least have 3 ZCN balance in the wallet. The tokens are required for staking before creating an allocation. 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 command
1
./zbox ls-blobbers
Copied!
The sample response will show all the active blobbers:
1
- id: 7a90e6790bcd3d78422d7a230390edc102870fe58c15472073922024985b1c7d
2
url: http://198.18.0.92:5052
3
used / total capacity: 0 B / 1.0 GiB
4
last_health_check: 1631835252
5
terms:
6
read_price: 10.000 mZCN / GB
7
write_price: 100.000 mZCN / GB / time_unit
8
min_lock_demand: 0.1
9
cct: 2m0s
10
max_offer_duration: 744h0m0s
11
- id: f65af5d64000c7cd2883f4910eb69086f9d6e6635c744e62afcfab58b938ee25
12
url: http://198.18.0.91:5051
13
used / total capacity: 0 B / 1.0 GiB
14
last_health_check: 1631835202
15
terms:
16
read_price: 10.000 mZCN / GB
17
write_price: 100.000 mZCN / GB / time_unit
18
min_lock_demand: 0.1
19
cct: 2m0s
20
max_offer_duration: 744h0m0s
21
Copied!
5. Export Blobber IDs to variables.
1
export BLOBBER1=f65af5d64000c7cd2883f4910eb69086f9d6e6635c744e62afcfab58b938ee25
2
export BLOBBER2=7a90e6790bcd3d78422d7a230390edc102870fe58c15472073922024985b1c7d
Copied!
6.Add tokens to the stake pools of all the active blobbers to allow them to accept allocations.
1
./zbox sp-lock --blobber_id $BLOBBER1 --tokens 1
2
./zbox sp-lock --blobber_id $BLOBBER2 --tokens 1
Copied!
Sample Response:
1
tokens locked, pool id: 057f92514a2d3faca13443b7c0023878552e73c984c15ba7450b9892446adfbd
Copied!
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
1
./zbox newallocation --help
Copied!
This will output the mandatory and optional flags that need to be added with the newallocation command.
Parameter
Description
Default
Valid Values
allocationFileName
local file to store allocation information
allocation.txt
file path
cost
returns the cost of the allocation, no allocation created
flag
data
number of data shards, effects upload and download speeds
2
int
expire
duration to allocation expiration
720h
duration
free_storage
free storage marker file.
file path
owner
owner's id, use for funding an allocation for another
string
owner_public_key
public key, use for funding an allocation for another
string
lock
lock write pool with given number of tokens
float
mcct
max challenge completion time
1h
duration
parity
number of parity shards, effects availability
2
int
read_price
filter blobbers by read price range
0-inf
range
size
size of space reserved on blobbers
2147483648
bytes
usd
give token value in USD
flag
write_price
filter blobbers by write price range
0-inf
range
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 :
1
./zbox newallocation --lock 0.5 --data 1 --parity 1
Copied!
Successful Response will create an allocation with allocation ID:
1
Allocation created :fa34be9c225077ede736b8012738d6b591aff822d75a630701ae99c05c32fac7
Copied!
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
1
./zbox listallocations
Copied!
You will see your allocation ID listed with the specified configuration:
Response:
1
ID | SIZE | EXPIRATION | DATASHARDS | PARITYSHARDS | FINALIZED | CANCELED | R PRICE | W PRICE
2
+------------------------------------------------------------------+------------+-------------------------------+------------+--------------+-----------+----------+----------+----------+
3
52fb9b5926c06e43a9290e9d7ad3217a4aee51c94684baf0fc174aa41abe6059 | 2147483648 | 2021-05-14 17:50:59 +0000 UTC | 2 | 2 | false | false | 0.04 | 0.04
Copied!
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.

Monitor the chain progress using Block Explorer

<Work in Progress>

Last modified 9d ago