Skip to content
Tenzro
← All tutorials
Tutorial · Operate

Provide and rent storage

Offer disk to the network as a staked storage provider, or store a file with erasure-coded redundancy and pay through a storage claim that settles on hourly proofs of possession.

Intermediate20 min

Storage on Tenzro Network is a staked market. Providers stake for the storage role and hold erasure-coded shards. Payment is a storage claim in consensus state: the renter pays the whole term into the claim's vault, and each hour the provider is paid only if validators found it still holding the data. An hour without a passing proof refunds the renter and pays a penalty from the claim's collateral.

The first part of this tutorial sets up a provider. The second part stores a file on a provider and pays for keeping it.

Prerequisites

  • For providers: a node with spare disk and a hardware-rooted identity. See Join the network as a provider.
  • For renters: a funded account, and a provider who will store your file. Storing and rebuilding objects are admin methods on the provider's own node, so the provider runs them, or you run them on a node you operate.

Part 1: provide storage

1. Start the node with the storage role

bash
tenzro-node --roles storage --data-dir ./data

Roles combine: --roles ai,storage serves models and stores data under one identity.

2. Stake for the capacity you pledge

bash
tenzro stake bond --role storage --amount <AMOUNT_WEI> --terabytes 4
tenzro stake info

Your stake subject for storage is did:tenzro:role:storage:<account hex>; tenzro_getRoleStakes returns it as sla_subject. Validators probe that subject every hour.

3. Check your provider state

bash
tenzro node storage status

status shows whether the node is a storage provider, your current byte-epoch rate (effective_rate_wei) and the number of objects you hold. Storage is priced at a fixed byte-epoch rate in wei that never follows demand. Set it with an admin method on your node (tenzro_storageSetPricing); a new rate applies to deals opened after it:

bash
tenzro node storage set-pricing --rate <WEI_PER_BYTE_EPOCH>

Part 2: rent storage

4. Store the file

The file is stored under an object id you choose, owned by your address. On the provider's node:

bash
tenzro node storage store --object-id <OBJECT_ID> --owner 0xYOUR_ADDRESS \
  --file ./dataset.parquet --data-shards 4 --parity-shards 2

The object is erasure-coded into four data and two parity shards, which survives any two shards being lost at once. The result (tenzro_storageStoreObject) carries object_id, size_bytes, the shard counts and the descriptor_digest: the SHA-256 of the descriptor that names every shard and its committed Merkle root.

5. Buy a storage claim for it

A provider offers a storage claim that commits your file's descriptor_digest, with collateral and a price per hour. You accept it with a ComputeClaim transaction, naming the most you agree to pay:

json
{
  "tx_type": {
    "ComputeClaim": { "op": { "accept": { "claim_id": "<CLAIM_ID>", "max_total": "300000000000000000000" } } }
  }
}

Find offers and read the claims you hold:

bash
tenzro provider compute-claims --party 0xYOUR_ADDRESS
tenzro provider compute-claim --claim-id <CLAIM_ID>

6. Let each hour settle

Every hour, validators' SLA probes ask the provider to prove possession of every object it is paid to keep. Anyone may settle the claim: each hour with an available verdict pays the provider that hour's price, an unavailable hour refunds you plus a penalty from collateral, and an hour with no verdict refunds you.

bash
tenzro provider sla-verdict --provider-did <PROVIDER_DID> --epoch <HOUR>

7. Read the file back

The node that stored the object rebuilds it from its shards (tenzro_storageRetrieveObject, an admin method):

bash
tenzro node storage retrieve --object-id <OBJECT_ID> --out ./dataset.parquet

Shards lapse when no claim pays for them, and providers are not asked to wipe shards they already hold. Encrypt sensitive data before you store it.

Next steps

ExploreJoin the network