Technical specification & operator guide
Documentation
Tally is a proof-of-work receipt ledger. Every payment signs who paid, who was paid, the amount, a single-line memo, and an optional 32-byte off-chain work mark. Both browser clients and Node.js processes execute the exact same verification rules in client/protocol.js.
1. Protocol constants
| Parameter | Value | Rule |
|---|---|---|
| UNIT | 1,000,000 notches | 1 tTALLY (6 decimal places) |
| MIN_FEE | 10,000 notches | 0.01 tTALLY minimum miner fee |
| MEMO_MAX | 140 UTF-8 bytes | Required, single line (CR/LF rejected) |
| BLOCK_REWARD | 8 tTALLY + fees | Unlocks after MATURITY (3 blocks) |
| FAUCET_DRIP | 25 tTALLY | Once per 60 minutes per address, fee 0 |
| TARGET_MS | 20,000 ms | Per-block retarget, clamped 0.25×–4× |
2. Keys & addresses
A wallet secret is 32 random bytes represented as 64 lowercase hex characters. From that seed, Tally derives an ed25519 public key (32 bytes), appends a 4-byte double-SHA-256 checksum, encodes the 36 bytes in Base58, and prepends tally1.
3. Canonical receipt format
Signatures cover nine newline-separated UTF-8 lines with no JSON whitespace ambiguity:
tally.tx.v1
<type: pay | faucet | coinbase>
<from: tally1… | coinbase>
<to: tally1…>
<amount in integer notches>
<fee in integer notches>
<nonce: integer >= 0>
<memo: 1..140 UTF-8 bytes, no \r or \n>
<ref: 64 lowercase hex chars or empty>
The notch is SHA-256(utf8(memo)). The transaction ID is SHA-256(canon + "\n" + sig). When any user opens a receipt in the explorer, the browser recomputes the notch from the memo and verifies the ed25519 signature against the public key decoded from from.
4. Proof of work & faucet
Block headers serialize as tally.block.v1 over height, previous hash, timestamp, difficulty, miner address, transaction Merkle list hash (txRoot), and a 32-bit unsigned nonce. A block is valid when SHA-256(header) < 2^256 / difficulty. At most one transaction per sender address is included per block.
Testnet coins enter circulation only through mined coinbase rewards and signed faucet receipts (where from === to, memo is faucet, and 60 minutes have passed since the account’s previous drip). There is no premine or admin mint key.
5. Mine against the public network
The CLI miner defaults directly to https://tallychain.org—you do not need to run a local server to mine public blocks:
git clone https://github.com/Tally-Chain/tallychain.git
cd tallychain
npm install
node miner/miner.js tally1YourAddressHere
6. HTTP JSON API
GET https://tallychain.org/api/stats
GET https://tallychain.org/api/blocks?limit=12&before=HEIGHT
GET https://tallychain.org/api/block/:heightOrHash
GET https://tallychain.org/api/receipts?limit=12
GET https://tallychain.org/api/tx/:id
GET https://tallychain.org/api/account/:address
GET https://tallychain.org/api/search?q=QUERY
GET https://tallychain.org/api/work?address=tally1…
POST https://tallychain.org/api/work { "id": "…", "nonce": 12345 }
POST https://tallychain.org/api/tx { "tx": { …signed tally.tx.v1… } }
7. Run an independent local node
One Node.js process serves the chain state, JSON API, wallet, and explorer on your own machine:
npm test
npm start # http://localhost:8344
# Point the CLI miner at your local node instead of tallychain.org:
node miner/miner.js tally1YourAddressHere --node http://localhost:8344
Optional environment variables: PORT (default 8344), DATA_PATH (default data/chain.json), NODE_PAUSE (ms pause every 500 hashes on the built-in background miner), and MINER_SEED (64-hex secret for node rewards).