I'm having a hard time understanding the relationship between daemons (such as bitcoind
or litecoind
) and mining. Some things I read make it seem that you need a separate mining app and some things seem to suggest that the daemon itself does mining. Which is it? I'm thinking maybe the daemon can do mining but it needs to be enabled and if you don't enable it you can use a separate app instead? I'm confused.
Add a comment
|
1 Answer
The daemon can do mining using the -gen
command line option, but it's CPU mining and is impractical nowadays.
Using a separate mining app is practical. That separate mining app connects to a running bitcoind
via its JSON-RPC API in order to facilitate getwork or getblocktemplate requests necessary for hashing.
The JSON-RPC API is configured in bitcoin.conf
or at the command line using these arguments:
-rpcuser=<user> Username for JSON-RPC connections
-rpcpassword=<pw> Password for JSON-RPC connections
-rpcport=<port> Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)
-rpcallowip=<ip> Allow JSON-RPC connections from specified IP address
-
-
Not yet, as far as I know. AFAIK, CPU mining is still profitable on Litecoin, but of course decreasingly so. Commented May 3, 2013 at 15:12
-
Note that the mining functionality was removed in Bitcoin Core 0.13.0: github.com/bitcoin/bitcoin/blob/master/doc/release-notes/…– Murch ♦Commented Oct 16, 2018 at 20:01