Skip to content
Tenzro
← All tutorials
Tutorial · Operate

Provide and rent storage

Offer disk to the network as a bonded storage provider, or store an object with erasure-coded redundancy and pay per epoch only when it proves retrievable.

Intermediate20 min

Storage on Tenzro Network 1 is a bonded market. Providers pledge disk against their bond. Renters store objects with erasure-coded redundancy, open a streaming deal, and pay one byte-epoch slice at a time, and only for epochs in which the provider answers a retrievability challenge. A provider that cannot prove it still holds the data is not paid for that epoch, and repeated misses close the deal and count against its bond.

The first part of this tutorial sets up a provider. The second part stores an object and runs a deal against it.

Prerequisites

  • For providers: a node with spare disk and a hardware-rooted identity. See Join Network 1 as a provider.
  • For renters: a funded account (TNZO, or a supported stablecoin for the prepaid balance).

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 and one bond.

2. Bond and register the capacity you pledge

Storage bonds scale with the whole terabytes you pledge:

bash
tenzro provider bond params
tenzro provider bond post --did <your-did> --address <your-address> --amount <tnzo>
tenzro provider register --type storage --did <your-did> --terabytes 4

3. Set your price

Choose a fixed rate or network-dynamic pricing, which moves your byte-epoch rate between a floor and a ceiling as your utilisation changes:

bash
tenzro node storage set-pricing --capacity <byte-epochs> --min-rate <wei> --max-rate <wei>
tenzro node storage status

status shows your current rate and the number of objects you hold.

Part 2: rent storage

4. Store an object with redundancy

The object is erasure-coded into data and parity shards and published on the peer-to-peer data plane, keyed by content address. Losing a provider does not lose the data. The defaults keep 4 data shards and 2 parity shards.

bash
tenzro node storage store \
  --object-id my-dataset-v1 \
  --owner 0xYOUR_ADDRESS \
  --file ./dataset.bin \
  --data-shards 4 --parity-shards 2

5. Fund a prepaid balance

Byte-epoch charges draw from a prepaid balance, the same one compute rentals use. Fund it once; each epoch streams a slice out of it or leaves it untouched on a miss. Amounts are in the asset's smallest unit (1 TNZO is 10^18 wei).

bash
tenzro escrow prepaid-deposit \
  --renter 0xYOUR_ADDRESS \
  --amount 3000000000000000000

Deposits and withdrawals move money, so they are signed by the renter's account.

6. Open a streaming deal

The per-epoch price follows from the object's size and the provider's byte-epoch rate, over the term. Opening fails if the provider's bond cannot cover the new obligation on top of everything else it owes, compute rentals included. Keep the returned deal_id.

bash
tenzro node storage open-deal \
  --rpc https://PROVIDER_RPC \
  --object-id my-dataset-v1 \
  --renter 0xYOUR_ADDRESS \
  --size-bytes 1073741824 \
  --total-epochs 48

7. Charge epochs against retrievability proofs

Each epoch the provider answers a challenge that samples the object's shards and returns a digest bound to a fresh nonce, so a stale or fabricated answer fails. The outcome is one of:

OutcomeMeaning
ChargedThe challenge passed; one byte-epoch slice moved to the provider.
MissedThe challenge failed; nothing moved.
ClosedThe term ended or the provider lost coverage.
bash
tenzro node storage charge-epoch \
  --rpc https://PROVIDER_RPC \
  --deal-id <deal-id>

8. Inspect the deal and reclaim the rest

bash
tenzro node storage deal --rpc https://PROVIDER_RPC --deal-id <deal-id>
tenzro escrow prepaid-balance --renter 0xYOUR_ADDRESS
tenzro escrow prepaid-withdraw --renter 0xYOUR_ADDRESS --amount <remaining-wei>

Whatever the provider did not earn stays in your prepaid balance until you withdraw it.

Next steps