☁️
Züs
  • About Züs
  • Concepts
    • Architecture
      • Mining on the Züs Blockchain
        • Onboarding a New Miner or Sharder
        • Block Production Protocol
        • Block Finalization
        • Merkle Patricia Trees(MPT) and Recovery
        • View Change and Distributed Key Generation(DKG)
      • Payment
      • Storage
      • Token Bridge Protocol
      • Resources
    • Tokenomics
      • Staking Process
      • Block Rewards
      • Delegation
    • Store
    • Earn
    • Build
    • NFT
  • Resources
    • Whitepapers
      • Tokenomics Paper
      • Architecture Paper
      • Storage Paper
    • Patents
      • NON-FUNGIBLE TOKEN BLOCKCHAIN PROCESSING
      • FREE STORAGE PROTOCOL FOR BLOCKCHAIN PLATFORM
      • TRANSFERRING CONTENT VIA PROXY RE-ENCRYPTION
      • STREAMING CONTENT VIA BLOCKCHAIN TECHNOLOGY
      • SPLIT-KEY WALLET ACCESS BETWEEN BLOCKCHAINS
      • ENFORCING SECURITY PARAMETERS SPECIFIED BY AN OWNER ON A BLOCKCHAIN PLATFORM
      • CLIENT AUTHENTICATION USING SPLIT KEY SIGNING ON A BLOCKCHAIN PLATFORM
      • BLOCKCHAIN CONTENT PURCHASING PROTOCOL
      • BLOCKCHAIN BASED PRIVACY COMPLIANCE PLATFORM
      • SYSTEMS AND METHODS OF SELF-ADMINISTERED PROTOCOLS ON A BLOCKCHAIN PLATFORM
      • SYSTEMS AND METHODS OF AGGREGATE SIGNING OF DIGITAL SIGNATURES ON MULTIPLE MESSAGES SIMULTANEOUSLY U
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR AUTOMATED ASSET BASED PROVISIONING OF RESOURCES
      • SYSTEMS AND METHODS OF SELF-FORKING BLOCKCHAIN PROTOCOL
      • SYSTEMS AND METHODS OF SUSTAINABILITY PROTOCOL USING DISTRIBUTED BLOCKCHAIN APPLICATION WITH IoT SEN
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR DISTRIBUTED APPLICATIONS
  • API Reference
    • Endpoints
      • Block
      • Client
      • Connection
      • DNS
      • File
      • Smart Contracts
      • Blobber Stats
      • Transactions
      • Miners and Sharders
        • Stats
        • State
        • Diagnostics
        • Configuration
        • Smart Contract State
        • Smart Contract Stats
        • Chain Stats
  • Hackathon
    • Register to Hackathon
      • How to Add Members to Hackathon Team
    • Repos
    • Documentation
  • Products
    • Bolt
      • Get Started
      • Stake
      • Activity
      • Buy ZCN
      • Sell ZCN
      • Send Tokens
      • Receive Tokens
      • Settings
        • Manage Profile
        • Wallet
        • Read Pool
      • Troubleshooting
    • Vult
      • Sign Up
      • Upload File
      • Upload an Encrypted File
      • Upload a File to a Folder
      • Share a Uploaded File
      • Move a Uploaded File
      • Delete a File
      • Make File Available Offline
      • Troubleshooting
    • Atlus
      • Dashboard Overview
      • Service Providers
      • Charts
        • Market Charts
        • Network Charts
        • Storage Charts
        • Züs Explainer
      • Blockchain
      • Server Map
    • Blimp
      • Sign Up
        • Buy ZCN for Storage
      • Use Blimp as Direct Storage
      • Use Blimp as S3 Server
        • S3 Operations
      • Use Blimp for Cloud Migration
      • Manage Allocations
        • Extend Size
        • Extend Duration
        • Add Blobber
        • Replace Blobber
        • Make allocation Immutable
        • Freeze Allocation
        • Cancel Allocation
    • Chimney
      • Get Started
      • Deploy Blobber on Own Server
      • Deploy Blobber on Rented Server
      • Stake Blobber
      • Add Blobber
      • Monitor Blobbers
      • Visualize Blobber Logs
      • View Blobber Rank
    • Chalk
      • Sign Up
      • Create NFT Collection
        • Buy ZCN for NFT via ERC token
        • Buy ZCN for NFT via Credit card
      • Explore NFT Collections
      • My NFTs
      • Profile
        • Withdraw Earnings
        • Manage Collections
  • Guides
    • Zus GO SDK
    • Zus JS SDK
    • Zbox CLI
      • Repo
      • Get Started
      • Creating and Managing Allocations
      • Uploading and Managing Files
      • Lock and Unlock Tokens
      • Tips and Troubleshooting
    • Zwallet CLI
      • Repo
      • Get Started
      • Zwallet Operations
      • Staking on miners and sharders
      • Burn and Mint Tokens using Zwallet
      • Troubleshooting
    • Add a Blobber
      • Repo
      • Getting Started
    • Add a Miner/Sharder
      • Repo
      • Getting Started
    • Setup a Blockchain
      • Repo
      • Quickstart
        • Understand the Script
      • Step 1: Set up the project
      • Step 2: Setup the network for Züs components
      • Step 3: Initialize and Build the Züs components
      • Step 4: Start Sharder and Miner Containers
      • Step 5 : Create a wallet using zwalletcli
      • Step 6: Starting the blobber containers
      • Step 7: Validate Züs deployment
      • Step 8: Creating an Allocation on Blobber
      • Restarting Sharder and Miner Containers with CleanDB.
      • Additional Tips and Troubleshooting
    • Glossary
  • Support
    • Help Center
      • Community
      • Issues on Github
      • Contact Us
