☁️
Zus Docs
  • About Züs
  • System
    • Providers and Services
      • Miner
      • Sharder
      • Blobber
      • Validator
      • Authorizer
      • Node Locator (0DNS)
    • Storage
      • Architecture and Data Management
      • Protocol
        • Allocations
        • Reference Objects
        • Challenges
        • Write Markers
          • Chain Hashing
          • Two Commit
        • Blobber Repair Protocol
      • ZS3 Server
        • Backup, Recovery and Replication
        • Encryption and Compression
        • S3FS Setup and Usage
        • Backup & Recovery with Restic on Blimp + ZS3 Server
        • Backup & Recovery with Veeam on Blimp + ZS3 Server
      • File Operations
        • Upload
        • Download
        • File Sharing
        • Partial Error Recovery
        • Streaming
        • Rent a Blobber
    • Smart Contracts
      • Storage S.C.
      • Miner S.C.
      • ZCN S.C.
      • ERC-20 S.C.s
      • Bridge Protocol
    • Blockchain & Consensus
      • Entities
    • User Authentication and Wallet Management System
      • OKTA Integration
      • Key Management System (KMS)
  • APIs
    • 0DNS API
    • JS API
    • Mobile API
  • CLIs
    • Storage CLI
      • Quickstart
      • Configuring the tool
    • Wallet CLI
      • Wallet Configuration
      • Quickstart
      • Configuring the tool
  • SDKs
    • Go SDK
      • GO SDK Microservices
    • JS SDK
  • Tokenomics
    • Staking
    • Reward & Penalty
  • ✨Züs Apps
    • 🗝️Vult
      • Getting Started
        • Web
        • Mobile
      • Vult AI
        • Batch Processing
        • Memory Retention
        • Technical Implementation
        • Architecture Overview
      • Login / Register
      • File Management Pages
      • File Sharing
      • Storage Management Dashboard
      • Storage Maintenance and Troubleshooting
      • Züs Subscription
      • Wallet Management
      • Refer a friend
      • Settings
    • 🏗️Blimp
      • Getting Started
      • Login / Register
      • Configure Storage
        • Create Standard Storage Allocation
        • Create Enterprise Allocation
        • Create S3 Server Allocation
        • Create Cloud Migration Allocation
        • Allocation Maintenance and Troubleshooting
      • File Management Pages
      • File Sharing
      • Manage Allocations
      • Upgrade Storage
      • Blimp Vault
      • Refer a friend
      • Settings
      • Launching ZS3 Server
      • Using CLI to backup files into Blimp + ZS3 Server
    • 🏠Chimney
      • Getting Started
      • Login / Register
      • Create New Deployment
      • Manage Your Deployments
      • Homepage
      • Staking Dashboard
      • Rank Dashboard
      • Monitor Dashboard
      • Stats Dashboard
      • Logs Dashboard
      • Wallet Dashboard
      • Operations on your Deployments
      • Restricted Blobbers
      • Settings
        • Manage Profile
        • Wallet Settings
        • Update Blobber Settings
        • Update Blobber Version
        • Refer a friend
        • Help
    • 🌐Atlus
      • Getting Started
      • Home page
      • Service Providers Page
      • Charts Page
        • Market Charts
        • Network Charts
        • Storage Charts
      • Blockchain Page
      • Server Map Page
      • Storage Explainer Page
      • Details Pages
        • Block Details Page
        • Transaction Details Page
        • Wallet Details Page
        • Miner Details Page
        • Sharder Details Page
        • Blobber Details Page
        • Validator Details Page
        • Authorizer Details Page
        • Allocation Details Page
      • Appendix: Common Components
    • ⚡Bolt
      • Getting Started
        • Web
        • Mobile
      • Login / Register
      • Sign In with external wallet
      • Staking Dashboard
      • Staking/Unstaking a provider
      • Claiming Rewards
      • Send/Receive ZCN tokens
      • Buy ZCN
      • Deposit/Withdraw ZCN tokens
      • Activity Dashboard
      • Refer a friend
      • Settings
  • Releases
    • Hardfork
Powered by GitBook
On this page
  1. System
  2. Smart Contracts

Storage S.C.

