Language

Choose a language

/docs/rpc / btc

create_mining_work_unit

create_mining_work_unit "network" "payout_script_pubkey" ( "extranonce_tag" "prev_block_hash" ) Issue a fresh broker-mining work unit. Each call mutates the coinbase (payout output + extranonce_tag) so the merkle root rotates and a distinct header_prefix is returned. The work unit is registered in an in-process tracker keyed by the returned req_id; submit_mining_response(req_id, ...) completes the round trip. Arguments: 1. network (string, required) Network this work unit is for (for example "main", "test", or "regtest"). Must match this node's chain. 2. payout_script_pubkey (string, required) Hex-encoded scriptPubKey for the coinbase payout output. 3. extranonce_tag (string, optional, default="") Hex-encoded extranonce bytes appended to the coinbase scriptSig after the height push. Different tags rotate the merkle root. The final scriptSig is bounded by consensus (2..100 bytes); the request is rejected if exceeded. 4. prev_block_hash (string, optional, default="") Build-ahead parent hash. When set, assemble a coinbase-only child of this specific parent instead of the active tip. The parent must equal getmininginfo.build_ahead_parent_hash. Omit or pass an empty string for normal active-tip mining. Result: { (json object) "req_id" : n, (numeric) bcore-issued work-unit identifier "header_prefix" : "hex", (string) 76-byte serialized block header without nNonce, hex-encoded "target" : "hex", (string) 32-byte target derived from the block nBits "expires_at" : xxx, (numeric) UNIX epoch seconds when this work unit will be evicted "height" : n, (numeric) height of the block being assembled "network" : "str", (string) chain name, matching the request "tip_hash" : "hex" (string) hash of the block this work unit builds on (hashPrevBlock) } Examples: > bitcoin-cli create_mining_work_unit "regtest" "5121...ae" "01" > curl --user myusername --data-binary '{"jsonrpc":"2.0","id":"curltest","method":"create_mining_work_unit","params":["regtest","5121...ae","01"]}' -H 'content-type: application/json' http://127.0.0.1:8332/

Signature

create_mining_work_unit(network: string, payout_script_pubkey: string, extranonce_tag?: string, prev_block_hash?: string) → any

Code samples

curl --user "$RPC_USER:$RPC_PASS" \
  --data-binary '{"jsonrpc":"1.0","id":"docs","method":"create_mining_work_unit","params":["\"<network>\"","\"<payout_script_pubkey>\"","",""]}' \
  -H 'content-type: text/plain;' \
  http://127.0.0.1:8332/

Parameters

NameTypeReq.Description
networkstringyesNetwork this work unit is for (for example "main", "test", or "regtest"). Must match this node's chain.
payout_script_pubkeystringyesHex-encoded scriptPubKey for the coinbase payout output.
extranonce_tagstringHex-encoded extranonce bytes appended to the coinbase scriptSig after the height push. Different tags rotate the merkle root. The final scriptSig is bounded by consensus (2..100 bytes); the request is rejected if exceeded.
prev_block_hashstringBuild-ahead parent hash. When set, assemble a coinbase-only child of this specific parent instead of the active tip. The parent must equal getmininginfo.build_ahead_parent_hash. Omit or pass an empty string for normal active-tip mining.

Result

Type:  any

{ (json object) "req_id" : n, (numeric) bcore-issued work-unit identifier "header_prefix" : "hex", (string) 76-byte serialized block header without nNonce, hex-encoded "target" : "hex", (string) 32-byte target derived from the block nBits "expires_at" : xxx, (numeric) UNIX epoch seconds when this work unit will be evicted "height" : n, (numeric) height of the block being assembled "network" : "str", (string) chain name, matching the request "tip_hash" : "hex" (string) hash of the block this work unit builds on (hashPrevBlock) }

Source: services/core-node/bcore/src/rpc/mining.cpp:1797

C++ symbol: create_mining_work_unit

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