Author

Topic: Quickly setting up ofline solo litecoin mining (Read 727 times)

member
Activity: 79
Merit: 18
OK, I thought the miner mined and the wallet verified.  But since they're both open source somebody could tweak a wallet to let bogus coins through.  Oh well, maybe I'll get a power supply built and my solar panels remounted with all this offline time.
jox
hero member
Activity: 681
Merit: 500
There is no way how to mining live in offline mode. Every found block must be verified with another nodes, so you must have acces to internet and have another nodes connected to your private node.
sr. member
Activity: 406
Merit: 250
liecoin is asic territory don't mine with gpu or cpu, waste of time, and it's better to mine in pool, because i think solo isn't working on litecoin like with bitcoin, they removed the possibility in the wallet
member
Activity: 79
Merit: 18
I expect to lose my internet connection for a week or so starting tomorrow the 15th.  It would be really handy if my scrypt ASIC could be doing offline solo litecoin mining while I'm disconnected.  I think it isn't terribly complicated and I'm most of the way there, I just have a few specific questions.  I don't have a lot of time left to RTFM more right now.  I've been Googling and pulling bits and pieces from here and there.  I had the litecoin core installed and electrum-ltc.  I'm using Raspbian Linux on a Raspberry Pi.  I started:
Quote
  ./litecoin-qt -server

Q: What protocol does this speak, does it know stratum+tcp natively?  Or do I need another layer?  I do have a stratum proxy installed and working (Slush's) I could redirect to feed machines on my lan, I haven't added that piece yet to keep it simpler

Q: Can I use something non-gui here instead of litecoin-qt? (litecoin-cli, litecoin-tx, litecoind)

Q: Can I mine at that but keep my electrum-ltc open?

My litecoin.conf as of now:
Code:
server=1
rpcuser=root
rpcpassword=haha
rpcallowip=127.0.0.1
rpcallowip=192.168.43.0/24
# it doesn't like ip1,ip2, so I tried 2 rpcallowip lines [ok]
# Duh, the proxy will be running on 127.0.0.1 anyway (hopefully)
# Port from an example
rpcport=9332

#Only uncomment this if you are running litecoind and want to run Litecoin in the background (not Litecoin QT)
daemon=1

server=1
#gen=0
# Not sure about these:
block_nTime=1317972665
block_nNonce=2084524493
# These were from a different example:
# addnode=50.116.22.43
#addnode=80.47.34.212:54897

##########################################
# Based on example in https://bitcointalk.org/index.php?topic=47417.0
# (and others) trying to set up for solo mining

I did: litecoin-tx -create
and it said: 01000000000000000000
I'm not sure what that does but it seemed to help a little.

I can do:
Code:

netstat -l output | grep 9332
tcp6       0      0 [::]:9332               [::]:*                  LISTEN
so I know the port is opening.

I've tried to test with cpuminer since it's on the same machine, cgminer and my asic are downstairs.
./minerd -a scrypt --threads=1
and experimenting:
Code:
-o 127.0.0.1:9332
[2017-05-13 22:56:58] 1 miner threads started, using 'scrypt' algorithm.
[2017-05-13 22:56:58] HTTP request failed: The requested URL returned error:
500 Internal Server Error
[2017-05-13 22:56:58] json_rpc_call failed, retry after 30 seconds

-o stratum+tcp://127.0.0.1:9332
[2017-05-13 22:59:45] Starting Stratum on stratum+tcp://127.0.0.1:9332
[2017-05-13 22:59:45] 1 miner threads started, using 'scrypt' algorithm.
[2017-05-13 22:59:45] JSON decode failed(1): '[' or '{' expected near 'HTTP'
[2017-05-13 22:59:45] stratum_subscribe send failed
[2017-05-13 22:59:45] ...retry after 30 seconds

Q: What HTTP, I didn't use one anywhere?

-o http://127.0.0.1:9332
[2017-05-13 23:01:01] 1 miner threads started, using 'scrypt' algorithm.
[2017-05-13 23:01:01] HTTP request failed: The requested URL returned error:
500 Internal Server Error
[2017-05-13 23:01:01] json_rpc_call failed, retry after 30 seconds

-o tcp://127.0.0.1:9332
./minerd: unknown protocol -- 'tcp://127.0.0.1:9332'
Try `minerd --help' for more information.

 -P -o stratum+tcp://127.0.0.1:9332
[2017-05-14 00:01:25] stratum_subscribe send failed
[2017-05-14 00:01:25] ...retry after 30 seconds
* Rebuilt URL to: http://127.0.0.1:9332/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 9332 (#0)
* Connection #0 to host 127.0.0.1 left intact
[2017-05-14 00:01:55] > {"id": 1, "method": "mining.subscribe", "params":
* ["cpuminer/2.4.5"]}
[2017-05-14 00:01:55] < HTTP/1.1 400 Bad Request
[2017-05-14 00:01:55] JSON decode failed(1): '[' or '{' expected near 'HTTP'
[2017-05-14 00:01:55] > {"id": 1, "method": "mining.subscribe", "params":
[]}
* Failed to get recent socket
[2017-05-14 00:01:55] stratum_subscribe send failed
[2017-05-14 00:01:55] ...retry after 30 seconds

Q: Am I oversimplifying this, thinking I can point miner software at litecoin-qt as though it were a pool?

Q: Do I need to download the whole blockchain first?  Impractical: overright I only got 41562 blocks, I'm still 5 years behind.

Q: I do have nginx running on port 80 and Apache on port 8087, are those complicating things?  I thought all this was on 9332.

If I could get offline solo mining working it might help in general later because I only have a slow connection through a cell phone, mining bogs it down with the extra traffic.
Jump to: