Меню Рубрики

Установка cryptonote pool на centos

Установка bitcoin mining pool на CentOS 6

Иногда бывает надо помайнить биткойны. Третьего дня я внезапно решил построить личный bitcoin mining pool на CentOS 6. Оборудование стандартное — официальный bitcoind в качестве, собственно, биткойн-демона, pushpoold как оператор пула и cgminer как mining rig. CentOS — потому что больше всего я работаю с RedHat, а шесть — потому что bitcoind, pushpoold и cgminer требуют версий библиотек (а именно — curl), которые есть только в нём. Бэкпортировать их на пятерку — гемор и никто не будет. CentOS — строго 64-битный, иначе производительность cgminer-a будет чуть менее, чем никакая.

На момент написания статьи последними были и использовались следующие версии:

  • Bitcoin 0.3.24, список доступных версий, локальная копия здесь.
  • Pushpool 0.5.1, список доступных версий, официальная форумная ветка здесь, локальная копия здесь.
  • CGMiner 1.6.1 64-bit, список доступных версий, официальная форумная ветка здесь, локальная копия здесь.
  • Необходимая библиотека Jansson 2.1, список доступных версий, хомяк здесь, локальная копия здесь.
  • Необходимый пакет AMD Accelerated Parallel Processing SDK v2.5 64bit, список доступных версий, хомяк здесь, локальная копия двух нужных из него файлов здесь.

  • Подготовка CentOS 6

Используем минимальный дистрибутив CentOS 6.0, чтобы не было ничего лишнего, репозитории только официальные. Сейчас список транзакций биткойнов, который первым делом скачает биткойн-демон, занимает около 2 гигабайт, поэтому свободного места должно быть гигабайта три, а лучше пять. В минимальной инсталляции почти ничего нет, включая gcc:

Создаём юзера bitcoin, из-под которого будем запускать всё относящееся. Компилятор будет нужен для, собственно, компилирования исходников, поэтому ставим группу «Development tools» (скачивать примерно 116 Мб) и wget заодно, затем перегружаемся, так как системная библиотека glibc скорее всего тоже обновилась:

Протокол bitcoin довольно чувствителен к точности времени на сервере, поэтому устанавливаем пакеты ntp и ntpdate. Далее используем ntpdate для установки точного времени на сервере и запускаем ntpd-демон.

  • Установка Bitcoind

Никакого GUI, так как мы настраиваем trueЪ hardcore сервер. Которые хотят гуёв — могут сами поразбираться какие иксовые пакеты и библиотеки ставить. Качаем дистрибутив с bitcoind, кладём куда надо, для гарантии проверяем, что все нужные ему библиотеки имеются. Если в выводе ldd будет что-то «not found» (хотя и не должно) — надо это починить путём установки отсутствующей библиотеки.

источник

Установка cryptonote pool на centos

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Clone with HTTPS

Use Git or checkout with SVN using the web URL.

Downloading

Want to be notified of new releases in zone117x/node-cryptonote-pool ?

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio

Latest commit

Files

