Concept
TenQ proof of work
TenQ, the memory-hard, GPU-oriented proof-of-work function of Tenrai. Its dataset, epochs, full and light mode and network profiles.
TenQ is the proof-of-work function of Tenrai. A miner hashes a 323-byte preimage, the text TRAI_POW_V1 followed by the work header, into a 256-bit value. The block is valid when that value is at or below the target of the block's anchor.
Construction
| Part | Size | Role |
|---|---|---|
| Dataset | 2 GiB | Read-only table, read at positions that depend on the data |
| Scratchpad | 8 KiB | Private, writable state of each attempt |
| Programs | 4 | Integer programs, each depending on the one before |
| Rounds | 1,024 | Per evaluation |
| Cache | 32 MiB | Rebuilds any dataset entry exactly, 160 cache reads per entry |
SHAKE256 is the cryptographic primitive. All arithmetic is integer arithmetic, so every CPU and GPU returns the same value.
Full and light
| Mode | Memory | Speed |
|---|---|---|
| Full | The 2 GiB dataset | What miners use |
| Light | The 32 MiB cache | The same result, computed entry by entry; many times slower |
Both are valid for mining and for checking. Nodes and pools check blocks in full mode when they have the memory, and in light mode otherwise.
Epochs
The dataset changes every 34,560 cuts, once a day. A block's epoch follows from its anchor's height. Nodes, miners, bridges and pools build the next dataset 1,024 cuts ahead, when 2 GiB plus 512 MiB of memory are free, so the change does not pause them. Without that room they work in light mode until the new dataset fits.
Profiles
| Profile | Identifier | Dataset | Used by |
|---|---|---|---|
| Production | 0x54454E10 | 2 GiB | Mainnet and the testnets |
| Test | 0x54454E01 | 1 MiB | The development network |
The network's genesis manifest selects the profile. A local option cannot change it.
Your hashrate
tenrai-miner --benchmark measures what your hardware does, see Start mining.
What proof of work does
Proof of work decides who may add blocks and distributes half of all new TRAI to whoever contributes hashrate, without a registration or a minimum stake. The difficulty follows the hashrate so that about 50 blocks per second are found, see Work blocks and cuts.
