Giter Site home page Giter Site logo

seatrips / shiftpool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mmitech/liskpool

0.0 2.0 0.0 12.73 MB

first open source lisk delegated pool

Home Page: http://thepool.io

License: MIT License

PHP 3.50% CSS 30.77% JavaScript 58.15% HTML 7.58%

shiftpool's Introduction

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.

shiftpool's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.