+
Skip to content

gimiki/liskpool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lisk Pool

This is first and fully open-sourced Lisk delegate forging pool (also known as delegate reward sharing). Written in PHP.

#Requirements MariaDB server
Memcached
Nginx
Lisk Node
Highcharts (included in project)

#Installation

apt-get install nginx mariadb-server memcached

If you are using PHP5

apt-get install php5-memcached

If you are using PHP7

apt-get install php7-memcached

Setup your mysql server, nginx and import database scheme

lisk_pool_scheme_db.sql

Navigate to config.php

lisk_nodes & lisk_ports You can add here more independent nodes, first one should be localhost, withdraws will be processed only from first node specified here for security reasons as passphrase are being sent out currently to specified node. Other nodes are used to determine node which is currently at latest height to keep pool updated with most recent state of network.

$lisk_nodes = array(0 => 'localhost',1 => '123.123.123.123');
$lisk_ports = array(0 => '8000',1 => '8000');

'host' => 'localhost',    //<- dont change if mariadb is running on the same machine
'username' => 'root',     //<- Database user
'password' => 'SQL_PASSWORD',  //<- Database Password
'bdd' => 'lisk',    //<- Database Name
'lisk_host' => $lisk_nodes,
'lisk_port' => $lisk_ports,
'protocol' => 'http', //<-pick http or https
'pool_fee' => '25.0%',     //<- adjustable pool fee as float for ex. "25.0%"
'pool_fee_payout_address' => '17957303129556813956L',   //<- Payout address if fee > 0.0
'delegate_address' => '17957303129556813956L',    //<- Delegate address - must be valid forging delegate address
'payout_threshold' => '1',    //<- Payout threshold in LISK
'fixed_withdraw_fee' => '0.1',    //<- Fixed Withdraw fee in LISK
'withdraw_interval_in_sec' => '43200',   //<- Withdraw script interval represented in seconds
'secret' => 'passphrase1',    //<- Main passphrase the same your as in your forging delegate
'secondSecret' => 'passphrase2' //<- Second passphrase, if you dont have one leave it empty ex. ""

#Usage Start LISK node as usual, and set up it to forging. But please note that you can forge with different node that one used for hosting pool.

Navigate to

/private/
directory and start background scripts:

Node height checker, necessary even there is only one defined

screen -dmS bestnode php bestnode.php


Block Processing - this script checks if delegate has forged new block, if yes it will be split as defined in config

screen -dmS processing php processing.php


Updating charts - this script updates data to keep charts up to date.

screen -dmS stats php stats.php


Withdraw script - this script withdraws revenue as defined in config.

screen -dmS withdraw php withdraw.php

Optional Balance checker - Simple script to compare total LISK value stored in database in reference to actual LISK stored on delegate account.
php check.php

All background scripts can be easily accessed with
screen -x processing/stats/withdraw/bestnode

##Forging productivity Optionally you can use lisk-best-forger background script to improve forging productivity.

git submodule update --init --recursive
cd private/forging
nano config.php

In private/config.php you need to add trusted nodes and it's ports. Each specified server needs to have whitelisted IP address of server which will be used to run this script. As described here. Passphrase will be taken from main configuration file. For more details visit main lisk-best-forger repository.

####Usage

screen -dmS bestforger php daemon.php

This script should be used along with trusted servers only via SSL.

#Contributing If you want to contribute, fork and pull request or open issue.

#License Entire PHP is under The MIT License (MIT)
Front-end(site theme) is used from http://themes.3rdwavemedia.com/website-templates/responsive-bootstrap-theme-web-development-agencies-devstudio/
Personally i own license, so better buy license or use your own front-end.

About

first open source lisk delegated pool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.1%
  • CSS 30.8%
  • HTML 7.6%
  • PHP 3.5%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载