BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 22, 2020, 09:03:25 PM |
|
I have installed cpuminer on my ubuntu 18.04: The problem is that I don't know how does it work. By the --help command I can see that it needs a pool url. I don't want to pool mine. I want to solo mine. Not for bitcoin, but for my altcoin: The source files are from litecoin. I just changed the blockchain.
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4418
Crypto Swap Exchange
|
|
August 23, 2020, 02:33:45 AM |
|
I've never used CPUMiner before but I've done solomining on cgminer before with my USB ASICs. The process should be the same.
./minerd --algo=YOURALGORITHM --url=YOURRPCADDRESS -userpass=username:password --coinbase-addr=youraddress
You'll have to configure your client's configuration file to ensure that it is listening on it's RPC with the correct credentials.
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2562
Merit: 6203
Self-proclaimed Genius
|
|
August 23, 2020, 03:23:22 AM |
|
If the node is in the same machine as the miner and the sample above doesn't work, try to use localhost and the port ( your blockchain's), as the 'mining server'. --url=http://localhost:port
|
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 23, 2020, 08:50:05 AM |
|
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC?
|
|
|
|
CucakRowo
|
|
August 23, 2020, 09:04:54 AM |
|
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC?
I think you must unlocked that tcp (local host connection) first. Try these following steps (and for security purpose) as root : if result "inactive", then type : then type "Y". Then type : then try restart your cpuminer
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 23, 2020, 09:33:56 AM |
|
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC?
I think you must unlocked that tcp (local host connection) first. Try these following steps (and for security purpose) as root : if result "inactive", then type : then type "Y". Then type : then try restart your cpuminer On ufw enable I get: Firewall is active and enabled on system startup On ufw allow 2333/tcp I get: Skipping adding existing rule Skipping adding existing rule (v6) But still when I run the ./minerd command I get: [2020-08-23 12:33:10] HTTP request failed: Failed to connect to localhost port 2333: Connection refused [2020-08-23 12:33:10] json_rpc_call failed, retry after 30 seconds
|
|
|
|
labe1971
Member
Offline
Activity: 132
Merit: 10
|
|
August 23, 2020, 09:47:32 AM |
|
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC? Hello in config file: rpcuser=yourusername rpcpassword=yourpassword rpcallowip=127.0.0.1 server=1 rcpport=47950 Restart your wallet
mining.bat minerd.exe -a algo -o http://127.0.0.1:47950 -u <rpcuser> -p <rpcpassword>
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 23, 2020, 09:49:48 AM |
|
But I am on ... linux. Not windows.
(Except if there's a config file on cpuminer folder.)
|
|
|
|
ranochigo
Legendary
Offline
Activity: 3038
Merit: 4418
Crypto Swap Exchange
|
|
August 23, 2020, 10:28:39 AM |
|
Um, I don't think the posters above actually read the topic. You don't have to open your firewall because the communication is done within your LAN. Anyways, you need to add your RPC username and password. You have to configure your client's config file, the bitcoin.conf equivalent. That's the reason for the connection being refused.
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 23, 2020, 10:29:44 AM Last edit: August 23, 2020, 10:57:07 AM by BlackHatCoiner |
|
Um, I don't think the posters above actually read the topic. You don't have to open your firewall because the communication is done within your LAN. Anyways, you need to add your RPC username and password. You have to configure your client's config file, the bitcoin.conf equivalent. That's the reason for the connection being refused. What username:password? Do i choose them? Edit: If you mean the ubuntu's username and password then the answer is that nothing happens: My command: ./minerd --algo=sha256d --url=http://localhost:2333 --userpass=angelo:MYPASSWORD --coinbase-addr=TDuGXYumssr2Xw2utvXyEYNCdFtTj5XguV Output: [2020-08-23 13:54:27] 2 miner threads started, using 'sha256d' algorithm. [2020-08-23 13:54:27] Binding thread 0 to cpu 0 [2020-08-23 13:54:27] Binding thread 1 to cpu 1 [2020-08-23 13:54:27] HTTP request failed: Failed to connect to localhost port 2333: Connection refused
|
|
|
|
nc50lc
Legendary
Offline
Activity: 2562
Merit: 6203
Self-proclaimed Genius
|
|
August 23, 2020, 11:01:48 AM |
|
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC?
Is your node running? If no, you need to run it together with the mining software. What are you using, the GUI or CLI? If it's the GUI, you might need to add server=1 to your config file to enable RPC outside of the GUI's console. ( that's based from Bitcoin Core's behavior)
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 23, 2020, 11:07:36 AM |
|
How to know if it's running?
|
|
|
|
minerja
|
How to know if it's running? Your wallet is connecting to any nodes, so thats your first problem. Once you have a node / seednode i can help you. you need a .conf file, i'm guessing you know where that goes? it needs to contain rpcuser=user (any username) rpcpassword=password (any password) server=1 daemon=1 listen=1 rpcallowip=127.0.0.1 rpcport=5555 (any port, but best to goto wallet, HELP, SHOW commands, and the default rpc port will be listed) Then you need to start the wallet with ./mycoin - server If it can't find the correct .conf, in the correct location, it usually shows you what it should be called, and where it expects to find it.... ./minerd --algo=scrypt --url=http://127.0.0.1t:5555 -u user -p password --coinbase-addr=TDuGXYumssr2Xw2utvXyEYNCdFtTj5XguV -t 4 I have used "scrypt" because you said it was based on"litecoin", you need to use tha wallet to create a new receive address....give it a name of solo, then if you eventually make a pool, you can see what comes from where. technically you can just use the first address, but i always find that creating a new one works...no idea why. If that fails, drop me a DM, i can try your wallet on my PC and see if i can get you going. J
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 25, 2020, 12:59:47 PM Last edit: August 25, 2020, 01:10:55 PM by BlackHatCoiner |
|
No I don't have a config file, but I just created one. (mitcoin.conf) The problem is that I can't see the port you're saying: Edit: Is it one of these? Options: -? This help message -conf=<file> Specify configuration file (default: mitcoin.conf) -pid=<file> Specify pid file (default: mitcoind.pid) -gen Generate coins (default: 0) -datadir=<dir> Specify data directory -dbcache=<n> Set database cache size in megabytes (default: 25) -timeout=<n> Specify connection timeout in milliseconds (default: 5000) -proxy=<ip:port> Connect through socks proxy -socks=<n> Select the version of socks proxy to use (4-5, default: 5) -tor=<ip:port> Use proxy to reach tor hidden services (default: same as -proxy) -dns Allow DNS lookups for -addnode, -seednode and -connect -port=<port> Listen for connections on <port> (default: 2333 or testnet: 12333) -maxconnections=<n> Maintain at most <n> connections to peers (default: 125) -addnode=<ip> Add a node to connect to and attempt to keep the connection open -connect=<ip> Connect only to the specified node(s) -seednode=<ip> Connect to a node to retrieve peer addresses, and disconnect -externalip=<ip> Specify your own public address -onlynet=<net> Only connect to nodes in network <net> (IPv4, IPv6 or Tor) -discover Discover own IP address (default: 1 when listening and no -externalip) -checkpoints Only accept block chain matching built-in checkpoints (default: 1) -listen Accept connections from outside (default: 1 if no -proxy or -connect) -bind=<addr> Bind to given address and always listen on it. Use [host]:port notation for IPv6 -dnsseed Find peers using DNS lookup (default: 1 unless -connect) -banscore=<n> Threshold for disconnecting misbehaving peers (default: 100) -bantime=<n> Number of seconds to keep misbehaving peers from reconnecting (default: 86400) -maxreceivebuffer=<n> Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) -maxsendbuffer=<n> Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) -bloomfilters Allow peers to set bloom filters (default: 1) -upnp Use UPnP to map the listening port (default: 1 when listening) -paytxfee=<amt> Fee per KB to add to transactions you send -mininput=<amt> When creating transactions, ignore inputs with value less than this (default: 0.0001) -server Accept command line and JSON-RPC commands -testnet Use the test network -debug Output extra debugging information. Implies all other -debug* options -debugnet Output extra network debugging information -logtimestamps Prepend debug output with timestamp (default: 1) -shrinkdebugfile Shrink debug.log file on client startup (default: 1 when no -debug) -printtoconsole Send trace/debug info to console instead of debug.log file -rpcuser=<user> Username for JSON-RPC connections -rpcpassword=<pw> Password for JSON-RPC connections -rpcport=<port> Listen for JSON-RPC connections on <port> (default: 2332 or testnet: 12332) -rpcallowip=<ip> Allow JSON-RPC connections from specified IP address -rpcthreads=<n> Set the number of threads to service RPC calls (default: 4) -blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash) -walletnotify=<cmd> Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) -spendzeroconfchange Spend unconfirmed change when sending transactions (default: 1) -alertnotify=<cmd> Execute command when a relevant alert is received (%s in cmd is replaced by message) -upgradewallet Upgrade wallet to latest format -keypool=<n> Set key pool size to <n> (default: 100) -rescan Rescan the block chain for missing wallet transactions -salvagewallet Attempt to recover private keys from a corrupt wallet.dat -checkblocks=<n> How many blocks to check at startup (default: 288, 0 = all) -checklevel=<n> How thorough the block verification is (0-4, default: 3) -txindex Maintain a full transaction index (default: 0) -loadblock=<file> Imports blocks from external blk000??.dat file -maxorphantx=<n> Keep at most <n> unconnectable transactions in memory (default: 25) -reindex Rebuild block chain index from current blk000??.dat files -par=<n> Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)
Block creation options: -blockminsize=<n> Set minimum block size in bytes (default: 0) -blockmaxsize=<n> Set maximum block size in bytes (default: 250000) -blockprioritysize=<n> Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)
SSL options: (see the Mitcoin Wiki for SSL setup instructions) -rpcssl Use OpenSSL (https) for JSON-RPC connections -rpcsslcertificatechainfile=<file.cert> Server certificate file (default: server.cert) -rpcsslprivatekeyfile=<file.pem> Server private key (default: server.pem) -rpcsslciphers=<ciphers> Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
UI options: -lang=<lang> Set language, for example "de_DE" (default: system locale) -min Start minimized -splash Show splash screen on startup (default: 1)
2nd Edit: Okay, I set port=2332. This is my mitcoin.conf: rpcuser=user rpcpassword=password server=1 daemon=1 listen=1 rpcallowip=127.0.0.1 rpcport=2332 3rd Edit: Shouldn't this be something else? Output of cpuminer:
|
|
|
|
minerja
|
|
August 25, 2020, 03:03:28 PM |
|
No I don't have a config file, but I just created one. (mitcoin.conf) The problem is that I can't see the port you're saying: Edit: Is it one of these? Options: -? This help message -conf=<file> Specify configuration file (default: mitcoin.conf) -pid=<file> Specify pid file (default: mitcoind.pid) -gen Generate coins (default: 0) -datadir=<dir> Specify data directory -dbcache=<n> Set database cache size in megabytes (default: 25) -timeout=<n> Specify connection timeout in milliseconds (default: 5000) -proxy=<ip:port> Connect through socks proxy -socks=<n> Select the version of socks proxy to use (4-5, default: 5) -tor=<ip:port> Use proxy to reach tor hidden services (default: same as -proxy) -dns Allow DNS lookups for -addnode, -seednode and -connect -port=<port> Listen for connections on <port> (default: 2333 or testnet: 12333) -maxconnections=<n> Maintain at most <n> connections to peers (default: 125) -addnode=<ip> Add a node to connect to and attempt to keep the connection open -connect=<ip> Connect only to the specified node(s) -seednode=<ip> Connect to a node to retrieve peer addresses, and disconnect -externalip=<ip> Specify your own public address -onlynet=<net> Only connect to nodes in network <net> (IPv4, IPv6 or Tor) -discover Discover own IP address (default: 1 when listening and no -externalip) -checkpoints Only accept block chain matching built-in checkpoints (default: 1) -listen Accept connections from outside (default: 1 if no -proxy or -connect) -bind=<addr> Bind to given address and always listen on it. Use [host]:port notation for IPv6 -dnsseed Find peers using DNS lookup (default: 1 unless -connect) -banscore=<n> Threshold for disconnecting misbehaving peers (default: 100) -bantime=<n> Number of seconds to keep misbehaving peers from reconnecting (default: 86400) -maxreceivebuffer=<n> Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000) -maxsendbuffer=<n> Maximum per-connection send buffer, <n>*1000 bytes (default: 1000) -bloomfilters Allow peers to set bloom filters (default: 1) -upnp Use UPnP to map the listening port (default: 1 when listening) -paytxfee=<amt> Fee per KB to add to transactions you send -mininput=<amt> When creating transactions, ignore inputs with value less than this (default: 0.0001) -server Accept command line and JSON-RPC commands -testnet Use the test network -debug Output extra debugging information. Implies all other -debug* options -debugnet Output extra network debugging information -logtimestamps Prepend debug output with timestamp (default: 1) -shrinkdebugfile Shrink debug.log file on client startup (default: 1 when no -debug) -printtoconsole Send trace/debug info to console instead of debug.log file -rpcuser=<user> Username for JSON-RPC connections -rpcpassword=<pw> Password for JSON-RPC connections -rpcport=<port> Listen for JSON-RPC connections on <port> (default: 2332 or testnet: 12332) -rpcallowip=<ip> Allow JSON-RPC connections from specified IP address -rpcthreads=<n> Set the number of threads to service RPC calls (default: 4) -blocknotify=<cmd> Execute command when the best block changes (%s in cmd is replaced by block hash) -walletnotify=<cmd> Execute command when a wallet transaction changes (%s in cmd is replaced by TxID) -spendzeroconfchange Spend unconfirmed change when sending transactions (default: 1) -alertnotify=<cmd> Execute command when a relevant alert is received (%s in cmd is replaced by message) -upgradewallet Upgrade wallet to latest format -keypool=<n> Set key pool size to <n> (default: 100) -rescan Rescan the block chain for missing wallet transactions -salvagewallet Attempt to recover private keys from a corrupt wallet.dat -checkblocks=<n> How many blocks to check at startup (default: 288, 0 = all) -checklevel=<n> How thorough the block verification is (0-4, default: 3) -txindex Maintain a full transaction index (default: 0) -loadblock=<file> Imports blocks from external blk000??.dat file -maxorphantx=<n> Keep at most <n> unconnectable transactions in memory (default: 25) -reindex Rebuild block chain index from current blk000??.dat files -par=<n> Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)
Block creation options: -blockminsize=<n> Set minimum block size in bytes (default: 0) -blockmaxsize=<n> Set maximum block size in bytes (default: 250000) -blockprioritysize=<n> Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)
SSL options: (see the Mitcoin Wiki for SSL setup instructions) -rpcssl Use OpenSSL (https) for JSON-RPC connections -rpcsslcertificatechainfile=<file.cert> Server certificate file (default: server.cert) -rpcsslprivatekeyfile=<file.pem> Server private key (default: server.pem) -rpcsslciphers=<ciphers> Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)
UI options: -lang=<lang> Set language, for example "de_DE" (default: system locale) -min Start minimized -splash Show splash screen on startup (default: 1)
2nd Edit: Okay, I set port=2332. This is my mitcoin.conf: rpcuser=user rpcpassword=password server=1 daemon=1 listen=1 rpcallowip=127.0.0.1 rpcport=2332 3rd Edit: Shouldn't this be something else? Output of cpuminer: Hi, Okay, Everything looks perfect... should work Would you mind sending me the wallet, and your .conf, i will try it on my system Just drop it somewhere like here please ( https://gofile.io/welcome) Oh, did just spot something....you still have no connections. You cannot mine , even solomine with zero connections. I don't know much about wallets, but they do need a connection to a seednode, or at the very least 1 other wallet.
|
|
|
|
BlackHatCoiner (OP)
Legendary
Offline
Activity: 1666
Merit: 8165
Bitcoin is a royal fork
|
|
August 25, 2020, 03:20:08 PM |
|
It seems that I successfully mined 2 blocks. The problem is that I don't know the addresses. I've never seen them, but the coinbase reward went to them. ^ I only have that one address.
|
|
|
|
minerja
|
|
August 25, 2020, 03:27:19 PM |
|
It seems that I successfully mined 2 blocks. The problem is that I don't know the addresses. I've never seen them, but the coinbase reward went to them. ^ I only have that one address. You're missing the point. If the wallet has ZERO connections, the blocks don't count. There is no chain. They can never validate. Like i say, you need a seednode or at least 1 other wallet. Is this your brandnew coin, or an old one you have found?
|
|
|
|
|
minerja
|
|
August 26, 2020, 03:05:37 PM |
|
Sorry i have taken so long, i could get it to run on Ubuntu 16. Then tried Ubu18, and had to do a load of messing around (lib4.8, etc etc) So finally got it working, but need your ip address, and you to leave the wallet open please
|
|
|
|
|