Two ways to take part: mining (produce blocks, earn the miner share) and bidding (compete on the Bitcoin chain to become a term's beneficiary). Both are described below. This page is educational; it makes no claims of value, investment, or return.
Mining ThankBitcoin is the same as mining Bitcoin (SHA256d proof of work), with one extra requirement: your node must be able to read the Bitcoin chain, because at each term boundary the node needs Bitcoin data to decide the beneficiary. You choose how it reads Bitcoin — that is the only real setup choice.
git clone https://github.com/thankbitcoin/thankbitcoin cd thankbitcoin # build like Bitcoin Core (see doc/build-*.md), e.g. on Linux: cmake -B build cmake --build build -j$(nproc) # binaries: build/bin/thankbitcoind , build/bin/thankbitcoin-cli
Every miner needs a Bitcoin data source. Two setups:
Zero third-party trust: your node reads Bitcoin from your own bitcoind over local JSON-RPC.
# your own bitcoind must be running with RPC enabled, e.g. bitcoin.conf: # server=1 # rpcuser=YOURUSER # rpcpassword=YOURPASS thankbitcoind \ -tbbtcrpchost=127.0.0.1 -tbbtcrpcport=8332 \ -tbbtcrpcuser=YOURUSER -tbbtcrpcpassword=YOURPASS \ -tbanchorbtcheight=<ANCHOR> -tbbtcstartheight=<ANCHOR-10> \ -addnode=<seed-node>:9333
Read Bitcoin from a public data service instead. No 900+ GB node to maintain; the tradeoff is trusting that source's view of the Bitcoin chain.
B1. Built-in REST source (simplest, zero setup): the node speaks directly to a public Esplora/mempool.space-style API over HTTPS. No proxy, no token.
thankbitcoind \ -tbbtcsource=mempool \ -tbanchorbtcheight=<ANCHOR> -tbbtcstartheight=<ANCHOR-10> \ -addnode=<seed-node>:9333 # (other built-in sources: -tbbtcsource=blockchain or =blockstream)
B2. getblock.io (or any JSON-RPC provider): the node's JSON-RPC client speaks plain HTTP, while getblock.io is HTTPS-with-token. So run the tiny local proxy (getblock_rpc_proxy.py) that forwards local HTTP → getblock.io HTTPS, and point the node at the proxy:
# 1. run the proxy locally (your token stays on your machine) python3 getblock_rpc_proxy.py https://go.getblock.io/<YOUR-TOKEN> 8332 # 2. point the node at the local proxy thankbitcoind \ -tbbtcrpchost=127.0.0.1 -tbbtcrpcport=8332 \ -tbanchorbtcheight=<ANCHOR> -tbbtcstartheight=<ANCHOR-10> \ -addnode=<seed-node>:9333
<ANCHOR> (the Bitcoin height ThankBitcoin anchors term 1 to) and the seed node(s) are published at launch. -tbbtcstartheight should be a bit below the anchor so the poller only fetches the relevant Bitcoin range (not the whole chain from height 0).
thankbitcoin-cli createwallet miner ADDR=$(thankbitcoin-cli getnewaddress) thankbitcoin-cli generatetoaddress 1 "$ADDR" # produce one block to your address
The miner share of each block goes to your address; transaction fees also go to the miner. The beneficiary share goes to whoever won that term's bid (or is burned in a no-bid fallback term) — that part is decided on the Bitcoin chain, not by you.
generatetoaddress: this is built-in CPU mining — fine while difficulty is low (early/cold-start). As real hashrate joins and difficulty rises, CPU mining stops finding blocks; the standard approach then is external mining hardware or a pool driving your node via getblocktemplate (same as Bitcoin, since the PoW is SHA256d).Bidding is how you compete to become a term's beneficiary (the address that receives the beneficiary share of every block in that term). You do it by publishing one structured transaction on the Bitcoin chain — no ThankBitcoin server involved.
A qualifying bid is one Bitcoin transaction with these outputs, in this order:
vout[0] → bid recipient amount = your bid (≥ 1092 sat)
= bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8 (fixed; bitcoin.org donation address)
vout[1] → previous beneficiary amount ≥ 1092 sat (the "link" output; read it from the explorer)
vout[2] → change back to your own address
vout[3] → OP_RETURN, 0 value, 52 data bytes:
6a 34 || <32B: H_end> || <20B: your payout address HASH160>
| Output | What it is |
|---|---|
| vout[0] — bid | Your bid, sent to the fixed recipient above. Higher bid = better rank inside the decisive block. Min 1092 sat; set it higher to actually win. Spent and unrecoverable. |
| vout[1] — link | A small output (≥1092 sat) to the current term's nominal beneficiary (for public bids from term 2 on, this is the previous term's winning bidder). Chains the lineage. Read the exact address from the explorer. |
| vout[2] — change | Your own change. No special meaning. |
| vout[3] — data | OP_RETURN with the previous term's last block hash H_end (binds the bid to this round; prevents replay) + the 20-byte HASH160 of your payout address. Must not be all-zero. |
bitcoin-cli getaddressinfo <your-bc1q-addr> → the witness_program field (40 hex) is the 20-byte HASH160.[{...},{...}] so order is preserved. createrawtransaction rejects a repeated address, so vout[0] (fixed bid address) and vout[1] (previous beneficiary) must be different — which they are for normal public bids (term 2 onward).
IN='[{"txid":"<your-utxo-txid>","vout":<n>}]'
# 52-byte OP_RETURN data = H_end (64 hex) + your payout HASH160 (40 hex) = 104 hex
DATA=<64 hex of H_end><40 hex of your HASH160>
# ordered array: bid, link, change, data. amounts in BTC (0.00005 = 5000 sat; vout[0],[1] ≥ 1092 sat)
OUTS='[{"bc1qp6ejw8ptj9l9pkscmlf8fhhkrrjeawgpyjvtq8":0.00005000},'\
'{"<previous-beneficiary-addr>":0.00001092},'\
'{"<your-change-addr>":<change-amount>},'\
'{"data":"'$DATA'"}]'
bitcoin-cli createrawtransaction "$IN" "$OUTS"
bitcoin-cli signrawtransactionwithwallet <rawtx> # sign in YOUR wallet
bitcoin-cli sendrawtransaction <signedtx>