The Ting wiki
A foundation that doesn't move
Most programmable blockchains keep changing their own rules. Ting writes a small, simple set of consensus rules once and fixes them for good: no developer, miner or foundation can change them, and every node proves it follows them by replaying a test suite stored in the chain's own first blocks. Everything else is a program that anyone can deploy and others can build on, on rules meant to stay the same for generations.
The problem#
On most programmable chains, a new signature scheme, opcode, fee rule or token standard is a protocol upgrade. Every node has to change together, and each change can alter what existing applications do or what they cost. Whatever cryptography is built in stays built in until the next upgrade replaces it.
Over time the base layer collects special cases: built-in accounts, built-in assets, precompiled functions, repriced instructions. The rules that applications depend on are never quite settled.
The approach#
Ting's consensus does four things, and nothing else.
- OrderTransactions are ordered in blocks secured by SHA-256 proof of work.
- ExecutePrograms run deterministically in a small, exactly specified WebAssembly profile.
- CommitEvery block commits to its transactions, their receipts and the resulting state.
- CountFour independent counters bound the compute, state access, data and storage growth of every transaction.
Accounts, signatures, coins, fees, replay protection and upgrades are not on that list. They are programs, deployed and used through ordinary transactions. What is left is small: two kinds of transaction, 115 instructions, twelve host functions and four counters, with no accounts, no native coin and no fees anywhere in it.
What that gives you#
Once the protocol is frozen, every instruction keeps its meaning and its resource charge for as long as the chain runs.
A new signature scheme or hash function is deployed as a program. Applications move to it when they choose, without a protocol change.
There is no native coin, account model or fee asset. The chain does not pick winners among the programs built on it.
Work is counted in logical units, not prices or nanoseconds. Faster hardware does not change what an operation costs.
Miners vote block capacity up or down, slowly, above floors fixed at genesis and with no ceiling. They cannot vote to change the rules.
Implementations may compile, cache or parallelize freely, as long as every result and every counter matches.
Agreement you can check#
Freezing the rules only helps if independent implementations agree on every byte and every counter. Ting is built so that agreement can be checked, not assumed.
- The rules in one place. The protocol rules state every format, instruction, price and failure order in one self-contained document, down to SHA-256; with a network's seed blocks they define its consensus completely. Nothing is left to an engine's defaults or a library's version.
- A test suite inside the chain. Every chain begins with its seed: thousands of transactions that run every instruction and host function, every price step and every reachable outcome, each with the receipt the rules give it. Nodes hold the seed's block ids, so a node that syncs has replayed the whole suite. If its own execution ever disagrees, the reference node stops and names the first transaction it got wrong.
- Vectors for the rest. What a valid chain can never contain, such as malformed blocks, is covered by portable consensus vectors.
- Counters, not estimates. Every receipt records exactly how much compute, state access, data and growth its transaction used, so implementations agree on costs to the unit, not only on results.
Four layers, four speeds of change#
One idea makes the rest of this wiki easier: every rule belongs to exactly one layer.
| Layer | Who can change it | Examples |
|---|---|---|
| Consensus | Nobody, once frozen | Block and transaction formats, instructions, resource charges, the voting rule |
| Capacity | Miners, by work-weighted vote | Block limits for compute, state access, data and growth |
| Node software | Any implementer, at any time | Database, compiler, networking, mempool policy |
| Applications | Anyone, by deploying programs | Accounts, signatures, assets, fees, upgrades |
What defines the consensus. The protocol rules, together with a network's seed blocks, define Ting's consensus, and nothing else does. This wiki explains it: what each part does, why it is built that way and how to use it. Where the wiki and the protocol rules differ, the rules decide and the wiki is corrected. The pages under Running a node describe the Rust reference node, which implements the rules and serves this wiki.