lib pool.js: monero cryptonight variants (#287) Feb 12, 2018

website_example Changing time to 120 (#167) Jul 6, 2017

.gitignore Add logs to .gitignore Jul 9, 2014

LICENSE Initial commit May 9, 2014

README.md Update README.md Mar 24, 2018

config_example.json

init.js Add Redis auth_pass for remote databases Nov 14, 2015

package.json

redisBlocksUpgrade.js [REDIS DATA BREAKING CHANGES] More efficient block storage format for… Jul 4, 2014

This repo is looking for maintainers! Please reach out if interested.

High performance Node.js (with native C addons) mining pool for CryptoNote based coins such as Bytecoin, Monero, QuazarCoin, HoneyPenny, etc.. Comes with lightweight example front-end script which uses the pool’s AJAX API.

  • TCP (stratum-like) protocol for server-push based jobs
    • Compared to old HTTP protocol, this has a higher hash rate, lower network/CPU server load, lower orphan block percent, and less error prone
  • IP banning to prevent low-diff share attacks
  • Socket flooding detection
  • Payment processing
    • Splintered transactions to deal with max transaction size
    • Minimum payment threshold before balance will be pa >

      Pools Using This Software

      A pool must be operational for 6 months or more before it can be added to this list.

      • Coin daemon(s) (find the coin’s repo and build latest version from source)
      • Node.js v0.10+ (follow these installation instructions)
      • Redis key-value store v2.6+ (follow these instructions)
      • libssl required for the node-multi-hashing module
        • For Ubuntu: sudo apt-get install libssl-dev
      • Boost is required for the cryptonote-util module
        • For Ubuntu: sudo apt-get install libboost-all-dev

      Those are legitimate requirements. If you use old versions of Node.js or Redis that may come with your system package manager then you will have problems. Follow the linked instructions to get the last stable versions.

      Redis security warning: be sure firewall access to redis — an easy way is to include bind 127.0.0.1 in your redis.conf file. Also it’s a good idea to learn about and understand software that you are using — a good place to start with redis is data persistence.

      1) Downloading & Installing

      Clone the repository and run npm update for all the dependencies to be installed:

      Warning for Cyrptonote coins other than Monero: this software may or may not work with any given cryptonote coin. Be wary of altcoins that change the number of minimum coin units because you will have to reconfigure several config values to account for those changes. Unless you’re offering a bounty reward — do not open an issue asking for help getting a coin other than Monero working with this software.

      Copy the config_example.json file to config.json then overview each options and change any to match your preferred setup.

      Explanation for each field:

      3) [Optional] Configure cryptonote-easy-miner for your pool

      Your miners that are Windows users can use cryptonote-easy-miner which will automatically generate their wallet address and stratup multiple threads of simpleminer. You can download it and edit the config.ini file to point to your own pool. Inside the easyminer folder, edit config.init to point to your pool details

      Rezip and upload to your server or a file host. Then change the easyminerDownload link in your config.json file to point to your zip file.

      The file config.json is used by default but a file can be specified using the -config=file command argument, for example:

      This software contains four distinct modules:

      • pool — Which opens ports for miners to connect and processes shares
      • api — Used by the website to display network, pool and miners’ data
      • unlocker — Processes block candidates and increases miners’ balances when blocks are unlocked
      • payments — Sends out payments to miners according to their balances stored in redis

      By default, running the init.js script will start up all four modules. You can optionally have the script start only start a specific module by using the -module=name command argument, for example:

      Example screenshot of running the pool in single module mode with tmux.

      Simply host the contents of the website_example directory on file server capable of serving simple static files.

      Edit the variables in the website_example/config.js file to use your pool’s specific configuration. Variable explanations:

      The following files are included so that you can customize your pool website without having to make significant changes to index.html or other front-end files thus reducing the difficulty of merging updates with your own changes:

      • custom.css for creating your own pool style
      • custom.js for changing the functionality of your pool website

      Then simply serve the files via nginx, Apache, Google Drive, or anything that can host static content.

      When updating to the latest code its important to not only git pull the latest from this repo, but to also update the Node.js modules, and any config files that may have been changed.

      • Inside your pool directory (where the init.js script is) do git pull to get the latest code.
      • Remove the dependencies by deleting the node_modules directory with rm -r node_modules .
      • Run npm update to force updating/reinstalling of the dependencies.
      • Compare your config.json to the latest example ones in this repo or the ones in the setup instructions where each config field is explained. You may need to modify or add any new changes.

      No cryptonote based coins have a testnet mode (yet) but you can effectively create a testnet with the following steps:

      • Open /src/p2p/net_node.inl and remove lines with ADD_HARDCODED_SEED_NODE to prevent it from connecting to mainnet (Monero example: http://git.io/0a12_Q)
      • Build the coin from source
      • You now need to run two instance of the daemon and connect them to each other (without a connection to another instance the daemon will not accept RPC requests)
        • Run first instance with ./coind —p2p-bind-port 28080 —allow-local-ip
        • Run second instance with ./coind —p2p-bind-port 5011 —rpc-bind-port 5010 —add-peer 0.0.0.0:28080 —allow-local-ip
      • You should now have a local testnet setup. The ports can be changes as long as the second instance is pointed to the first instance, obviously

      Credit to surfer43 for these instructions

      JSON-RPC Commands from CLI

      Documentation for JSON-RPC commands can be found here:

      Curl can be used to use the JSON-RPC commands from command-line. Here is an example of calling getblockheaderbyheight for block 100:

      • To inspect and make changes to redis I suggest using redis-commander
      • To monitor server load for CPU, Network, IO, etc — I suggest using New Relic
      • To keep your pool node script running in background, logging to file, and automatically restarting if it crashes — I suggest using forever
      • BTC: 1667jMt7NTZDaC8WXAxtMYBR8DPWCVoU4d
      • MRO: 48Y4SoUJM5L3YXBEfNQ8bFNsvTNsqcH5Rgq8RF7BwpgvTBj2xr7CmWVanaw7L4U9MnZ4AG7U6Pn1pBhfQhFyFZ1rL1efL8z

      Released under the GNU General Public License v2

      источник

      Установка cryptonote pool на centos

      GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

      Clone with HTTPS

      Use Git or checkout with SVN using the web URL.

      Downloading

      Want to be notified of new releases in clintar/cryptonote-xmr-pool ?

      Launching GitHub Desktop

      If nothing happens, download GitHub Desktop and try again.

      Launching GitHub Desktop

      If nothing happens, download GitHub Desktop and try again.

      Launching Xcode

      If nothing happens, download Xcode and try again.

      Launching Visual Studio

      Latest commit

      Files

      lib updates for monero hardfork Mar 2018 Apr 6, 2018

      website-example Additional withdrawal fee for exchanges wallets Aug 19, 2017

      .gitignore rename config.json to config_example.json to avoid conflicts Mar 26, 2016

      LICENSE Initial commit May 9, 2014

      README.md Merge pull request #14 from kirichenko/master Feb 21, 2018

      config_example.json Control transactions priority with config.payments.priority (default:… Aug 19, 2017

      init.js Allow multiple modules to be specified on command line Mar 31, 2016

      package.json

      redisBlocksUpgrade.js [REDIS DATA BREAKING CHANGES] More efficient block storage format for… Jul 4, 2014

High performance Node.js (with native C addons) mining pool for CryptoNote based coins such as Bytecoin, DuckNote, Monero, QuazarCoin, Boolberry, Dashcoin, etc.. Comes with lightweight example front-end script which uses the pool’s AJAX API.

  • TCP (stratum-like) protocol for server-push based jobs
    • Compared to old HTTP protocol, this has a higher hash rate, lower network/CPU server load, lower orphan block percent, and less error prone
  • IP banning to prevent low-diff share attacks
  • Socket flooding detection
  • Payment processing
    • Splintered transactions to deal with max transaction size
    • Minimum payment threshold before balance will be pa >
      • Admin panel
        • Aggregated pool statistics
        • Coin daemon & wallet RPC services stability monitoring
        • Log files data access
        • Users list with detailed statistics
      • Historic charts of pool’s hashrate and miners count, coin difficulty, rates and coin profitability
      • Historic charts of users’s hashrate and payments
      • Miner login(wallet address) val >

        Pools Using This Software

        • Coin daemon(s) (find the coin’s repo and build latest version from source)
        • Node.js v0.10+ (follow these installation instructions)
        • Redis key-value store v2.6+ (follow these instructions)
        • libssl required for the node-multi-hashing module
          • For Ubuntu: sudo apt-get install libssl-dev

        Those are legitimate requirements. If you use old versions of Node.js or Redis that may come with your system package manager then you will have problems. Follow the linked instructions to get the last stable versions.

        Redis security warning: be sure firewall access to redis — an easy way is to include bind 127.0.0.1 in your redis.conf file. Also it’s a good idea to learn about and understand software that you are using — a good place to start with redis is data persistence.

        Easy install on Ubuntu 14 LTS

        Installing pool on different Linux distributives is different because it depends on system default components and versions. For now the easiest way to install pool is to use Ubuntu 14 LTS. Thus, all you had to do in order to prepare Ubunty 14 for pool installation is to run:

        1) Downloading & Installing

        Clone the repository and run npm update for all the dependencies to be installed:

        Explanation for each field:

        3) [Optional] Configure cryptonote-easy-miner for your pool

        Your miners that are Windows users can use cryptonote-easy-miner which will automatically generate their wallet address and stratup multiple threads of simpleminer. You can download it and edit the config.ini file to point to your own pool. Inside the easyminer folder, edit config.init to point to your pool details

        Rezip and upload to your server or a file host. Then change the easyminerDownload link in your config.json file to point to your zip file.

        The file config.json is used by default but a file can be specified using the -config=file command argument, for example:

        This software contains four distinct modules:

        • pool — Which opens ports for miners to connect and processes shares
        • api — Used by the website to display network, pool and miners’ data
        • unlocker — Processes block candidates and increases miners’ balances when blocks are unlocked
        • payments — Sends out payments to miners according to their balances stored in redis

        By default, running the init.js script will start up all four modules. You can optionally have the script start only start a specific module by using the -module=name command argument, for example:

        Example screenshot of running the pool in single module mode with tmux.

        Simply host the contents of the website_example directory on file server capable of serving simple static files.

        Edit the variables in the website_example/config.js file to use your pool’s specific configuration. Variable explanations:

        The following files are included so that you can customize your pool website without having to make significant changes to index.html or other front-end files thus reducing the difficulty of merging updates with your own changes:

        • custom.css for creating your own pool style
        • custom.js for changing the functionality of your pool website

        Then simply serve the files via nginx, Apache, Google Drive, or anything that can host static content.

        When updating to the latest code its important to not only git pull the latest from this repo, but to also update the Node.js modules, and any config files that may have been changed.

        • Inside your pool directory (where the init.js script is) do git pull to get the latest code.
        • Remove the dependencies by deleting the node_modules directory with rm -r node_modules .
        • Run npm update to force updating/reinstalling of the dependencies.
        • Compare your config.json to the latest example ones in this repo or the ones in the setup instructions where each config field is explained. You may need to modify or add any new changes.

        Monero does have a testnet. Call daemon and simplewallet with —tesnet to connect to it. Downloading the testnet blockchain may still take a while to start usint testnet, so you can use this excellent tutorial http://moneroexamples.github.io/private-testnet/ to set up a private testnet. Should work with other coins, too, but below are original testnet instructions by server43 for reference, too.

        For cryptonote based coins that don’t have a testnet mode (yet), you can effectively create a testnet with the following steps:

        • Open /src/p2p/net_node.inl and remove lines with ADD_HARDCODED_SEED_NODE to prevent it from connecting to mainnet (Monero example: http://git.io/0a12_Q)
        • Build the coin from source
        • You now need to run two instance of the daemon and connect them to each other (without a connection to another instance the daemon will not accept RPC requests)
          • Run first instance with ./coind —p2p-bind-port 28080 —allow-local-ip
          • Run second instance with ./coind —p2p-bind-port 5011 —rpc-bind-port 5010 —add-peer 0.0.0.0:28080 —allow-local-ip
        • You should now have a local testnet setup. The ports can be changes as long as the second instance is pointed to the first instance, obviously

        Credit to surfer43 for these instructions

        JSON-RPC Commands from CLI

        Documentation for JSON-RPC commands can be found here:

        Curl can be used to use the JSON-RPC commands from command-line. Here is an example of calling getblockheaderbyheight for block 100:

        • To inspect and make changes to redis I suggest using redis-commander
        • To monitor server load for CPU, Network, IO, etc — I suggest using New Relic
        • To keep your pool node script running in background, logging to file, and automatically restarting if it crashes — I suggest using forever

        MRO: 4AabFTaEt6KG18tux7yqS8Fv63JoyXsitjGSksrXCqZwBeJKKnphSx4KNsocn5kqWg6cMjeuNzssTHeefHvN8m1V6QqseCH Credits ===

        LucasJones — Co-dev on this project; did tons of debugging for binary structures and fixing them. Pool couldn’t have been made without him.

        surfer43 — Did lots of testing during development to help figure out bugs and get them fixed

        wallet42 — Funded development of payment denominating and min threshold feature

        Wolf0 — Helped try to deobfuscate some of the daemon code for getting a bug fixed

        Tacotime — helping with figuring out certain problems and lead the bounty for this project’s creation

        [fancoder] (https://github.com/fancoder) Initial cryptonote-universal-pool creator

        [clintar] (https://github.com/clintar) Updates to support nodejs >0.10 and continuing updates License

        Released under the GNU General Public License v2

        источник

Читайте также:  Установка командера на лодку

Популярные записи

Добавить комментарий

Adblock
detector