Language

Choose a language

/docs / zmq

ZMQ topics

TensorCash inherits Bitcoin Core's ZMQ pub/sub surface unchanged. The publisher binds (default tcp://127.0.0.1:28332); subscribers connect and SUBSCRIBE to topic prefixes. Every notification is a 3-frame multipart message — the per-topic body layout lives in the table below.

Note: this page covers the upstream Bitcoin-Core inheritance pub/sub. The bcore ↔ verifier validation channel is a separate ZMQ PUSH/PULL stream whose payloads use the FlatBuffer schemas at /docs/schemas/ (proof.fbs, validation.fbs, blockheader.fbs).

5 topics · spec_origin: inherit

Frame envelope

Publisher binds; subscribers connect and SUBSCRIBE to topic prefixes. Topic strings are matched as byte prefixes — `SUBSCRIBE "hash"` receives both `hashblock` and `hashtx`.

Frame Field Type Description
0 topic utf-8 string One of the topic names below.
1 body per-topic Defined by the topic. See `frames[1]` per topic.
2 sequence_counter uint32 little-endian Monotonically increasing per-topic counter. Subscribers detect dropped messages by checking for gaps. Resets on bcore restart.

hashblock

-zmqpubhashblock=<address>

Semantics — Best-block-tip changed (new block connected to the active chain).

A block is connected to the main chain. Fires once per UpdatedBlockTip callback.

Frame Field Type Description
1 block_hash 32 bytes, little-endian (display-reversed) The connecting block's hash. Note Bitcoin Core's display convention reverses byte order — the wire bytes are little-endian; tooling that prints hex usually reverses them for display.

Source: services/core-node/bcore/src/zmq/zmqpublishnotifier.cpp:228

hashtx

-zmqpubhashtx=<address>

Semantics — Transaction entered the mempool or was confirmed in a block.

Fires for every TransactionAddedToMempool and BlockConnected event; may emit duplicates for the same hash if a tx is re-broadcast or re-mined after a reorg.

Frame Field Type Description
1 tx_hash 32 bytes, little-endian (display-reversed) The transaction hash (txid).

Source: services/core-node/bcore/src/zmq/zmqpublishnotifier.cpp:239

rawblock

-zmqpubrawblock=<address>

Semantics — Full serialized block on best-tip change.

Same trigger as hashblock — but the body is the full block, not just its hash. Heavier; only enable if a subscriber actually needs full block bytes (e.g. an indexer that does not have its own bcore peer).

Frame Field Type Description
1 block_serialized variable-length bytes The block, serialized using Bitcoin Core's standard block serialization (CBlock::Serialize). Includes the header, tx count (var_int), and all transactions in order.

Source: services/core-node/bcore/src/zmq/zmqpublishnotifier.cpp:252

rawtx

-zmqpubrawtx=<address>

Semantics — Full serialized transaction.

Same trigger as hashtx — body is the full serialized transaction (CTransaction::Serialize). Subscribers can fully decode without round-tripping to JSON-RPC.

Frame Field Type Description
1 tx_serialized variable-length bytes The transaction, serialized with Bitcoin Core's standard transaction serialization. Witness data included when present.

Source: services/core-node/bcore/src/zmq/zmqpublishnotifier.cpp:261

sequence

-zmqpubsequence=<address>

Semantics — Mempool + block connect/disconnect event stream.

Block-connect, block-disconnect, mempool-accept, and mempool-remove events. The body's `event` byte tells subscribers which type. Useful for indexers that need a single ordered event stream rather than the separate hashblock/hashtx topics.

Frame Field Type Description
1 hash + event_byte (+ optional mempool_seq) 32-byte hash || 1-byte event || optional 8-byte LE mempool_sequence Body layout depends on the event: • `'C'` (block connect) — hash || 'C' • `'D'` (block disconnect) — hash || 'D' • `'A'` (mempool accept) — hash || 'A' || mempool_sequence (uint64 LE) • `'R'` (mempool remove) — hash || 'R' || mempool_sequence (uint64 LE) The 32-byte hash is little-endian on the wire (same convention as the hash topics). `mempool_sequence` is a separate per-mempool counter — distinct from the topic-level sequence_counter in frame 2.

