☁️
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
  • Initialize the Sharder and Miner directories
  • Build the miner and sharder containers
  • Initialize the blobber directories
  • Build the blobber containers
  1. Guides
  2. Setup a Blockchain

Step 3: Initialize and Build the Züs components

Initialize the Sharder and Miner directories

  1. Navigate to 0chain directory

cd 0chain

2. Run the init.setup.sh script located in the docker.local/bin directory using the command

./docker.local/bin/init.setup.sh

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

ls docker.local/

The output should be similar to this:

Makefile    build.benchmarks  build.sc_unit_test     build.unit_test  miner2  miner6    sharder2
benchmarks  build.genkeys     build.sharder          config           miner3  miner7    sharder3
bin         build.magicBlock  build.swagger          docker-clean     miner4  miner8    sharder4
build.base  build.miner       build.test.multisigsc  miner1           miner5  sharder1  sql_script

Build the miner and sharder containers

1. Navigate to 0chain directory

cd 0chain

2. First build the base containers using the script.(This may take few minutes)

./docker.local/bin/build.base.sh

Screenshot after successful build:

  1. Build mocks from the Makefile in the repo, from 0chain directory run:

 make build-mocks 
  1. For building the sharder containers use the following command :

./docker.local/bin/build.sharders.sh

Screenshot of successful sharder build:

  1. Build the miner containers using

./docker.local/bin/build.miners.sh

Screenshot of a successful miner build:

Initialize the blobber directories

  1. Navigate to blobber directory

cd blobber

2. Inside blobber directory, run the commands below .The first command makes the shell script executable and while the next ones execute the shell script to create blobber directories.

chmod +x ./docker.local/bin/blobber.init.setup.sh
./docker.local/bin/blobber.init.setup.sh

NOTE: For Mac :

chmod +x ./docker.local/bin/blobber.init.setup-mac.sh
./docker.local/bin/blobber.init.setup-mac.sh

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

ls docker.local/

The output should be like this:

   b0docker-compose.yml  blobber4            Dockerfile
   bin                   blobber5            IntegrationTestsBlobberDockerfile
   blobber1              blobber6            keys_config
   blobber2              docker-clean        p0docker-compose.yml
   blobber3              docker-compose.yml  ValidatorDockerfilecd blobber/config
  1. Navigate to the config directory using

cd blobber/config

Use the nano editor to edit the block_worker field for both files :

nano 0chain_blobber.yaml

and

nano 0chain_validator.yaml

Build the blobber containers

  1. Go back to blobber directory

cd blobber

2. Now run the following scripts located in the docker.local/bin directory.

./docker.local/bin/build.base.sh
./docker.local/bin/build.blobber.sh
./docker.local/bin/build.validator.sh

Screenshot after a successful blobber build:

PreviousStep 2: Setup the network for Züs componentsNextStep 4: Start Sharder and Miner Containers

Last updated 1 year ago

Note: Mocks have to be built once in the beginning. Building mocks require mockery and brew which can be installed from .

Note : Change the default value of block_worker field with the following: for the local chain.

Note: The blobber scripts defined above works fine for Linux and Intel Mac .If you want to run blobber and validator on Apple Silicon Mac(M1 or M2) follow the guide . In case you are still facing issues with blobbers on M1 or M2 mac check

http://198.18.0.98:9091/
here
here
Troubleshooting Guide for Blobbers Setup (Mac M1 or M2)
.
Base Build
Sharder Build
Miner Build
Blobber Build