Powered by GitBook
On this page
  1. Guides
  2. Setup a Blockchain

Step 8: Creating an Allocation on Blobber

PreviousStep 7: Validate Züs deploymentNextRestarting Sharder and Miner Containers with CleanDB.

Last updated 1 year ago

To create storage space on the blobber we have to use the zboxcli to interface with the blockchain.

  1. .

  2. ,(if you have not created one) and get test tokens into your wallet using the command below:

  ./zwallet faucet --methodName pour --input "{Pay day}"

On Successful response:

Execute faucet smart contract success with txn :  50e6cf293567e456527a13a6981f1188fb6eb6b930c805c7ddba5e7e26ba9e6f
  1. Check Token balance in zwallet using the

./zwallet getbalance

Response-

Balance: 1.000 ZCN (0.44 USD)

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

./zbox ls-blobbers

The sample response will show all the active blobbers:

- id:                    7a90e6790bcd3d78422d7a230390edc102870fe58c15472073922024985b1c7d
  url:                   http://198.18.0.92:5052
  allocated / total capacity: 2.0 GiB / 232.2 GiB
  last_health_check:      2022-11-24 05:27:00 +0530 IST
  terms:
    read_price:          10.000 mZCN / GB
    write_price:         100.000 mZCN / GB / time_unit
    min_lock_demand:     0.1
    max_offer_duration:  744h0m0s
- id:                    f65af5d64000c7cd2883f4910eb69086f9d6e6635c744e62afcfab58b938ee25
  url:                   http://198.18.0.91:5051
  allocated / total capacity: 2.0 GiB / 232.3 GiB
  last_health_check:      2022-11-24 05:27:29 +0530 IST
  terms:
    read_price:          10.000 mZCN / GB
    write_price:         100.000 mZCN / GB / time_unit
    min_lock_demand:     0.1
    max_offer_duration:  744h0m0s
​

5. Export Blobber IDs to variables.

export BLOBBER1=f65af5d64000c7cd2883f4910eb69086f9d6e6635c744e62afcfab58b938ee25
export BLOBBER2=7a90e6790bcd3d78422d7a230390edc102870fe58c15472073922024985b1c7d

6.Add tokens to the stake pools of all the active blobbers to allow them to accept allocations.

./zbox sp-lock --blobber_id $BLOBBER1 --tokens 1
./zbox sp-lock --blobber_id $BLOBBER2 --tokens 1

Sample Response:

tokens locked, txn hash: 04bde4414459739e9315722f61b409fa12a5ffb70b8acd483b874f2f3b810376

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

./zbox newallocation --help

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 :

./zbox newallocation --lock 0.5 --data 1 --parity 1 

Successful Response will create an allocation with allocation ID:

Allocation created :fa34be9c225077ede736b8012738d6b591aff822d75a630701ae99c05c32fac7

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

./zbox listallocations

You will see your allocation ID listed with the specified configuration:

Response:

  ID   |    SIZE    |          EXPIRATION           | DATASHARDS | PARITYSHARDS | FINALIZED | CANCELED | R  PRICE | W  PRICE
+------------------------------------------------------------------+------------+-------------------------------+------------+--------------+-----------+----------+----------+----------+
  52fb9b5926c06e43a9290e9d7ad3217a4aee51c94684baf0fc174aa41abe6059 | 2147483648 | 2021-05-14 17:50:59 +0000 UTC |   2 |            2 | false     | false    |     0.04 |     0.04

Notes:

If you are not able to create allocation and getting "transaction not found on any of the sharders", check error causes in Section.

To upload files on an allocation, modify allocation and use advanced features check documentation.

zbox Tips and Troubleshooting
zboxcli
Install zboxcli
Install zwalletcli
create wallet