Bitcoin Forum
September 24, 2024, 06:50:37 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / Re: ethminer-0.9.41-genoil-1.0.6 on: April 05, 2016, 10:47:20 PM
True, it isn't stable. I'm working on creating a timeout clientside. So if the miner is working on the same job for over, let's say 1.5 the blocktime, we can safely assume the connection is botched. Reconect and try again. I know it;s a band-aid for a problem I haven't been able to identify yet, but it's better than what we have now..
Hi!

I think this hack will not work.
For me the problem appears on reconnetct after connection errors.
As I see the received data was corrupted.

I think this is a race condition problem.
You perform asynchronous reading (based on hooks) but your m_pending counter not protected by mutex/semaphore.

I tried perform fast fix: I remove all m_pending counter logic and readline() call from readResponse() and insert multiple readline() calls into processReponse().
For me it fixes this bug, but this is bull shit code only for test proof of concept.
I think the right desigion - it's to create a separate thread with infinite loop, which will read all responces.

Code:
void EthStratumClient::readline() {

//if (m_pending == 0) {
async_read_until(m_socket, m_responseBuffer, "\n",
boost::bind(&EthStratumClient::readResponse, this,
boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred));
// m_pending++;
//}
}

...

void EthStratumClient::readResponse(const boost::system::error_code& ec, std::size_t bytes_transferred)
{
//m_pending = m_pending > 0 ? m_pending - 1 : 0;

if (!ec)
{
...

if (response.front() == '{' && response.back() == '}')
{...}
else
{...}
//readline();
}
else
{...}
}

void EthStratumClient::processReponse(Json::Value& responseObject)
{
...
switch (id)
{
...
case 2:
...
cnote << "Authorized worker " << m_user;
readline();//!!!
break;
  ...
default:
string method = responseObject.get("method", "").asString();
if (method == "mining.notify")
{
...
readline();//!!!
}
else if (method == "mining.set_difficulty")
{
readline();//!!!
}
...
}
}

That mostly worked for me. Fixed it so that I am at least getting some credit for my PoW. Now I have an issue when ethmine finds a solution and submits. [edit]Forgot to say that this is on Ubuntu 15.04 compiled from latest git source w/ maxvall's changes[/edit]

miner  17:44:23|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
  ℹ  17:44:23|gpuminer0  Solution found; Submitting to coinotron.com ...
  ℹ  17:44:23|gpuminer0    Nonce: 0x058b32e369abb660
  ℹ  17:44:23|gpuminer0    Mixhash: 0xeabb595fadd73ad991bb0861cbc803173febbbcb606bda71e3b1dac88fa9e1e9
  ℹ  17:44:23|gpuminer0    Header-hash: 0x8cfecaa177efd06de20a5dc5f4fd6bd1aa38d1efaad617befc02a82644cbb624
  ℹ  17:44:23|gpuminer0    Seedhash: 0x63ca6f54b1af76dd4df3b908cee464ff1f212f08352cbe7eb4422806bb0c7885
  ℹ  17:44:23|gpuminer0    Target: 0x0000000174d3b7ba75827af894e99022396f5d9dc97a49d1ab70bb2445b917fb
  ℹ  17:44:23|gpuminer0    Ethash: 0x000000015494c14ea01fe142ad3e2b6e1ac3a9523f6ca0b8949ceac0a6661e1c
  ℹ  17:44:23|ethminer  B-) Submitted and accepted.
miner  17:44:23|ethminer  Mining on PoWhash #8cfecaa1… : 17301504 H/s = 8650752 hashes / 0.5 s
miner  17:44:24|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
miner  17:44:24|ethminer  Mining on PoWhash #8cfecaa1… : 17301504 H/s = 8650752 hashes / 0.5 s
miner  17:44:25|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
miner  17:44:25|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
miner  17:44:26|ethminer  Mining on PoWhash #8cfecaa1… : 17301504 H/s = 8650752 hashes / 0.5 s
miner  17:44:26|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
miner  17:44:27|ethminer  Mining on PoWhash #8cfecaa1… : 4718592 H/s = 2359296 hashes / 0.5 s
miner  17:44:27|ethminer  Mining on PoWhash #8cfecaa1… : 12058624 H/s = 6029312 hashes / 0.5 s
miner  17:44:28|ethminer  Mining on PoWhash #8cfecaa1… : 17825792 H/s = 8912896 hashes / 0.5 s
miner  17:44:28|ethminer  Mining on PoWhash #8cfecaa1… : 17301504 H/s = 8650752 hashes / 0.5 s
  ✘  17:44:29|ethminer  Discarding incomplete response
miner  17:44:29|ethminer  Mining on PoWhash #8cfecaa1… : 17301504 H/s = 8650752 hashes / 0.5 s
2  Bitcoin / Pools / Re: How can I efficiently switch pools on lots of miners at once? on: May 28, 2013, 05:32:53 PM
Have you looked into the CGMiner API? https://github.com/ckolivas/cgminer/blob/master/API-README

I have a setup that uses the API to keep an eye on things for me. You can pull stats at intervals, monitor temperatures, change pools, etc. with the API.

If you look in the CGMiner codebase, you'll find a couple example programs for accessing the API. Alternatively, it's pretty easy to roll your own since it's a simple JSON interface.
3  Other / Beginners & Help / Re: Bitcoind Negative Balance on: May 28, 2013, 05:15:32 PM
Since the Accounts in bitcoind are just labels, you can use the Move command to adjust the balances so they reflect the "correct" numbers.

4  Other / Beginners & Help / Re: New in town need some help with cgminer on: May 28, 2013, 05:09:59 PM
Why are people looking so hard at the 7990? It's more than the price of two 7970's.
5  Other / Beginners & Help / Re: Newbie Five Post Thread on: May 28, 2013, 04:43:45 PM
Newbie mode gets really old.
6  Other / Beginners & Help / Re: p2pool warning: Upgrade required on: April 05, 2013, 02:26:41 PM
I posted about this yesterday, and did not get a response. It is definitely coming from litecoind, not bitcoind.

Run "litecoind getinfo" and you will see the same warning. The explanation above about miners derived from more recent versions of bitcoin seems to be the most plausible explanation. Maybe this weekend I'll dive into the litecoind code, and see what triggers that warning, and if there is a way to prevent it.
7  Other / Beginners & Help / LTC P2Pool Problems? on: April 05, 2013, 01:55:47 AM
Ok, I've been successfully mining with a 7870 LE, using cgminer on Linux (Ubuntu 12.10). I've connected to several pools, but with the recent rash of DDOS, I've wanted to setup p2pool.

I have p2pool running on a Ubuntu 12.04 server and also litecoind running on that server (compiled from source). I have two problems.

One, I have been mining at 380Kh/s for almost 6 hours and have yet to have a share on my p2pool node. Everything appears to be running fine. It tells me it should take about 1.25 hours for a share. Am I just having terrible luck, or is there some other problem?

Second, after running litecoind for awhile, I now see this error "Warning: this version is obsolete, upgrade required." I got this error before just running litecoind, so cloned from git again, recompiled and restarted litecoind. It ran for a few hours before getting the error.

Thanks in advance for any help.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!