content-addressable storage service for the Tana blockchain.
t4 provides immutable file storage where content is addressed by its SHA256 hash. the blockchain references content by hash, and t4 serves the actual bytes. this separation keeps the blockchain lean while enabling storage of large contract code, media, and documents.
when you store content in t4, it computes the SHA256 hash and saves the file under that hash. to retrieve content, you request it by hash. if the bytes you receive do not hash to the requested value, they have been corrupted or tampered with.
store: content -> SHA256 -> /content/{hash}
fetch: /content/{hash} -> verify hash -> content
files are sharded into subdirectories by the first two characters of their hash:
/var/lib/tana/content/
ab/
abc123def456...
cd/
cdef789abc...
this prevents filesystem performance issues when storing millions of files.
t4 is intentionally minimal. it has no networking logic, no replication, and no blockchain awareness. it provides a simple HTTP interface for storing and retrieving bytes by hash.
the blockchain determines what content should exist. validators fetch content from each other based on content references in finalized blocks.
when a validator produces a block with content references:
PUT /content/{hash} - store content (verifies hash matches)GET /content/{hash} - retrieve content by hashHEAD /content/{hash} - check if content existsDELETE /content/{hash} - remove content (garbage collection)GET /health - service health checkt4 is used by tana-ledger for smart contract code storage and by any application that needs to store content with blockchain-verifiable integrity. the content client library provides a convenient TypeScript interface for interacting with t4.
content-addressable storage service for the Tana blockchain.
t4 provides immutable file storage where content is addressed by its SHA256 hash. the blockchain references content by hash, and t4 serves the actual bytes. this separation keeps the blockchain lean while enabling storage of large contract code, media, and documents.
when you store content in t4, it computes the SHA256 hash and saves the file under that hash. to retrieve content, you request it by hash. if the bytes you receive do not hash to the requested value, they have been corrupted or tampered with.
store: content -> SHA256 -> /content/{hash}
fetch: /content/{hash} -> verify hash -> content
files are sharded into subdirectories by the first two characters of their hash:
/var/lib/tana/content/
ab/
abc123def456...
cd/
cdef789abc...
this prevents filesystem performance issues when storing millions of files.
t4 is intentionally minimal. it has no networking logic, no replication, and no blockchain awareness. it provides a simple HTTP interface for storing and retrieving bytes by hash.
the blockchain determines what content should exist. validators fetch content from each other based on content references in finalized blocks.
when a validator produces a block with content references:
PUT /content/{hash} - store content (verifies hash matches)GET /content/{hash} - retrieve content by hashHEAD /content/{hash} - check if content existsDELETE /content/{hash} - remove content (garbage collection)GET /health - service health checkt4 is used by tana-ledger for smart contract code storage and by any application that needs to store content with blockchain-verifiable integrity. the content client library provides a convenient TypeScript interface for interacting with t4.