Advertisement
rimvis29

Add Dedicated Port for each coin:

Jun 5th, 2018
2,418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. Add Dedicated Port for each coin:
  2. 1. Coin to be added: Reden (REDEN) algorithm x16s and port for this coin will be 12345
  3. 2. Create a file called reden.conf under /var/stratum/config which is copy of x16s.conf
  4. 3. Open a file reden.conf
  5. 4. Chagne the port to 12345
  6. 5. Add below lines in the end of the file:
  7. [WALLETS]
  8. include = REDEN
  9. 6. Save the file reden.conf
  10. 7. Open the file called x16s.conf
  11. 8. Add below lines in the end of the file:
  12. [WALLETS]
  13. exclude = REDEN
  14. 9. Save the file x16s.conf
  15. 10. Start the stratum for reden.conf using below command
  16. sudo screen -S reden
  17. sudo /var/stratum/run.sh reden
  18. 11. go to folder ~/.redencore/
  19. 12. stop the daemon for coin
  20. 13. open the coin configuration file (reden.conf)
  21. 14. Change the port in the blocknotify line.
  22. 15. Save the file reden.conf
  23. 16. Start the coin daemon.
  24. 17. Check the file /var/stratum/config/reden.log it should show that stratum is trying to connect to the coin
  25. 18. Open the port using sudo ufw allow 12345/tcp
  26. 19. Start mining to dedicated port
  27.  
  28. ----exampel of reden.conf in stratum/config/----
  29.  
  30. ////////////////////////////////////////////////////
  31. [TCP]
  32. server = swedpool.eu
  33. port = 12345
  34. password = hCMkqCLsnBRYheIrH5Asysl
  35.  
  36. [SQL]
  37. host = localhost
  38. database = yiimpfrontend
  39. username = stratum
  40. password = whiGSN2cn3xcJJ
  41.  
  42. [STRATUM]
  43. algo = x16s
  44. difficulty = 0.25
  45. max_ttf = 50000
  46.  
  47. [WALLETS]
  48. include = REDEN
  49. ///////////////////////////////////////////////////////
  50.  
  51. ----exampel of x16s.conf in stratum/config/----
  52.  
  53. //////////////////////////////////////////////////////
  54.  
  55. [TCP]
  56. server = swedpool.eu
  57. port = 3663
  58. password = nBRYheIrH5Asysl
  59.  
  60. [SQL]
  61. host = localhost
  62. database = yiimpfrontend
  63. username = stratum
  64. password = 4HYAwhiGSN2cn3xcJJ
  65.  
  66. [STRATUM]
  67. algo = x16s
  68. difficulty = 0.25
  69. max_ttf = 50000
  70.  
  71. [WALLETS]
  72. exclude = REDEN
  73.  
  74. ///////////////////////////////////////////////////////
  75.  
  76. ----exampel of reden.conf in .redencore/----
  77.  
  78. ///////////////////////////////////////////////////////
  79.  
  80.  
  81. rpcuser=usser
  82. rpcpassword=MQuZQ
  83. rpcport=20940
  84. rpcthreads=8
  85. rpcallowip=127.0.0.1
  86. # onlynet=ipv4
  87. maxconnections=12
  88. daemon=1
  89. gen=0
  90.  
  91. alertnotify=echo %s | mail -s "REDEN alert!" swedpooleu@gmail.com
  92. blocknotify=/var/stratum/blocknotify swedpool.eu:12345 2094 %s
  93.  
  94. /////////////////////////////////////////////////////////
  95. screen -X -S (screen) quit
  96. ufw allow 3663/tcp
  97.  
  98.  
  99. For the frontend add below code in current_results.php (/var/web/yaamp/modules/site/results) after the line echo "</tr>"; and before the line $total_coins += $coins; which is around line number 146.
  100.  
  101.  
  102.  
  103. if ($coins > 1){
  104. $list = getdbolist('db_coins', "enable and visible and auto_ready and algo=:algo order by index_avg desc", array(':algo'=>$algo));
  105. foreach($list as $coin){
  106. $name = substr($coin->name, 0, 12);
  107. $symbol = $coin->getOfficialSymbol();
  108. echo "<tr>";
  109. echo "<td align='left' valign='top' style='font-size: .8em;'><img width='10' src='".$coin->image."'> <b>$name</b> <span style='font-size: .8em'>($symbol)</span></td>";
  110. $port_count = getdbocount('db_stratums', "algo=:algo and symbol=:symbol", array(':algo'=>$algo,':symbol'=>$symbol));
  111. $port_db = getdbosql('db_stratums', "algo=:algo and symbol=:symbol", array(':algo'=>$algo,':symbol'=>$symbol));
  112. if($port_count == 1)
  113. echo "<td align='right' style='font-size: .8em;'>".$port_db->port."</td>";
  114. else
  115. echo "<td align='right' style='font-size: .8em;'>$port</td>";
  116.  
  117. echo "<td align='right' style='font-size: .8em;'>dedicated port for $symbol</td>";
  118.  
  119. if($port_count == 1)
  120. echo "<td align='right' style='font-size: .8em;'>".$port_db->workers."</td>";
  121. else
  122. echo "<td align='right' style='font-size: .8em;'>$workers</td>";
  123.  
  124. $pool_hash = yaamp_coin_rate($coin->id);
  125. $pool_hash_sfx = $pool_hash? Itoa2($pool_hash).'h/s': '';
  126. echo "<td align='right' style='font-size: .8em;'>$pool_hash_sfx</td>";
  127.  
  128. echo "<td align='right' style='font-size: .8em;'>{$fees}%</td>";
  129.  
  130. $btcmhd = yaamp_profitability($coin);
  131. $btcmhd = mbitcoinvaluetoa($btcmhd);
  132. echo "<td align='right' style='font-size: .8em;'>$btcmhd</td>";
  133. echo "</tr>";
  134. }
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement