Title: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 22, 2020, 09:03:25 PM I have installed cpuminer on my ubuntu 18.04:
https://i.imgur.com/LroFNxD.png 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: https://i.imgur.com/Rw7zFia.png The source files are from litecoin. I just changed the blockchain. Title: Re: How exactly does a cpu miner work? Post by: ranochigo on 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. Title: Re: How exactly does a cpu miner work? Post by: nc50lc on 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'.
Code: --url=http://localhost:port Title: Re: How exactly does a cpu miner work? Post by: CucakRowo on August 23, 2020, 08:35:04 AM I hope you have a strong CPU when you want to do solo mining. If not, perhaps you can use this pool for your solo mining.
https://i.postimg.cc/15xfTmXD/458834373-1598171550-0-5137383.jpg http://blockmasters.co/site/get-started https://bitcointalk.org/index.php?topic=2362982.0 Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 23, 2020, 08:50:05 AM https://i.imgur.com/24oQQLS.png
It seems that I'm not connected to localhost:2333, how can I verify or just know what is my RPC? Title: Re: How exactly does a cpu miner work? Post by: CucakRowo on 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 : Code: ufw status Code: ufw enable Then type : Code: ufw allow 2333/tcp then try restart your cpuminer Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on 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 : Code: ufw status Code: ufw enable Then type : Code: ufw allow 2333/tcp then try restart your cpuminer On ufw enable I get: Code: Firewall is active and enabled on system startup On ufw allow 2333/tcp I get: Code: Skipping adding existing rule But still when I run the ./minerd command I get: Code: [2020-08-23 12:33:10] HTTP request failed: Failed to connect to localhost port 2333: Connection refused Title: Re: How exactly does a cpu miner work? Post by: labe1971 on August 23, 2020, 09:47:32 AM https://i.imgur.com/24oQQLS.png 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> Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 23, 2020, 09:49:48 AM But I am on ... linux. Not windows.
(Except if there's a config file on cpuminer folder.) Title: Re: How exactly does a cpu miner work? Post by: ranochigo on August 23, 2020, 10:28:39 AM Um, I don't think the posters above actually read the topic. :P 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. Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 23, 2020, 10:29:44 AM Um, I don't think the posters above actually read the topic. :P 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: Code: ./minerd --algo=sha256d --url=http://localhost:2333 --userpass=angelo:MYPASSWORD --coinbase-addr=TDuGXYumssr2Xw2utvXyEYNCdFtTj5XguV Output: Code: [2020-08-23 13:54:27] 2 miner threads started, using 'sha256d' algorithm. Title: Re: How exactly does a cpu miner work? Post by: nc50lc on 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) Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 23, 2020, 11:07:36 AM Title: Re: How exactly does a cpu miner work? Post by: minerja on August 25, 2020, 09:36:42 AM 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 Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 25, 2020, 12:59:47 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: https://i.imgur.com/a0OV6Uw.png Edit: Is it one of these? Code: Options: 2nd Edit: Okay, I set port=2332. This is my mitcoin.conf: Code: rpcuser=user 3rd Edit: Shouldn't this be something else? https://i.imgur.com/OOJacV9.png Output of cpuminer: https://i.imgur.com/Gabt1nU.png Title: Re: How exactly does a cpu miner work? Post by: minerja on 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: https://i.imgur.com/a0OV6Uw.png Edit: Is it one of these? Code: Options: 2nd Edit: Okay, I set port=2332. This is my mitcoin.conf: Code: rpcuser=user 3rd Edit: Shouldn't this be something else? https://i.imgur.com/OOJacV9.png Output of cpuminer: https://i.imgur.com/Gabt1nU.png 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. Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on 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.
https://i.imgur.com/zeSTn64.png https://i.imgur.com/LysDAkB.png ^ I only have that one address. Title: Re: How exactly does a cpu miner work? Post by: minerja on 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. https://i.imgur.com/zeSTn64.png https://i.imgur.com/LysDAkB.png ^ 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? Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 25, 2020, 03:37:58 PM This is my brand new coin. I've never created one. It's my first one. So if I send you the files what exactly will you do? Will you open port 2332 and send me your IP address to connect?
If I want to be a seednode, do I need a port forward on port 2332? And also what files? Those on .mitcoin or the mitcoin folder on desktop? I'll upload you both. dotmitcoin.zip: https://mega.nz/file/9VokjaxB#rZyySNnfE4sYNPx1nU9JR7HXoDhIwzh3mxSAsRsR1nE mitcoin.zip: https://mega.nz/file/hBgADC4J#f9N5CpJ9nb9VSgwdvy9sxiS7a96B0UxCDCKtLwKeQiE Title: Re: How exactly does a cpu miner work? Post by: minerja on August 26, 2020, 03:05:37 PM This is my brand new coin. I've never created one. It's my first one. So if I send you the files what exactly will you do? Will you open port 2332 and send me your IP address to connect? If I want to be a seednode, do I need a port forward on port 2332? And also what files? Those on .mitcoin or the mitcoin folder on desktop? I'll upload you both. dotmitcoin.zip: https://mega.nz/file/9VokjaxB#rZyySNnfE4sYNPx1nU9JR7HXoDhIwzh3mxSAsRsR1nE mitcoin.zip: https://mega.nz/file/hBgADC4J#f9N5CpJ9nb9VSgwdvy9sxiS7a96B0UxCDCKtLwKeQiE 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 Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on August 26, 2020, 03:24:08 PM Okay, I sent you a private message.
Title: Re: How exactly does a cpu miner work? Post by: BlackHatCoiner on September 01, 2020, 10:04:28 PM I can't believe I'm still working on this.
Has anyone any idea why I have zero connections? Or how I can make 1 connection pointing on myself? This is my debug.log: https://pastebin.com/raw/kEF2kRqj This is my mitcoin.conf: Code: rpcuser=user |