Open ethereum pool установка c нуля
Open Source Ethereum Mining Pool
This pool is being further developed to provide an easy to use pool for Ethereum miners. This software is functional however an optimised release of the pool is expected soon. Testing and bug submissions are welcome!
- Support for HTTP and Stratum mining
- Detailed block stats with luck percentage and full reward
- Failover geth instances: geth high availability built in
- Modern beautiful Ember.js frontend
- Separate stats for workers: can highlight timed-out workers so miners can perform maintenance of rigs
- JSON-API for stats
- Ether-Proxy HTTP proxy with web interface
- Stratum Proxy for Ethereum
Building on Linux
- go >= 1.9
- geth or parity
- redis-server >= 2.8.0
- nodejs >= 4 LTS
- nginx
I highly recommend to use Ubuntu 16.04 LTS.
You can use Ubuntu upstart — check for sample config in upstart.conf .
Install nodejs. I suggest using LTS version >= 4.x from https://github.com/nodesource/distributions or from your Linux distribution or simply install nodejs on Ubuntu Xenial 16.04.
The frontend is a single-page Ember.js application that polls the pool API to render miner stats.
Change ApiUrl: ‘//example.net/’ in www/config/environment.js to match your domain name. Also don’t forget to adjust other options.
Configure nginx to serve API on /api subdirectory. Configure nginx to serve www/dist as static website.
Serving API using nginx
Create an upstream for API:
and add this setting after location / :
You can customize the layout using built-in web server with live reload:
Don’t use built-in web server in production.
Check out www/app/templates directory and edit these templates in order to customise the frontend.
Configuration is actually simple, just read it twice and think twice before changing defaults.
Don’t copy config directly from this manual. Use the example config from the package, otherwise you will get errors on start because of JSON comments.
If you are distributing your pool deployment to several servers or processes, create several configs and disable unneeded modules on each server. (Advanced users)
I recommend this deployment strategy:
- Mining instance — 1x (it depends, you can run one node for EU, one for US, one for Asia)
- Unlocker and payouts instance — 1x each (strict!)
- API instance — 1x
- Unlocking and payouts are sequential, 1st tx go, 2nd waiting for 1st to confirm and so on. You can disable that in code. Carefully read docs/PAYOUTS.md .
- Also, keep in mind that unlocking and payouts will halt in case of backend or node RPC errors. In that case check everything and restart.
- You must restart module if you see errors with the word suspended.
- Don’t run payouts and unlocker modules as part of mining node. Create separate configs for both, launch independently and make sure you have a single instance of each module running.
- If poolFeeAddress is not specified all pool profit will remain on coinbase address. If it specified, make sure to periodically send some dust back required for payments.
Alternative Ethereum Implementations
This pool is tested to work with Ethcore’s Parity. Mining and block unlocking works, but I am not sure about payouts and suggest to run official geth node for payments.
Источник
Open ethereum pool установка c нуля
This branch is not behind the upstream sammy007:master.
No new commits to fetch. Enjoy your day!
This branch is even with the upstream and has conflicts that must be resolved. and we weren’t able to determine if it could be merged.
Open a pull request to fetch upstream and review changes or resolve conflicts.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Open Source Ethereum Mining Pool
This fork has been modified for Ethereum Classic with current rewards of 4ETC and 0.125ETC for Uncles
- Support for HTTP and Stratum mining
- Detailed block stats with luck percentage and full reward
- Failover geth instances: geth high availability built in
- Modern beautiful Ember.js frontend
- Separate stats for workers: can highlight timed-out workers so miners can perform maintenance of rigs
- JSON-API for stats
- Ether-Proxy HTTP proxy with web interface
- Stratum Proxy for Ethereum
Building on Linux
*** USE Full Setup Guide.txt FOR DETAILED INSTRUCTIONS ***
- go >= 1.9
- geth or parity
- redis-server >= 2.8.0
- nodejs >= 4 LTS
- nginx
I highly recommend to use Ubuntu 16.04 LTS.
You can use Ubuntu upstart — check for sample config in upstart.conf .
Install nodejs. I suggest using LTS version >= 4.x from https://github.com/nodesource/distributions or from your Linux distribution or simply install nodejs on Ubuntu Xenial 16.04.
The frontend is a single-page Ember.js application that polls the pool API to render miner stats.
Change ApiUrl: ‘//example.net/’ in www/config/environment.js to match your domain name. Also don’t forget to adjust other options.
Configure nginx to serve API on /api subdirectory. Configure nginx to serve www/dist as static website.
Serving API using nginx
Create an upstream for API:
and add this setting after location / :
You can customize the layout using built-in web server with live reload:
Don’t use built-in web server in production.
Check out www/app/templates directory and edit these templates in order to customise the frontend.
Configuration is actually simple, just read it twice and think twice before changing defaults.
Don’t copy config directly from this manual. Use the example config from the package, otherwise you will get errors on start because of JSON comments.
If you are distributing your pool deployment to several servers or processes, create several configs and disable unneeded modules on each server. (Advanced users)
I recommend this deployment strategy:
- Mining instance — 1x (it depends, you can run one node for EU, one for US, one for Asia)
- Unlocker and payouts instance — 1x each (strict!)
- API instance — 1x
- Unlocking and payouts are sequential, 1st tx go, 2nd waiting for 1st to confirm and so on. You can disable that in code. Carefully read docs/PAYOUTS.md .
- Also, keep in mind that unlocking and payouts will halt in case of backend or node RPC errors. In that case check everything and restart.
- You must restart module if you see errors with the word suspended.
- Don’t run payouts and unlocker modules as part of mining node. Create separate configs for both, launch independently and make sure you have a single instance of each module running.
- If poolFeeAddress is not specified all pool profit will remain on coinbase address. If it specified, make sure to periodically send some dust back required for payments.
Alternative Ethereum Implementations
This pool is tested to work with Ethcore’s Parity. Mining and block unlocking works, but I am not sure about payouts and suggest to run official geth node for payments.
Источник
Установĸа Ethash Mining Pool на примере ETC. Stratum/Nicehash/Dynamic PPLNS/Выплаты
resurs2
Бывалый
Системные требования:
CPU 4, RAM 8GB, SSD 60GB, Ubuntu Server 16.04.
Для тех, кто еще не очень знаком с Linux — настоятельно рекомендую делать все пошагово через 1 открытую консоль, вставляя по одной команде и под пользователем root.
sudo apt update && sudo apt upgrade
reboot now
заходим на сервер
sudo su (вводим пароль, должны быть под root)
systemctl stop ufw.service && systemctl disable ufw.service
apt install software-properties-common unzip nginx tor pcscd pcsc-tools git curl htop mc unrar screen
mkdir /pool && cd /pool
unzip multi-geth-linux.zip
ln -s /pool/geth /usr/bin/geth
chmod ugo+x /usr/bin/geth
geth —classic account new
geth —classic account list
Будем использовать кошелек, который только что был создан командой выше:
Если geth стартовать таким образом:
screen -S server geth —classic —rpc —maxpeers 75 —syncmode «fast» —rpcapi «db,eth,net,web3,personal» —etherbase «ВАШ КОШЕЛЕК» —cache=12288 —mine —unlock «ВАШ КОШЕЛЕК» —allow-insecure-unlock
попросит ввести пароль от созданного кошелька
Можно подключаться через: geth attach http://127.0.0.1:8545
В будущем проверять баланс: web3.fromWei(eth.getBalance(eth.coinbase), «ether»)
Делать переводы: eth.sendTransaction(
Условие:
файл кошелька должен быть локально на сервере (как делали по инструкции выше)
Пример вывода после генерации файла кошелька:
Public address of the key: 0xa9c96bff41FFAFb6bE8c2990c0CF4F3b220aaEaa
Path of the secret key file: /root/.ethereum/classic/keystore/UTC—2020-03-11T22-03-07.512690005Z—a9c96bff41ffafb6be8c2990c0cf4f3b220aaeaa
Не знаю, чтобы работали выплаты с пула нужно стартовать geth таким образом или нет, но на период тестирования он был запущен с такими параметрами —unlock «ВАШ КОШЕЛЕК» —allow-insecure-unlock.
Так как в текущем окне терминала у нас запущен geth и идет синхронизация нам требуется открыть новое окно, залогиниться, ввести sudo su, должны быть под root
cd /pool
add-apt-repository ppa:chris-lea/redis-server
apt update
apt install redis-server
systemctl enable redis-server.service && systemctl stop redis-server.service && systemctl start redis-server.service
add-apt-repository ppa:longsleep/golang-backports
apt update
apt install golang-go
curl -sL https://deb.nodesource.com/setup_13.x | bash —
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add —
echo «deb https://dl.yarnpkg.com/debian/ stable main» | tee /etc/apt/sources.list.d/yarn.list
apt update
apt install nodejs yarn
git clone -b V2.0_Etc https://github.com/techievee/ethash-mining-pool.git
mv ethash-mining-pool/ open-ethereum-pool/
cd /pool/open-ethereum-pool
make
rm config_payout.json
rm config_proxy.json
1. Вĸлючить Proxy, исправить порт на 40002
«proxy»: <
«enabled»: true,
«listen»: «0.0.0.0:40002»,
2. Включить Stratum, исправить порт на 9009
«stratum»: <
«enabled»: true,
«listen»: «0.0.0.0:9009»,
3. Включить nice hash, Исправить порт на 40004
«stratum_nice_hash»: <
«enabled»: true,
«listen»: «0.0.0.0:40004»,
4. Запоминаем порт api 9091
«api»: <
«enabled»: true,
«purgeOnly»: false,
«purgeInterval»: «10m»,
«listen»: «0.0.0.0:9091»,
5. Исправляем upstream
6. Исправляем Redis
«redis»: <
«endpoint»: «127.0.0.1:6379»,
«poolSize»: 300,
«database»: 0,
«password»: «»
7. Включаем Unlocker, выставляем комиссию пула, указываем кошелек для выплат комиссии с пула
«unlocker»: <
«enabled»: true,
«poolFee»: 0.5,
«poolFeeAddress»: «ВАШ АДРЕС ДЛЯ ВЫПЛАТ КОМИССИИ»,
8. Исправляем Payouts, включаем, правим демона, прописываем адрес локального кошелька, с которого будут выплаты
«payouts»: <
«enabled»: true,
«requirePeers»: 5,
«interval»: «120m»,
«daemon»: «http://127.0.0.1:8545»,
«timeout»: «10s»,
«address»: «ВАШ_ЛОКАЛЬНЫЙ_КОШЕЛЕК»,
9. Отключаем exchange, т. к. api.coinmarketcap.com сменили API на новый. На стартовой странице актуальных курсов все-равно не увидим, будет 1970 год
«exchange»: <
«enabled»: false,
rm -rf /pool/open-ethereum-pool/www/*
cd www/
git clone -b v1.0_Etc https://github.com/techievee/statistics_api.git
mv statistics_api/* /pool/open-ethereum-pool/www/
rm -rf statistics_api/
rm config/environment_in.js
1. Заменить etc.daggerpool.com «на ВАШ INTERNET_IP»
2. Заменить http://etc-us01.daggerpool.com «на ВАШ INTERNET_IP»
3. Заменить etc-us01.daggerpool.com «на ВАШ INTERNET_IP»
4. Заменить etc-uk01.daggerpool.com «на ВАШ INTERNET_IP»
5. Заменить etc-nh.daggerpool.com «на ВАШ INTERNET_IP»
6. Поставить нужные значения PoolFee: ‘0.9%’,
7. Поставить нужные значения ShareDifficulty: ‘4000000000’,
8. Удалить секцию StratumHost1:
9. Удалить секцию StratumPort1:
10. Сохраняемся
HttpPort: 40002,
StratumPort: 9009,
NicehashPost: 40004,
Далее делать обязательно через sudo, как описано ниже, несмотря на то, что уже работаем под root и по-прежнему по одной команде.
sudo npm install -g [email protected]
sudo npm install -g bower
sudo npm install [email protected] -f —save-optional
sudo npm install intl-format-cache
sudo npm install format-number
sudo npm install ember-cli-accounting
sudo npm install [email protected]
sudo npm install @babel/[email protected]^7.0.0-beta.42
sudo npm install [email protected]
sudo npm install ember-intl
sudo npm install [email protected]
sudo npm install
sudo npm audit fix
sudo npm audit fix —force
bower install —allow-root
wget https://files.gitter.im/sammy007/open-ethereum-pool/IBJl/intl-format-cache.rar
unrar x intl-format-cache.rar node_modules/intl-format-cache/ -Y
chmod +x build.sh
./build.sh
После того, как команда отработает (сгенерируются файлы веб сервера) — консоль немного ведет себя не правильно, нажмите ctrl +c несколько раз и вернитесь на уровень выше следующей командой:
cp misc/nginx-default.conf /etc/nginx/sites-available/default
1. Исправляем upstream api порт на 9091
upstream api <
server 127.0.0.1:9091;
2. Правим путь до веб морды
systemctl enable nginx.service && systemctl stop nginx.service && systemctl start nginx.service
ЗАПУСКАЕМ POOL при условии, что цепочка полностью синхронизирована до последнего блока.
Сама команда запуска(должны быть в директории /pool/open-ethereum-pool):
screen -S pool ./build/bin/ethash-mining-pool config_api.json
Команда screen позволяет перейти ĸ процессу после подĸлючения ĸ серверу ĸомандой screen -x pool или server, если просто запустить и заĸрыть оĸно терминала — процесс прервется.
Источник