Mining RPCs
RPC commands for MatMul proof-of-work mining, block template construction, and difficulty monitoring.
هذه المرجعية جزء من طرح التشغيل في BTX.
ارجع إلى موقع Mine المصغر لتقرأ هذا الدليل داخل الأطروحة التشغيلية، وسياق بنية الذكاء الاصطناعي، وحزمة إطلاق التعدين.
getblocktemplate
Returns data needed to construct a block. The miner must solve the MatMul proof-of-work over the returned header fields.
btx-cli getblocktemplate '{"rules": ["segwit"]}' Key response fields for MatMul mining:
| Field | Description |
|---|---|
previousblockhash | Hash of the current chain tip |
target | Current difficulty target |
matmul_dim | Matrix dimension (512 mainnet) |
seed_a, seed_b | Deterministic base matrix seeds derived from chain state |
noncerange | 64-bit nonce range: 0000000000000000ffffffffffffffff |
Mining Algorithm
For each nonce candidate:
- Derive perturbation matrices E, F from candidate header + nonce
- Compute C' = (A+E)(B+F) over F(2^31 − 1)
- Hash the transcript: H(A+E ∥ B+F ∥ C')
- If hash < target, submit the block
submitblock
Submit a solved block to the network.
btx-cli submitblock "hexdata" getmininginfo
Returns current mining state including MatMul parameters.
btx-cli getmininginfo Response includes:
blocks— current block heightdifficulty— current network difficultymatmul_n— matrix dimension (512)matmul_b— transcript block size (16)matmul_r— noise rank (8)networkhashps— estimated network hash rate
getdifficultyhealth
Returns comprehensive difficulty health metrics for network monitoring.
btx-cli getdifficultyhealth Response categories:
- recent_interval_stats — mean, p50, p90, p99, stddev of recent block intervals
- reward_distribution — HHI, Gini coefficient, top miner share, longest streak
- reorg_protection — configuration state and rejection counters
- consensus_guards — Freivalds transcript-binding, ASERT half-life visibility
getnetworkhashps
Returns estimated network hashes per second.
btx-cli getnetworkhashps [nblocks] [height] getmatmulchallenge
Get the current network-bound MatMul challenge with full header context.
btx-cli getmatmulchallenge Returns the exact header context for sigma reproduction, work profile metrics, and pre-hash lottery exposure.
generatetoaddress
Generate blocks to a specific address (regtest/testing only).
btx-cli generatetoaddress 1 "btx1z..." Note: Regtest uses
fSkipMatMulValidation=trueby default, so MatMul proofs are not verified in regtest mode.