Advertisement
Guest User

Untitled

a guest
Feb 10th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.45 KB | None | 0 0
  1. I got a bunch of requests for an easier way to cheat (or "optimize") DOGE mining based on the predictable block rewards, so I created a better script that's much easier to use (and works with Windows as well as Linux). This one doesn't require modifying or compiling anything, so most of you should be able to get it working. If you have trouble, post your exact error messages, and post your cgminer commands and coinHopper.pl command without your real password.
  2.  
  3.  
  4.  
  5. Installation
  6.  
  7. Get the latest Dogecoin wallet. Make sure it's up to date. Apparently there were two 1.5 releases for Windows, so just re-install it to be sure. Start it in the background in case it needs to sync with the network or re-index the block chain (if you're upgrading from an older version).
  8.  
  9. Install Strawberry Perl. The script needs a couple packages that aren't included by default, so after installing Strawberry Perl, open up a command prompt, and run this:
  10.  
  11. cpanm JSON::RPC::Client
  12. cpanm Math::Random::MT
  13.  
  14. Reboot. Strawberry Perl changes your environment a bit, and it's important to do your testing AFTER the changes take full effect.
  15.  
  16.  
  17.  
  18. Run cgminer
  19.  
  20. Run two copies of cgminer, one for DOGE and one for LTC (or DGC, vertcoin, etc). Note that these are each two separate commands, on two separate lines:
  21.  
  22. set TERM=
  23. cgminer.exe --api-listen --api-allow W:127.0.0.1 --api-port 4028 --scrypt -u MyDogeUser.worker -p x -o stratum+tcp://stratum6.dogehouse.org:993
  24.  
  25. Press "g", then "d", and disable all of your GPUs. Two more commands to start the second cgminer:
  26.  
  27. set TERM=
  28. cgminer.exe --api-listen --api-allow W:127.0.0.1 --api-port 4029 --scrypt -u MyLTCUser.worker -p x -o stratum+tcp://usa2.wemineltc.com:3335
  29.  
  30. Press "g", then "d", and disable all of your GPUs.
  31.  
  32. The "set TERM=" lines are important, or you'll get errors about a "dumb" terminal. This is a result of Strawberry Perl, so you'll need to add it to ANY .bat files you're using for mining in the future.
  33.  
  34.  
  35.  
  36. Run the wallet in server mode
  37.  
  38. The script needs to query your wallet to find out about new blocks, and by default the Windows version won't respond to API requests. Create a .bat file in your dogecoin directory containing the line:
  39.  
  40. dogecoin-qt.exe -server
  41.  
  42. Run it. You will probably get an error message. That message should tell you how to set up dogecoin.conf and give you a long password. Do exactly what it tells you to do. Run the bat file again, and your wallet should now be running in server mode. Let it synchronize with the network completely before you continue.
  43.  
  44.  
  45.  
  46. Use the coinHopper script
  47.  
  48. Save coinHopper.pl somewhere. Open a command prompt and run it like this:
  49.  
  50. perl coinHopper.pl -rpcuser userNameFromDogecoinDotConf -rpcpass passwordFromDogecoinDotConf
  51.  
  52. If you have more than one GPU, give it "--gpus 2" (or 3 or ...)
  53. By default, it mines rounds worth 700,000 or more DOGE. If you want a different threshold, give it e.g. "--coins 500000". The best strategy is probably to either mine only very valuable rounds, or only skip rounds that will not cover the cost of electricity.
  54. By default, it checks for new blocks 4 times per second. If you want to change that, give it "--poll 0.1". If you poll too quickly, you'll tie up your CPU with polling, and if you poll too slowly you won't hop between coins efficiently. The version in my original post doesn't have this limitation, but this version is much easier to use.
  55.  
  56.  
  57.  
  58. Troubleshooting
  59.  
  60. The script should be pretty good at telling you what's wrong. If it's having trouble talking to cgminer, make sure your cgminer.conf doesn't have any api-* settings; they can conflict with the command-line options. If it's having trouble talking to your wallet, try adding the following to dogecoin.conf:
  61.  
  62. server=1
  63. daemon=1
  64. listen=1
  65.  
  66. If the script is madly hopping between coins, your wallet probably hasn't caught up to the network. The wallet seems to think it's up to date even when it's still an hour or so behind, so let the wallet sit for a minute or two after it says it's up to date.
  67.  
  68.  
  69.  
  70. General notes
  71.  
  72. You should get best results in large pools using proportional payout, large pools using PPLNS, or solo mining (if you have enough hashing power to find blocks solo mining). Dogehouse and Fast-Pool are good choices. Keep in mind that competently-run pools might start banning users over this, so do not keep large balances in your pool account. Smaller pools are less likely to find the block you're currently working on, so your gains will be averaged out much more.
  73. Pools using a flat fee per share will not work (you'll be giving all the "cheated" earnings to the pool owner). Update: Actually, you can mine low-value rounds in flat PPS pools. If anybody sets up a flat pay-per-share pool, hopping between the PPS pool during low value rounds, and a PPLNS or Prop pool during high-value rounds can bankrupt the the PPS pool.
  74. Don't worry too much about the timestamps cgminer prints to the screen. From testing, it seems like it limits how fast it prints status information, so it can look like coin-hopping is taking multiple seconds, but as far as I can tell it generally takes <0.05 seconds.
  75. Strawberry Perl adds "TERM=dumb" to your environment, so if you use other unixy things, it can break them. If you use other unixy things, use your existing perl (cygwin, ActiveState, etc) instead. They should work just fine, but I did not test them. If you don't know what this means, it shouldn't affect you.
  76.  
  77. Good luck! Or maybe, Good "It's Not Luck Any More"!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement