-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem Submitting block 500 Internal Server Error #48
Comments
This one is interesting. As you have already found, the error is being reported in
We try to submit the block by the
The other interesting thing is the high difficulty on the share. Typically we will not see this line. https://github.com/moopless/stratum-mining-litecoin/blob/PoS/lib/template_registry.py#L239. Please add some debugging to the code above and let me know what the exception is. |
Hi thanks for your help! |
@nicoschtein Good find. It very well could be resource contention. Can you increase the POOL_TARGET to decrease the load on the server and see if the issue persists? I haven't seen that issue before. It seems that the there is a timeout connecting to the RPC server. Is is it local? Does your server have enough resources? |
I've run into the same error with trying to get this working with BitGem. I started with the master branch, with which I lost four blocks before stopping it. I switched to the PoS branch, and lost a block after it had only been running a few minutes (fortunately). This is what's in the stratum server's log:
The bitgemd log doesn't indicate anything's amiss. Is there something I can enable to get more debugging output from either the stratum server or bitgemd? The stratum server had DEBUG set to false and LOGLEVEL set to INFO for the log given above; I'll try again with true and DEBUG, respectively and see if anything useful comes up. |
@salfter BitGem seems to be a PoS coin, so please use that branch, but I have not tested it at all. It should work since it is a fork of novacoin, but may have changed something with the 3 types of gem payout. Please see #48 (comment) on how to put in the debugging logging. I'll push it in the next couple of days. @nicoschtein Any update on this issue? Are you still seeing the issue? This in general is an external issue from stratum-mining-litecoin. Basically when we try to use the rpc standard to submit a coin we are getting an exception. To accommodate multiple coins we try |
AFAIK the gem payout thing is just some sort of optional feature of the WIMP clients, which I've not used as my mining rigs are headless. Underneath that, there's still just one Bitgem unit. bitgemd has a getgems API call, but I've not tried doing much with it. I think it can be safely ignored. I've edited lib/bitcoin_rpc.py as mentioned above and am waiting for another block to come in (it's on the slower of my two GPUs, so it'll probably be a few hours). |
Looks like neither submitblock nor getblocktemplate are working:
|
We need to see what the requirements for submitting a block are for this coin daemon. The 500 Internal Server Error in my experience means that the coin daemon do not support the method. We have tried both |
bitgemd has a few of these in its log:
Early on, I had to make a change in script_to_pubkey() in lib/util.py. It assumed that coin addresses are 33 characters. I tweaked it to allow for the 34-character address I had been using for mining, but I'm guessing there's an incomplete address copy somewhere. This code doesn't appear in the master branch, so in my copy of the PoS branch, I've replaced script_to_pubkey() in lib/util.py with script_to_address() from lib/util.py in master and replaced lib/coinbaser.py with the version in master. I'm now letting it run again, on the theory that the coinbaser in the PoS branch might've been out of date. ...time passes... Still not working...got the same error in the bitgemd log as above. Creating an issue...done: |
The code in the PoS branch was changed to work with PoS coins due to the signing. You mentioned that you made a change to the code to allow 34-character addresses. What did you change to make? Do you have the public key or the address set as CENTRAL_WALLET? It should be set to the pubkey for PoS coins. |
The first change I made was to accept an address of either 33 or 34 characters. I was using an address, not a pubkey...if a pubkey is what I should've been using, I'll back out my changes and try again. I just got the bitaddress.org code working with Bitgem today, so I can get the pubkey for the address I've been using. |
The signing would be wrong because it is missing the pubkey and instead is using the address. I would say back out all of the changes and set CENTRAL_WALLET = pubkey on the PoS branch. You can get the pubkey with
So I would set |
I went ahead and did that...Bitgem txid a73e938756f2d41badc244276c8e0aac58389928661cc71404cbab77afe70080 was successfully mined through the stratum server. Next step is to try getting mmcfe-ng (or something similar) running. |
Thank you for the update. Closing as it is working. |
I personally still get 500 server errors on block submits (specifically with Starcoin at the moment). It uses submitblock, and will occasionally error out with a 500 response from the coin daemon. It could very well be a bug in the coindaemons that we're all experiencing. I will put a few retry attempts in the code first and see how it fares. I was able to submit the block after manually (that originally failed with a 500) successfully, so it is certainly sporadic. EDIT: I managed to circumvent the issue somewhat with a minimum of 3 attempts of submission before it actually gives up and accepts the 500 error. In my test, it error'd once, and then was immediately able to submit it successfully right after. So that worked out very well. For the time being, put a simple 3-5 iteration or so loop around the submission code and add a break after the submission line that is relevant to you (submitblock or blocktemplate). |
I have this problem with cosmoscoin and bountycoin that will Always fail.
N I C O On Fri, Aug 16, 2013 at 5:16 PM, Geoffrey Tucker notifications@github.com
|
Every PoS coin have this issue I tried: ORB / ADT / COL / MAP. |
I m trying to connect it with PoS coin. This is the error: ERROR bitcoin_rpc # Problem Submitting block 500 Internal Server Error I use PoS branch. I tried to use pubkey but it says that it s invalid... |
Hello, I'm having the same "Sign error" problem that people were having with BitGem. I'm mining TAGCoin which has similar properties. I can't put the pubkey in CENTRAL_WALLET because the code checks for a valid address at startup. Even if I comment out that particular check, the miner will not work properly without a valid address in CENTRAL_WALLET. My question is: How can I get past the "Sign Error" issue if I can't use the 'pubkey' workaround that was suggested? Thanks, |
I'm getting the same problem with GrainCoin, Can't use the pubkey as it will say it's invalid for CENTRAL_WALLET. Anyone has an idea on how to workaround this? Thanks, |
I am trying to set up a pool with GrandCoin and I also get the 500 Internal Server Error. When I post the data myself using curl, it returns: {"result":null,"error":{"code":-32601,"message":"Method not found"},"id":"1"} Curl command: Any thoughts? |
I am still seeing this error on few POS coins. No solution yet? Strange that the problem seems intermittent. Seems as if it is more of a POS coin problem than a stratum problem. |
Hello there i started mining before 12 hours with 1000khash/sec but the GDC profit was 220 ? In coinswarz it says that with 1000khash/sec i should get 4.000 GDC for 24 hours ? |
Hi there, i have been using the PoS Branch without issues, but i have recently found that i was actually missing some block submits.
I have this error multiple times thorough the logs, i cannot find out why.
I can find blocks and submit fine, but sometimes this happen.
Here is the log:
I have looked the code
File "stratum-mining/lib/bitcoin_rpc.py", line 49, in submitblock
but that was a dead end, just printing the exception that was500 Internal Server Error
.Also https://github.com/moopless/stratum-mining-litecoin/blob/PoS/lib/template_registry.py#L256 is where the template_registry give the error output, and there is a comment there saying that should never happen.
Any clues?
The text was updated successfully, but these errors were encountered: