3

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.

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.