Hi everyone,
I’m trying to start mining on my private Peercoin fork (Testnet) and I’ve choosen ntgbt miner to do it, a simple miner which exploits the RPC commands. GitHub - vsergeev/ntgbtminer: A no thrills getblocktemplate Bitcoin miner, written in Python.
It can connect with the chain, but when submitting the new block it returns an error.
Submitting manually through the RPC with “submitblock” I get “Block does not start with a coinbase” and trying to decode the transaction with “decoderawtransaction” returns “TX decode failed”.
QUESTION
I was wondering if Bitcoin miners are still compatible with Peercoin ?
If not, what is the problem with this block / transaction ?
I was thinking to make this miner compatible also for Peercoin in case this is not too complicated…
TEMPLATE
{
“capabilities”: [
“proposal”
],
“version”: 3,
“rules”: [
“csv”,
“!segwit”
],
“previousblockhash”: “00005ba98b590b60c7df80b06a892993f5dd6235e54708480019426d38c1945f”,
“transactions”: [
],
“coinbaseaux”: {
},
“coinbasevalue”: 8408120000,
“longpollid”: “00005ba98b590b60c7df80b06a892993f5dd6235e54708480019426d38c1945f2”,
“target”: “0007ffff00000000000000000000000000000000000000000000000000000000”,
“mintime”: 1624194519,
“mutable”: [
“time”,
“transactions”,
“prevblock”
],
“noncerange”: “00000000ffffffff”,
“sigoplimit”: 80000,
“sizelimit”: 4000000,
“weightlimit”: 4000000,
“curtime”: 1625761879,
“bits”: “1f07ffff”,
“height”: 1,
“default_witness_commitment”: “6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9”
}
GENERATED BLOCK
030000005f94c1386d421900480847e53562ddf59329896ab080dfc7600b598ba95b000016e5f8cb4524b74c25af4849e2334bd66ea5f519ba92ac76f12d8d111c2fce658928e760ffff071f8d5500000101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0c010161626364656600000000ffffffff01c0ba29f5010000001976a914aeae10fcd9256bbc45f8b2a09a4e2fba7e05178f88ac00000000
BLOCK DECOMPOSITION I DID (Reference: Bitcoin Technical Guide | Simple Explanations of How Bitcoin Works)
version: 03000000
previous hash: 5f94c1386d421900480847e53562ddf59329896ab080dfc7600b598ba95b0000
merkle root: 16e5f8cb4524b74c25af4849e2334bd66ea5f519ba92ac76f12d8d111c2fce65
time: 8928e760
bits: ffff071f
nonce: 8d55000001
version:01000000
#input
count: 01
txid: 0000000000000000000000000000000000000000000000000000000000000000
ffffffff
#scriptsig
size: 0c
scriptSig: 010161626364656600000000
ffffffff
#output
count: 01
value: c0ba29f501000000
size: 19
scriptPubKey: 76 a9 14aeae10fcd9256bbc45f8b2a09a4e2fba7e05178f 88 ac #P2PKH
locktime: 00000000
NOTE
there was a similar unanswered question last year: