vsergeev / ntgbtminer

A no thrills getblocktemplate Bitcoin miner, written in Python.
MIT License
84 stars 42 forks source link

Error on block submission #6

Closed asadhayat1068 closed 4 years ago

asadhayat1068 commented 4 years ago

I am trying to mining on private peercoin forked network. When the block is found, an error occurred during submission of block.

Solved a block! Block hash: 0000000d5ab62bdb1eab6e896445cf1aef78fe826770738b7258fd67fc4ea212
Submitting: 0300000094c7f068b4fe7ffd581c1b75e5ee20eca72780e309bf6de73a49395f0300000053a1ec385c7b91514c73386cbf7253bc4765a9cda352cf04c73575735219ee2341ed265effff0f1d100eac2e0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff18010148656c6c6f2066726f6d205370696465722100000000ffffffff0100078142170000001976a914a9c679338365a9006088646cb630b7cfd535e22288ac00000000 

Inside rpc
Preparing Request
Traceback (most recent call last):
  File "ntgbtminer.py", line 435, in <module>
    standalone_miner(bin2hex("Hello from Spider!"), "PQ4s7ZxMAGt197eL9ths3Jensn7vSqbJ6r")
  File "ntgbtminer.py", line 432, in standalone_miner
    rpc_submitblock(submission)
  File "ntgbtminer.py", line 63, in rpc_submitblock
    try: return rpc("submitblock", [block_submission])
  File "ntgbtminer.py", line 42, in rpc
    f = urllib2.urlopen(request)
  File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 500: Internal Server Error
vsergeev commented 4 years ago

I would double check the debug log on the forked daemon. I've made some modernization changes to ntgbtminer and added a check on the block submit response (though the error is happening earlier in your case). Mining and block submission are working with bitcoind in regtest mode.

Closing for now, but feel free to re-open if you suspect there is a problem with the block submission format.