Still getting this error.
2 LTC bounty if someone can help me solve this.
2013-12-24 17:23:54+1030 [Protocol,4,213.153.156.208] Submitting Block with Submit Block
2013-12-24 17:23:54+1030 [HTTPPageGetter,client] Submit Block call failed, trying GetBlockTemplate
2013-12-24 17:23:54+1030 [HTTPPageGetter,client] Hit Block_template.py
2013-12-24 17:23:54+1030 [HTTPPageGetter,client] hit template registry
2013-12-24 17:23:54+1030 [HTTPPageGetter,client] Unhandled error in Deferred:
2013-12-24 17:23:54+1030 [HTTPPageGetter,client] Unhandled Error
Traceback (most recent call last):
Failure: twisted.web.error.Error: 500 Internal Server Error
Same here, not sure what the problem is
I've been trying ot give him a hand with the issue. Haven't got too far yet as I'm troublshooting without a copy to test fixes on but I suggested a few things to start off.
First in stratum-mining / lib / bitcoin_rpc.py between line 49 and 50 add the line
log.exception("Problem Submitting block with submitblock %s" % str(e))
That should give a better description of the error
I was waiting to hear back from him if the issue is intermittent or constant and if he can successfully manually submit a block.
If its intermittent a work around could be to run the submitblock thought a loop to try a few times before failing.
I have to go to sleep now as its quite late here but tomorrow (for me) if this hasn't been fixed I'll set up a test environment so I can reproduce the error which will make it much easier for me to track down.
EDIT: I spelled log.exception wrong, re-edited with proper spelling
I Have found an issue with the latest Ahmed_Bodi stratum version (Just like the instructions in this thread) with another coin I work with, however I believe you are having the same problem.
There is a check in Bitcoin_rpc.py that does a get block and compares the hash to the hash that was just submitted. This is to make sure the block was actually put on the block chain.
The issue comes in with coin daemons that only recognize the scrypt_hash_hex and not the block_hash_hex when using the get block command. This is where your 500 error is coming from. As a temporary solution I have passed the scrypt_hash_hex with the other 3 parameters to the submit block function in the bitcoin rpc. There needs to be changes in four spots.
I will work on a correct solution and submit a pull request when ready.
In the meantime , I could put up the 'hacked' version as a quick fix for those having trouble.