This page is under progressive development.

Allocation-related functions

new_allocation_request

Create a new allocation and lock tokens in the client's write pool, given the following inputs:

type newAllocationRequest struct {
	Name                 string     `json:"name"`
	DataShards           int        `json:"data_shards"`
	ParityShards         int        `json:"parity_shards"`
	Size                 int64      `json:"size"`
	Owner                string     `json:"owner_id"`
	OwnerPublicKey       string     `json:"owner_public_key"`
	Blobbers             []string   `json:"blobbers"`
	BlobberAuthTickets   []string   `json:"blobber_auth_tickets"`
	ReadPriceRange       PriceRange `json:"read_price_range"`
	WritePriceRange      PriceRange `json:"write_price_range"`
	ThirdPartyExtendable bool       `json:"third_party_extendable"`
	FileOptionsChanged   bool       `json:"file_options_changed"`
	FileOptions          uint16     `json:"file_options"`
}
Field
Description

name

(not used) the name of the allocation

data_shards

Number of data shards.

parity_shards

Number of prity shards used for error correction.

size

Size of the allocation.

owner

ClientID of the owner of the alloaction.

owner_public_key

Public Key of the owner of the allocation.

blobbers

List of blobber IDs to show for the blobbers.

blobber_auth_tickets

List of auth tickets corresponding to the list of blobber ids to host the allocation.

read_price_range

Range of read price offer for the blobbers chosen for the allocation (Reads in Züs are free!).

write_price_range

Range of write price offer for the blobbers chosen for the allocation.

third_party_extendable

Whether the allocation can be extendable by third party or not, meaning its size can be increased by a client other than the owner of the allocation.

file_options_changed

Whether file option flags are changed.

file_options

File option flags mask which control permissions of the files that belong to the allocation.

update_allocation_request

Updates the parameters of an existing allocation given the following parameters:​

type updateAllocationRequest struct {
	ID                      string `json:"id"`               // allocation id
	Name                    string `json:"name"`             // allocation name
	OwnerID                 string `json:"owner_id"`         // Owner of the allocation
	OwnerPublicKey          string `json:"owner_public_key"` // Owner Public Key of the allocation
	Size                    int64  `json:"size"`             // difference
	Extend                  bool   `json:"extend"`
	AddBlobberId            string `json:"add_blobber_id"`
	AddBlobberAuthTicket    string `json:"add_blobber_auth_ticket"`
	RemoveBlobberId         string `json:"remove_blobber_id"`
	SetThirdPartyExtendable bool   `json:"set_third_party_extendable"`
	FileOptionsChanged      bool   `json:"file_options_changed"`
	FileOptions             uint16 `json:"file_options"`
}
Field
Description

ID

The id of the allocation

name

(not used) the name of the allocation

owner_id

ClientID of the owner of the alloaction.

owner_public_key

Public Key of the owner of the allocation.

size

Size of the allocation.

extend

Whether the allocation should be extended.

add_blobber_id

ID of the blobber to add to the allocation.

add_blobber_auth_ticket

Auth ticket of the blobber to add to the allocation.

remove_blobber_id

ID of the blobber to remove from the allocation.

read_price_range

Range of read price offer for the blobbers chosen for the allocation (Reads in Züs are free!).

write_price_range

Range of write price offer for the blobbers chosen for the allocation.

set_third_party_extendable

Set the allocation to be extendable by third party, meaning its size can be increased by a client other than the owner of the allocation.

file_options_changed

Whether file option flags are changed.

file_options

File option flags mask which control permissions of the files that belong to the allocation.

finalize_allocation

Finalize an expired allocation by allocation owner or one of blobbers of the allocation. It moves all tokens have to be moved between pools and empties write pool moving left tokens to the client. It requires the following input parameters:

AllocationID string `json:"allocation_id"`

cancel_allocation

AllocationID string `json:"allocation_id"`
PreviousSmart ContractsNextMiner S.C.

Last updated 1 year ago

Cancel the allocation before its expiry date. It moves all tokens have to be moved between pools and empties write pool moving left tokens to the client, it also deducts a cancelation fee mentioned in the page. It required the following input parameters:

Allocations