-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
BFLMiner unable to connect #209
Comments
Did you add btcd's rpc.cert to the CA list? |
As I mentioned, yes I did. I also tried both http and https. |
miningaddr probably needs to be a testnet address if you're trying to mine testnet. Do you mean BFGMiner? If so, try running with
And upload debug.log somewhere with a link here. |
Thanks for the fast reply btw! This is the debug file: https://gist.github.com/stevenroose/300667579170e3b90247 I already had one |
@luke-jr btcd will not start if --miningaddr is specified and the address is on the wrong network. @stevenroose does |
Hmm, weird. It did work before. But not it prints This might well be the issue. |
Looks like a conflict between your gnutls/curl and btcd?
I suppose it's possible the handshake may fail if the system clock is too wrong. |
It's also possible to run btcd with EDIT: With master, not the last release. |
So what can I do to resolve it? Will |
Using
But it seems to be mining already, I'll wait until I find a testnet block... |
So it looks like it was indeed a certificate issue. Can you paste |
|
Well, add -u rpcuser and -P rpcpass. Try with and without --notls |
Could you also dig into your btcd logs and see what interface/ports the RPC server is listening on? Should look something like this:
|
I have a Skipping the |
Ok, I had to add
|
So it looks like you're connecting fine. Can you check your local system clock? Based on the error, it says your system clock is wrong (too far in the past). The consensus rules prevent new blocks that have timestamps before the median timestamp of the last 11 blocks. This check is protecting you from wasting resources mining a block that would be rejected because the timestamp is too far in the past. |
Also
It seems like the minimum time is incorrect. So it must be an issue in btcd. |
Ok. Thanks for the data points. So, btcd is not wrong about the minimum time based upon the timestamps of the blocks. It appears somebody on testnet is mining way ahead of the current time. That said, we should probably generate block templates with timestamps at the minimum allowed time if it's ahead of the current system time rather than just preventing the template from being served. EDIT: I should've said adjusted time instead of current system time. Here are the commands I used to see if the minimum time is correct: $ ./btcctl --testnet getblockcount
317269
$ bcstart=$(./btcctl --testnet getblockcount)
$ bcend=$(expr $bcstart - 11)
$ rm -f timestamps.txt
$ for (( i=$bcstart; i>$bcend; i-- )); do ./btcctl --testnet getblock $(./btcctl --testnet getblockhash $i) | grep time | cut -f2 -d: | cut -f1 -d, >> timestamps.txt; done
$ cat timestamps.txt | sort
1420686447
1420686913
1420687648
1420688114
1420688849
1420689315 <---- median
1420690050
1420690516
1420691251
1420691717
1420692452
$ date -r 1420689315
Wed Jan 7 21:55:15 CST 2015
$ date
Wed Jan 7 21:37:28 CST 2015 |
After reviewing the code in question, I see this is an RPC issue as opposed to template generation which already handles this properly as described above. I have a PR prepared which resolves this that I am testing thoroughly at the moment. |
@stevenroose Can you please try with pr #213? This should resolve the issue. I've tested it thoroughly locally with no issues. |
Uhm. Can you quickly tell me how I build from source? Currently I used |
$ cd $GOPATH/src/github.com/conformal/btcd
$ git checkout -b davecgh-fix_209 master
$ git pull https://github.com/davecgh/btcd.git fix_209
$ go build
$ ./btcd --params... Then once you're done testing, you can go back to master ( |
It works! And it still does not work with the standard build, so "It appears somebody on testnet is mining way ahead of the current time." this guy is still active :)
|
Great. Thanks for testing. Once others have had a chance to review the changes, we'll get it merged to master. |
regarding getting https to work, can you try the following:
|
…-leaves mempool: refactor fetchInputUtxosFromUData to fetchInputUtxosFromLeaves
I just setup btcd with testnet and an accompanying btcwallet and btcgui setup that works fine.
Now I followed these instructions and pointed my BFLMiner to
bfgminer -o https://localhost:18334 -u rpcuser -p rpcpass
but it gives the errorPool 0 slow/down or URL or credentials invalid
.Is this a BFLMiner issue or a btcd issue?
The text was updated successfully, but these errors were encountered: