Public repo: github.com/Blockvase/c_datum_prime
A C translation of RATUM Prime by iohzrd.
License: GNU Affero GPL v3 or later. See LICENSE and NOTICE.
This repo is only the DATUM pool server (Prime). It is not a full mining stack, not a public Stratum server, and not the LAN miner gateway. Cloning and running this binary will not hash or pay anyone by itself.
To get a Knots node, CONVOY DATUM Gateway, and miners working first, follow
bitcoin-blake2b.org/mining. That guide
leaves you in solo mode (datum.pool_host empty,
datum.pooled_mining_only false).
CONVOY DATUM Gateway is separate MIT software. Do not merge this tree into it.
When Knots and CONVOY DATUM are up, replace the datum object in
datum_gateway_config.json with:
"datum": {
"pooled_mining_only": true,
"pool_host": "pool.blockvase.com",
"pool_port": 28915,
"pool_pubkey": "d89f714cfe7bd9022794b42e2b9b7c196cdd0e16165df0300d788a1b18a86da20654de460ece16e2a2e88d1f8ad316f728c2b5b731d259afd55229375c905439"
}Restart CONVOY DATUM. Keep your ASIC on the gateway's Stratum port (23334 in
the guide). Do not point miners at Prime.
If you run your own Prime instead of Blockvase's, use the pool_pubkey
printed at startup, pool_host 127.0.0.1 (or that host's public name),
and pool_port 28915. From this LAN, pool.blockvase.com:28915 may
time out (no hairpin); use 192.168.1.206.
Aligned with RATUM Prime (698a236) on the live path:
- Keys, listen, CONVOY DATUM/RATUM hello (v1 and v3), signed 0x99 config.
- Coinbaser split from a durable share ledger (RATUM window math, fee
--fee-bps,--min-payout546). Identities areusernameup to the first.. Mainnet P2PKH1..., P2SH3..., SegWitbc1q..., and Taprootbc1p...become scripts; up to 128 split outputs are served. require_splitafter a 30s grace (RATUM).--no-require-splitto turn off.- Share PoW (header-v2, twelve zero bytes in the coinbase hole), replay guard, credit into the ledger.
- v3 ABW: 0xA8 notices, key in H1, mask, 0xA5 receipts, 0x8F exact ref,
rotate, delayed 0xA9 reveal.
--abw-disabledif you need the old path. - Resume tokens honored (ABW keys + coinbaser id).
- Block relay: nbits,
0x50 0x12/0x92, merkle,submitblockviabitcoin-clicookie, hex underdata/blocks/. Parses0x90/0x91/0x94. - Bulk framing (
DBF\x01/DBA\x01) for large replies. - Stats HTTP (default
0.0.0.0:28917,/,/stats.json, and/pool.jsonfor the Blockvase website relay). - One thread per gateway.
--self-testcovers framing, handshake, header vectors, split 75/25 and >8 outputs, Base58Check, bech32, zero xor mask.
AGPL section 13: corresponding source is this GitHub repo and
http://pool.blockvase.com:28916/ (also in the MOTD). Forward TCP 28916
(and 28917 if you want stats off-LAN). The tarball excludes data/
(keys, ledger) and build/.
systemd unit: contrib/c-datum-prime.service (TimeoutStopSec=15,
KillMode=mixed; SIGTERM can hang on an open DATUM session).
GET /pool.json on the stats listener returns public pool metadata for the
Blockvase Pool tab. It includes schema_version, endpoint, source URL,
pubkey, fee, payout address types, connected DATUM clients, share-window
progress, blocks found, and miners by window work percent. It intentionally
does not include RPC credentials, private keys, or local ledger file paths.
Needs libsodium and CMake.
cmake -S . -B build
cmake --build build
./build/c-datum-prime --self-test
After the mining guide you already have Knots. Then:
./build/c-datum-prime --keys data/pool.keys
Keys, ledger, and submitted-block files are created under data/ relative
to the working directory. Bitcoin RPC defaults to $HOME/.bitcoin. Override
with --bitcoin-datadir, --ledger, --block-dir, and --payout-script.
Do not forward 8332, 7152, or 23334. Forward 28915 when this Prime is public, and 28916 if remote users should fetch source (AGPL section 13).
Use a distinct process name from datum_gateway so Knots
blocknotify=killall -USR1 datum_gateway does not signal Prime.
- Own tree, keys, ports, and unit.
- Knots RPC stays on localhost.
- This binary binds loopback until you pass
--listenwith another address.