Source: services/core-node/bcore/src/zmq/zmqpublishnotifier.cpp:264

Subscriber examples

Python (pyzmq)

import struct
import zmq

ctx = zmq.Context()
sock = ctx.socket(zmq.SUB)
sock.connect("tcp://127.0.0.1:28332")
sock.setsockopt(zmq.SUBSCRIBE, b"hashblock")
while True:
    topic, body, seq_le = sock.recv_multipart()
    (seq,) = struct.unpack("<I", seq_le)
    # block_hash bytes are little-endian; reverse for display hex
    display_hash = body[::-1].hex()
    print(f"seq={seq} {topic.decode()}: {display_hash}")

Node.js (zeromq.js)

import zmq from "zeromq";

const sock = new zmq.Subscriber();
sock.connect("tcp://127.0.0.1:28332");
sock.subscribe("rawtx");
for await (const [topic, body, seqLe] of sock) {
  const seq = seqLe.readUInt32LE(0);
  console.log(`seq=${seq} ${topic.toString()} ${body.length} bytes`);
}

Our mission

TensorCash turns useful AI work into open money.

Out of the potato age, as our whitepaper says…

We believe people deserve a cheaper, more efficient financial system, and fairer AI that works for everyone. TensorCash makes AI work verified and verifiable. Verification gives AI a face: proof of which model did the work, what it saw, and the rules it followed. That lets anyone confidently buy or sell AI work at the most efficient price. The result is more accessible, more sustainable AI, powering a new generation of financial systems. Today's currencies are the potatoes: antiquated, expensive to move, and trapped behind fee-takers. TensorCash is a more efficient way to move and store value — one that harnesses AI's computational power for everyone while pushing the control outward instead of concentrating it.

— Imosuke Takakuni

About us

Imosuke Takakuni is a pseudonym. The Japanese name is both a tribute to Satoshi Nakamoto and a nod to Potato Land — the parable from our whitepaper. The mission is bigger than any one contributor; it should outlast personalities and charisma. Decentralisation works for everyone, or it doesn't work at all. We want everyone to participate in TensorCash as equals.

Open the mission page →

Get involved

How to get TSC

TensorCash is not selling TSC. The project is not running a token sale, pre-sale, ICO, IDO, or official investment round. New TSC enters circulation through active mining. You can mine it, receive it peer-to-peer from someone who already has it, or run the wallet and be ready for mainnet.

TensorCash is not running an official sale. Do not send money to anyone claiming to sell official allocations.

Get involved

Run the Core wallet

The practical first step is to run TensorCash Core, create a wallet, and learn the RPC surface. Today the public guide starts with regtest so you can create addresses and move coins locally before touching mainnet funds.

Get involved

Donate

No mainnet donation address is published yet. For testing only, the TensorCash testnet address below was generated from the running Core wallet; do not send mainnet funds to it.

Get involved

Spread the word

The shortest useful explanation is: TensorCash turns useful AI work into open money. Share the mission page, the flagship whitepaper, or the Get involved page with one person who cares about cheaper financial rails, fairer AI, or open infrastructure.

TensorCash turns useful AI work into open money.

Get involved

Emission schedule

Bitcoin set the baseline: block rewards only, no discretionary minting, and an exact integer subsidy total of 20,999,999.97690000 BTC. TensorCash keeps the fixed-supply discipline and changes the release curve for a compute-mined network; the implemented recurrence ends at 21,184,153.03530240 TSC.

Supply over blocks

Total subsidy issued

Exact integer subsidy rules from Core: Bitcoin halvings against the TensorCash epoch-decay schedule, shown through the first 6,000,000 blocks.

Horizon
...
BTC @ 6M
...
TSC @ 6M
...
BTC and TSC total subsidy over block count At 6,000,000 blocks, Bitcoin has issued 20,999,999.92710000 BTC and TensorCash has issued 20,979,987.36365355 TSC under the implemented epoch-decay schedule.
Block 0
BTC supply 0 BTC
TSC supply 0 TSC
BTC: 50 BTC, 210,000-block halvings TSC: 715 TSC, 715-block epoch, reward x 3/5, capped epoch length