Giter VIP home page Giter VIP logo

node-cryptonote-pool's Introduction

This repo is not maintained. Pull requests that are critical or of high quality and well tested are accepted - but not much more.

Looking for maintainers. Please open an issue if interested.


node-cryptonote-pool

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.

Table of Contents

Features

  • 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 paid out
    • Minimum denomination for truncating payment amount precision to reduce size/complexity of block transactions
  • Detailed logging
  • Ability to configure multiple ports - each with their own difficulty
  • Variable difficulty / share limiter
  • Share trust algorithm to reduce share validation hashing CPU load
  • Clustering for vertical scaling
  • Modular components for horizontal scaling (pool server, database, stats/API, payment processing, front-end)
  • Live stats API (using AJAX long polling with CORS)
    • Currency network/block difficulty
    • Current block height
    • Network hashrate
    • Pool hashrate
    • Each miners' individual stats (hashrate, shares submitted, pending balance, total paid, etc)
    • Blocks found (pending, confirmed, and orphaned)
  • An easily extendable, responsive, light-weight front-end using API to display data
  • Worker login validation (make sure miners are using proper wallet addresses for mining)

Community / Support

Pools Using This Software

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

Usage

Requirements

  • 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
Seriously

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:

git clone https://github.com/zone117x/node-cryptonote-pool.git pool
cd pool

nvm install 0.10.48
nvm use 0.10.48
nvm alias default 0.10.48
nvm use default

npm update

2) Configuration

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:

/* Used for storage in redis so multiple coins can share the same redis instance. */
"coin": "monero",

/* Used for front-end display */
"symbol": "MRO",

"logging": {

    "files": {

        /* Specifies the level of log output verbosity. This level and anything
           more severe will be logged. Options are: info, warn, or error. */
        "level": "info",

        /* Directory where to write log files. */
        "directory": "logs",

        /* How often (in seconds) to append/flush data to the log files. */
        "flushInterval": 5
    },

    "console": {
        "level": "info",
        /* Gives console output useful colors. If you direct that output to a log file
           then disable this feature to avoid nasty characters in the file. */
        "colors": true
    }
},

/* Modular Pool Server */
"poolServer": {
    "enabled": true,

    /* Set to "auto" by default which will spawn one process/fork/worker for each CPU
       core in your system. Each of these workers will run a separate instance of your
       pool(s), and the kernel will load balance miners using these forks. Optionally,
       the 'forks' field can be a number for how many forks will be spawned. */
    "clusterForks": "auto",

    /* Address where block rewards go, and miner payments come from. */
    "poolAddress": "4AsBy39rpUMTmgTUARGq2bFQWhDhdQNekK5v4uaLU699NPAnx9CubEJ82AkvD5ScoAZNYRwBxybayainhyThHAZWCdKmPYn"

    /* Poll RPC daemons for new blocks every this many milliseconds. */
    "blockRefreshInterval": 1000,

    /* How many seconds until we consider a miner disconnected. */
    "minerTimeout": 900,

    "ports": [
        {
            "port": 3333, //Port for mining apps to connect to
            "difficulty": 100, //Initial difficulty miners are set to
            "desc": "Low end hardware" //Description of port
        },
        {
            "port": 5555,
            "difficulty": 2000,
            "desc": "Mid range hardware"
        },
        {
            "port": 7777,
            "difficulty": 10000,
            "desc": "High end hardware"
        }
    ],

    /* Variable difficulty is a feature that will automatically adjust difficulty for
       individual miners based on their hashrate in order to lower networking and CPU
       overhead. */
    "varDiff": {
        "minDiff": 2, //Minimum difficulty
        "maxDiff": 100000,
        "targetTime": 100, //Try to get 1 share per this many seconds
        "retargetTime": 30, //Check to see if we should retarget every this many seconds
        "variancePercent": 30, //Allow time to vary this % from target without retargeting
        "maxJump": 100 //Limit diff percent increase/decrease in a single retargetting
    },

    /* Feature to trust share difficulties from miners which can
       significantly reduce CPU load. */
    "shareTrust": {
        "enabled": true,
        "min": 10, //Minimum percent probability for share hashing
        "stepDown": 3, //Increase trust probability % this much with each valid share
        "threshold": 10, //Amount of valid shares required before trusting begins
        "penalty": 30 //Upon breaking trust require this many valid share before trusting
    },

    /* If under low-diff share attack we can ban their IP to reduce system/network load. */
    "banning": {
        "enabled": true,
        "time": 600, //How many seconds to ban worker for
        "invalidPercent": 25, //What percent of invalid shares triggers ban
        "checkThreshold": 30 //Perform check when this many shares have been submitted
    },
    /* [Warning: several reports of this feature being broken. Proposed fix needs to be tested.] 
        Slush Mining is a reward calculation technique which disincentivizes pool hopping and rewards 
        'loyal' miners by valuing younger shares higher than older shares. Remember adjusting the weight!
        More about it here: https://mining.bitcoin.cz/help/#!/manual/rewards */
    "slushMining": {
        "enabled": false, //Enables slush mining. Recommended for pools catering to professional miners
        "weight": 300, //Defines how fast the score assigned to a share declines in time. The value should roughly be equivalent to the average round duration in seconds divided by 8. When deviating by too much numbers may get too high for JS.
        "lastBlockCheckRate": 1 //How often the pool checks the timestamp of the last block. Lower numbers increase load but raise precision of the share value
    }
},

/* Module that sends payments to miners according to their submitted shares. */
"payments": {
    "enabled": true,
    "interval": 600, //how often to run in seconds
    "maxAddresses": 50, //split up payments if sending to more than this many addresses
    "mixin": 3, //number of transactions yours is indistinguishable from
    "transferFee": 5000000000, //fee to pay for each transaction
    "minPayment": 100000000000, //miner balance required before sending payment
    "denomination": 100000000000 //truncate to this precision and store remainder
},

/* Module that monitors the submitted block maturities and manages rounds. Confirmed
   blocks mark the end of a round where workers' balances are increased in proportion
   to their shares. */
"blockUnlocker": {
    "enabled": true,
    "interval": 30, //how often to check block statuses in seconds

    /* Block depth required for a block to unlocked/mature. Found in daemon source as
       the variable CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW */
    "depth": 60,
    "poolFee": 1.8, //1.8% pool fee (2% total fee total including donations)
    "devDonation": 0.1, //0.1% donation to send to pool dev - only works with Monero
    "coreDevDonation": 0.1 //0.1% donation to send to core devs - only works with Monero
},

/* AJAX API used for front-end website. */
"api": {
    "enabled": true,
    "hashrateWindow": 600, //how many second worth of shares used to estimate hash rate
    "updateInterval": 3, //gather stats and broadcast every this many seconds
    "port": 8117,
    "blocks": 30, //amount of blocks to send at a time
    "payments": 30, //amount of payments to send at a time
    "password": "test" //password required for admin stats
},

/* Coin daemon connection details. */
"daemon": {
    "host": "127.0.0.1",
    "port": 18081
},

/* Wallet daemon connection details. */
"wallet": {
    "host": "127.0.0.1",
    "port": 8082
},

/* Redis connection into. */
"redis": {
    "host": "127.0.0.1",
    "port": 6379,
    "auth": null //If set, client will run redis auth command on connect. Use for remote db
}

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

pool_host=example.com
pool_port=5555

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.

4) Start the pool

node init.js

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

node init.js -config=config_backup.json

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:

node init.js -module=api

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

5) Host the front-end

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:

/* Must point to the API setup in your config.json file. */
var api = "http://poolhost:8117";

/* Minimum units in a single coin, for Bytecoin its 100000000. */
var coinUnits = 1000000000000;

/* Pool server host to instruct your miners to point to.  */
var poolHost = "cryppit.com";

/* IRC Server and room used for embedded KiwiIRC chat. */
var irc = "irc.freenode.net/#monero";

/* Contact email address. */
var email = "[email protected]";

/* Market stat display params from https://www.cryptonator.com/widget */
var cryptonatorWidget = ["XMR-BTC", "XMR-USD", "XMR-EUR", "XMR-GBP"];

/* Download link to cryptonote-easy-miner for Windows users. */
var easyminerDownload = "https://github.com/zone117x/cryptonote-easy-miner/releases/";

/* Used for front-end block links. For other coins it can be changed, for example with
   Bytecoin you can use "https://minergate.com/blockchain/bcn/block/". */
var blockchainExplorer = "http://monerochain.info/block/";

/* Used by front-end transaction links. Change for other coins. */
var transactionExplorer = "http://monerochain.info/tx/";

6) Customize your website

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.

Upgrading

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.

Setting up Testnet

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:

curl 127.0.0.1:18081/json_rpc -d '{"method":"getblockheaderbyheight","params":{"height":100}}'

Monitoring Your Pool

  • 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

Donations

  • BTC: 1667jMt7NTZDaC8WXAxtMYBR8DPWCVoU4d
  • MRO: 48Y4SoUJM5L3YXBEfNQ8bFNsvTNsqcH5Rgq8RF7BwpgvTBj2xr7CmWVanaw7L4U9MnZ4AG7U6Pn1pBhfQhFyFZ1rL1efL8z

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

License

Released under the GNU General Public License v2

http://www.gnu.org/licenses/gpl-2.0.html

node-cryptonote-pool's People

Contributors

akuka avatar barbushin avatar lucasjones avatar moneromooo avatar perl5577 avatar quinnmallorry avatar raztor0 avatar sammy007 avatar scanbiz avatar snipa22 avatar theinfocoder avatar webweave avatar zone117x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-cryptonote-pool's Issues

RPC request to wallet daemon ECONNREFUSED

Hi,

i am getting this error:
2014-07-01 17:14:53 [payments] Error with transfer RPC request to wallet daemon {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}

bitmonerod is running and i can start and use simplewallet.

Thanks.

Bitmonerod send ERROR

bitminerod every minute send error:
[P2P6]ERROR /bitmonero/contrib/epee/include/net/abstract_tcp_server2.inl:307 send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(100), shutting down connection
[P2P6]ERROR /bitmonero/contrib/epee/include/net/levin_protocol_handler_async.h:638 [174.3.102.122:18080 OUT]Failed to do_send()
it`s may be P2P6, P2P8, P2P7... etc

Payout

Is it possible to change the Payout logic to pay out miner when an amount is reached instead of every Block that they participated?

With all these small transactions its not possible to send larger amounts due to transaction size limits.

Moneta Verde Pool

Hi! I recently setup pool for moneta verde coin, also i changed the address length setting in /lib/utils.js and when i connect my miner to this pool im seeing this error on coin daemon 2014-Jun-19 10:26:52.880639 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/storages/portable_storage.h:161 portable_storage: wrong binary format - signature missmatch
2014-Jun-19 10:26:52.880730 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/storages/levin_abstract_invoke2.h:196 Failed to load_from_binary in notify 2001
2014-Jun-19 10:26:52.880765 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/net/levin_protocol_handler_async.h:439 [79.103.3.93:64530 INC]Signature mismatch, connection will be closed
2014-Jun-19 13:10:29.576543 [P2P8][sock 26] Some problems at write: Broken pipe:32
2014-Jun-19 13:30:08.022933 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/storages/portable_storage.h:161 portable_storage: wrong binary format - signature missmatch
2014-Jun-19 13:30:08.023007 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/storages/levin_abstract_invoke2.h:196 Failed to load_from_binary in notify 2001
2014-Jun-19 13:30:08.023042 [P2P6]ERROR /home/punk/monetaverde/contrib/epee/include/net/levin_protocol_handler_async.h:439 [82.234.189.65:52119 INC]Signature mismatch, connection will be closed
2014-Jun-19 13:55:00.538609 [P2P0]ERROR /home/punk/monetaverde/contrib/epee/include/storages/portable_storage.h:161 portable_storage: wrong binary format - signature missmatch
2014-Jun-19 13:55:00.538679 [P2P0]ERROR /home/punk/monetaverde/contrib/epee/include/storages/levin_abstract_invoke2.h:196 Failed to load_from_binary in notify 2001
2014-Jun-19 13:55:00.538713 [P2P0]ERROR /home/punk/monetaverde/contrib/epee/include/net/levin_protocol_handler_async.h:439 [113.67.142.69:49564 INC]Signature mismatch, connection will be closed
2014-Jun-19 16:37:40.609241 [P2P2]ERROR /home/punk/monetaverde/contrib/epee/include/storages/portable_storage.h:161 portable_storage: wrong binary format - signature missmatch
2014-Jun-19 16:37:40.609323 [P2P2]ERROR /home/punk/monetaverde/contrib/epee/include/storages/levin_abstract_invoke2.h:196 Failed to load_from_binary in notify 2001
2014-Jun-19 16:37:40.609357 [P2P2]ERROR /home/punk/monetaverde/contrib/epee/include/net/levin_protocol_handler_async.h:439 [109.92.228.172:63571 INC]Signature mismatch, connection will be closed

Maximum amount sent in one transaction

Add an option
Bug:
2014-07-02 03:48:40 Error with transfer RPC request to wallet daemon {"code":-4,"message":"transaction is too big"}

This bug when crash wallet (wallet refresh when daemon stored blockchain)
Later 1-2 hours I re-started wallet.

Can you help me ? thanks!

I am a computer newbie。I follow the manual, step by step, the installation of node-cryptonote-pool.
When I type 'node init.js', screen output:
2014-06-14 17:56:32 [Payments] Started
2014-06-14 17:56:32 [Payments] No pending blocks in redis
2014-06-14 17:56:32 [API] Error getting daemon data {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [API] Error collecting all stats
2014-06-14 17:56:32 [API] API listening on port 8117
2014-06-14 17:56:32 [Master] [Pool Spawner] Spawned pool on 8 thread(s)
2014-06-14 17:56:32 [Pool](Thread 3) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 3) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 1) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 1) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 4) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 4) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 2) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 2) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 7) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 7) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 5) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:32 [Pool](Thread 5) [Could not start pool]
2014-06-14 17:56:32 [Pool](Thread 6) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}
2014-06-14 17:56:33 [Pool](Thread 6) [Could not start pool]
2014-06-14 17:56:33 [Pool](Thread 8) [Job Refresher] Error polling getblocktemplate {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}

My system is Debian jessie, run in ESXI5.1 .
Please help me , many thanks :)

Profit withdrawal feature

Amount of coins that are profit can be calculated during block unlocking. The profit would increment a balance for the pool op, and the payment processor would be responsible for doing the payout.

Diff retarget is working not correctly

Hi.
2014-05-16 16:22:04 [Pool](Thread 6) [Share Validator] Accepted share at difficulty 200/382 from ...
2014-05-16 16:22:04 [Pool](Thread 6) [Difficulty Retargeter] Difficulty 200 avg 0.8888888888888888, ddiff 112.5 for ...
2014-05-16 16:22:04 [Pool](Thread 6) [Difficulty Retargeter] Retargetting difficulty 200 to 10000 for ...

And all. Difficulty never lower due to not more shares at Diff 10000.

May be that is correct (works for me):

  •    var newDiff = Math.round(this.difficulty \* ddiff);
    
  •    var newDiff = Math.round(this.difficulty / avg);
    

PPLNS Reward System

Current system is PROP and there may be lots of pool hopping going on. PPLNS should be a optional reward system.

Pool not listening any ports

Hi

I have compiled node-cryptonote-pool on Ubuntu 12.04, configured bytecoind and simplewallet, everything started without any errors, but it looks like node-cryptonote-pooldoes not listen any ports from config see http://i.imgur.com/ZdDxNSc.jpg

There is my config:

"coin": "bytecoin",
"symbol": "BTE",

"logLevel": "debug",
"logColors": true,

"coinUnits": 100000000,

"poolHost": "127.0.0.1",

"irc": "irc.freenode.net/#monero",

"email": "[email protected]",

"cryptonatorWidget": "num=3&base_0=Monero%20(XMR)&target_0=Bitcoin%20(BTC)&base_1=Monero%20(XMR)&target_1=US%20Dollar%20(USD)&base_2=Monero%20(XMR)&target_2=Euro%20(EUR)",

"easyminerDownload": "https://github.com/zone117x/cryptonote-easy-miner/releases/",

"simplewalletDownload": "http://bit.ly/monero-starter-pack",

"blockchainExplorer": "http://monerochain.info/block/",

"poolServer": {
    "enabled": true,
    "clusterForks": "auto",
    "poolAddress": "26Hico5XxKTYMGm1TZjfSXW6CxqsATeVkinWEv8jMR6aZFdyaRAXXqsbTA9F27RUtLbwU2rAn9EccWK4iz3fon6V2VkB8kT",
    "blockRefreshInterval": 1000,
    "minerTimeout": 900,
    "ports": [
        {
            "port": 5555,
            "protocol": "tcp",
            "difficulty": 200,
            "desc": "Mid range CPUs"
        },
        {
            "port": 7777,
            "protocol": "tcp",
            "difficulty": 2000,
            "desc": "High end CPUs"
        },
        {
            "port": 1111,
            "protocol": "http",
            "difficulty": 500,
            "desc": "Old protocol"
        }
    ],
    "varDiff": {
        "minDiff": 2,
        "maxDiff": 10000,
        "targetTime": 100,
        "retargetTime": 30,
        "variancePercent": 30,
        "maxJump": 1000
    },
    "shareTrust": {
        "enabled": true,
        "min": 10,
        "stepDown": 3,
        "threshold": 10,
        "penalty": 30
    },
    "longPolling": {
        "enabled": false,
        "timeout": 8500
    },

    "banning": {
        "enabled": true,
        "time": 600,
        "invalidPercent": 25,
        "checkThreshold": 30
    }
},

"payments": {
    "enabled": true,
    "transferFee": 5000000000,
    "interval": 30,
    "poolFee": 2,
    "depth": 60,
    "maxAddresses": 50
},

"api": {
    "enabled": true,
    "hashrateWindow": 600,
    "updateInterval": 3,
    "port": 8117
},

"daemon": {
    "host": "127.0.0.1",
    "port": 18081
},

"wallet": {
    "host": "127.0.0.1",
    "port": 8082
},

"redis": {
    "host": "127.0.0.1",
    "port": 6379
}

Not closing rpc connections properly?

My bitmonerod always blocks with the following message:

 bitmonero.git/contrib/epee/include/net/abstract_tcp_server2.inl:307 send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(100), shutting down connection

Is it possible that the pool doesn't properly close its rpc connections?

Extract payout script

Please extract it to separate payout.js, the reason is obvious, no way to restart pool in order to process emergency payout.

transaction issue

i have quazarcoin pool with hashrate over 13khs and i see this error on quazarcoin daemon :
2014-May-29 21:44:05.204009 [P2P9]Failed to handle_output for output no = 0, with absolute offset 5408
2014-May-29 21:44:05.204034 [P2P9]Failed to get output keys for tx with amount = 0.003000000000 and count indexes 1
2014-May-29 21:44:05.204271 [P2P9]Failed to check ring signature for tx <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.204295 [P2P9]tx used wrong inputs, rejected
2014-May-29 21:44:05.204316 [P2P9]Transaction verification failed: <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.204344 [P2P9][85.93.104.52:65292 INC]Tx verification failed, dropping connection
2014-May-29 21:44:05.268847 [P2P9]One of outputs for one of inputs have wrong tx.unlock_time = 15291
2014-May-29 21:44:05.268990 [P2P9]Failed to handle_output for output no = 0, with absolute offset 5408
2014-May-29 21:44:05.269038 [P2P9]Failed to get output keys for tx with amount = 0.003000000000 and count indexes 1
2014-May-29 21:44:05.269411 [P2P9]Failed to check ring signature for tx <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.269502 [P2P9]tx used wrong inputs, rejected
2014-May-29 21:44:05.269558 [P2P9]Transaction verification failed: <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.269616 [P2P9][144.76.75.34:48030 INC]Tx verification failed, dropping connection
2014-May-29 21:44:05.321441 [P2P9]One of outputs for one of inputs have wrong tx.unlock_time = 15291
2014-May-29 21:44:05.321567 [P2P9]Failed to handle_output for output no = 0, with absolute offset 5408
2014-May-29 21:44:05.321640 [P2P9]Failed to get output keys for tx with amount = 0.003000000000 and count indexes 1
2014-May-29 21:44:05.322020 [P2P9]Failed to check ring signature for tx <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.322070 [P2P9]tx used wrong inputs, rejected
2014-May-29 21:44:05.322109 [P2P9]Transaction verification failed: <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.322165 [P2P9][144.76.15.230:50474 INC]Tx verification failed, dropping connection
2014-May-29 21:44:05.362013 [P2P7]One of outputs for one of inputs have wrong tx.unlock_time = 15291
2014-May-29 21:44:05.362179 [P2P7]Failed to handle_output for output no = 0, with absolute offset 5408
2014-May-29 21:44:05.362301 [P2P7]Failed to get output keys for tx with amount = 0.003000000000 and count indexes 1
2014-May-29 21:44:05.362694 [P2P7]Failed to check ring signature for tx <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.362778 [P2P7]tx used wrong inputs, rejected
2014-May-29 21:44:05.362825 [P2P7]Transaction verification failed: <37f9f3da24b77a540ee4da6aa0b7aa2a73b20868df223915ab50cacb5ca71234>
2014-May-29 21:44:05.362916 [P2P7][144.76.81.180:38972 INC]Tx verification failed, dropping connection

Invalid method: mining.subscribe([])

Someone mining with wrong settings for a couple of days.

(Thread 2) [RPC Handler] Invalid method: mining.subscribe([])

How can I suppress this log flood or probably ban him forever?

Pending Balance (not enough money=

Hey,

i lost some coins because i played with the wallet and now the pools wants to send money that is not available.
It is my personal wallet/money so it is not a problem.

"found_money < needed_money. THROW EXCEPTION: error::not_enough_money"

How can i remove this error?

just a question about payouts

When my pool finds a block, how the daemon can do the payouts, when the wallet doesnt have the transactions until i run command refresh on it ? thanks

address validation

Any way to fix the address validation issue with coins such as DuckNote
Currently the workaround is disabling the addressvalidator in pool.js however this creates issues obviously when miners mine with an invalid duck address.

failed payments

2014-06-25 11:46:30 [payments] Error with transfer RPC request to wallet daemon {"code":-4,"message":"transaction is too big"}

Don`t compile(boost)

npm update error:
In file included from ../src/cryptonote_core/cryptonote_format_utils.cpp:11:0:
../src/cryptonote_core/miner.h:7:28: fatal error: boost/atomic.hpp: No such file or directory

Admin center

The admin center would be accessed via your pool's website (ex: pool.com/admin) and interface with the pool server via the API (requiring authentication, of course).

Features

  • Miner panel
    • Select miner from a searchable list
    • View miner details
    • Set custom mining fee %
    • Increase/decrease miner's balance
  • Admin stats
    • Total pool revenue
    • Total pool profit
    • Total paid out
    • Total unpaid miners' balances

about payout

when the number of payout is too large, the wallet will refuse, can you add a set number, when send an address is too large, auto cut and many times payout

Pool doesn't pay out

Getting the following error:

 Error with transfer RPC request to wallet daemon {"code":-4,"message":"not enough money"}

Pool wallet has money. Forgot to start the pool daemon in the beginning - that's maybe a cause?

Time not displaying properly if block time is wrong

When a miner with a wildly incorrect clock, but within CRYPTONOTE_BLOCK_FUTURE_TIME_LIMIT (2 hours by default), finds a block, the stats display for the pool's time-since-last-block goes a little bit crazy. It'd be cool to make this a little more robust by checking not just the timestamp in the block, but, e.g., the timestamp of reception and/or the following blocks, if possible.

Pool doesn't recognize all orphans

Pool interface doesn't display one of the blocks as orphaned, even though the block explorer doesn't know the block. Interface shows 3 other orphans correctly.

Refactor payment failures

Decrement miner account balances only after successful payments to get rid of failed payment logs that must be executed manually. This will make failed payments retry until succeeding.

Api erro .Cannot set property 'hashrate' of undefined

[init-0 (err) 2014-05-27T03:54:23] events.js:72
[init-0 (err) 2014-05-27T03:54:23]         throw er; // Unhandled 'error' event
[init-0 (err) 2014-05-27T03:54:23]               ^
[init-0 (err) 2014-05-27T03:54:23] TypeError: Cannot set property 'hashrate' of undefined
[init-0 (err) 2014-05-27T03:54:23]     at formatMinerStats (/data/qcnpool/lib/api.js:204:24)
[init-0 (err) 2014-05-27T03:54:23]     at /data/qcnpool/lib/api.js:197:34
[init-0 (err) 2014-05-27T03:54:23]     at /data/qcnpool/node_modules/redis/index.js:1138:13
[init-0 (err) 2014-05-27T03:54:23]     at try_callback (/data/qcnpool/node_modules/redis/index.js:573:9)
[init-0 (err) 2014-05-27T03:54:23]     at RedisClient.return_reply (/data/qcnpool/node_modules/redis/index.js:661:13)
[init-0 (err) 2014-05-27T03:54:23]     at ReplyParser.<anonymous> (/data/qcnpool/node_modules/redis/index.js:309:14)
[init-0 (err) 2014-05-27T03:54:23]     at ReplyParser.EventEmitter.emit (events.js:95:17)
[init-0 (err) 2014-05-27T03:54:23]     at ReplyParser.send_reply (/data/qcnpool/node_modules/redis/lib/parser/javascript.js:300:10)
[init-0 (err) 2014-05-27T03:54:23]     at ReplyParser.execute (/data/qcnpool/node_modules/redis/lib/parser/javascript.js:211:22)
[init-0 (err) 2014-05-27T03:54:23]     at RedisClient.on_data (/data/qcnpool/node_modules/redis/index.js:534:27)

many times

Clear TimeRing

Liner 253 of lib/pool.js
You are sure for at this.shareTimeRing.clear();

clean redis

any way to auto archive the pool blocks to make the site more responsive?
currently manualy moving redis smembers coinname:blocksUnlocked to archive:blocksUnlocked manually

Compile error

CXX(target) Release/obj.target/cryptonote/src/main.o
cc1plus: error: unrecognized command line option ‘-std=c++11’
make: *** [Release/obj.target/cryptonote/src/main.o] Error 1
make: Leaving directory /root/pool/node_modules/cryptonote-util/build' gyp ERR! build error gyp ERR! stack Error:makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:807:12) gyp ERR! System Linux 3.2.0-61-generic gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/pool/node_modules/cryptonote-util gyp ERR! node -v v0.10.28 gyp ERR! node-gyp -v v0.13.0 gyp ERR! not ok npm ERR! [email protected] install:node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the cryptonote-util package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls cryptonote-util
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-61-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update"
npm ERR! cwd /root/pool
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/pool/npm-debug.log
npm ERR! not ok code 0
You have new mail in /var/mail/root

Bitmonerod send ERROR

bitminerod every minute send error:
[P2P6]ERROR /bitmonero/contrib/epee/include/net/abstract_tcp_server2.inl:307 send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(100), shutting down connection
'[P2P6]ERROR /bitmonero/contrib/epee/include/net/levin_protocol_handler_async.h:638 [174.3.102.122:18080 OUT]Failed to do_send() its may be P2P6, P2P8, P2P7... etc

Net hash rate and your stats hash rate showing 4x higher. Pool hash rate OK.

For some reason, the net hash and the hash that shows up when you enter your wallet info are displaying 4 times higher than they should. The pool hash is showing correctly. I thought it might have been a bug to do with having clusterforks set to auto since I have 4 cores. I set that to 1, and it still does it though. Is there any reason that this is happening? My pool is currently on XDN if it makes a difference.

pool.js convert_blob issue

I try to install this pool on Ubuntu 14 using nodejs 0.10.28 (0.11 had compile issues), but I get an error as soon as the first response is being created. I added some debug info as shown below. Could you maybe point me in the right direction? Thanks.

----- lib/pool.js -----

BlockTemplate.prototype = {
nextBlob: function(){
this.buffer.writeUInt32BE(++this.extraNonce, this.reserveOffset);
console.log("***** extraNonce: " + this.extraNonce + ", reserveOffset: " + this.reserveOffset + " ***");
console.log("**
* buffer: " + new Buffer(this.buffer).toString('hex') + " *****");
return cnUtil.convert_blob(this.buffer).toString('hex');
}
};

----- output -----

+++++ method: login, params: {"agent":"simpleminer/0.1","login":"6j5B95.....QPafQ66Wgz3dy","pass":"x"}
***** extraNonce: 1, reserveOffset: 467 *****
***** buffer: 020089acb267e7169a7fd5e21a0e59b40ae5d04b11f910715c38ce1e158b8d0c3871010085c28e9c05000000000000000000000000000000000000000000000000000000000000000000000000010000000023032100000000000000000000000000000000000000000000000000000000000000000001b9ef0101fffdee0108c2e80e0241d700b48b9de92c6755d3ccd354aa80972ca79ea66dc3bd0a9907b71a992cffc08db7010284e72161547c13b0e69d124f30c47111b925a88eccdae90595341bb6fbf827ac80b4891302283f6c0c0d62ed9d9fdb1ea8531d6526a3a3000f2d06345fdcbc3b61d1c460fd80c2d72f021c7e5f36acefd962dafab738f9bb1cd4759511492eb8ccb32a1952e7946f695480f882ad1602c290ae8ed6c47f90ca11342186f299b4a8ee501a65d9987af4382172b62896a780b09dc2df01029b5a88d4e86508ffa0a15f62e016f363eaf358e9b2dd404358703cedabae0e1080f092cbdd08027065604839969283286e5399230525404c224423bb1ac08a1a4c46b58b239b6c8080d194b5740278b9da7222f9d90ca8c1aec2c75efb817fba6c814a67e64ad6f6371e9ef508f22b0180880c7f84eb02ee8bfbc6dec29e1c11d42dca12a658a0953d1e74a2599c19b602080000000001d286e50167701ef151cdfcf7db7a570c6b0807b72c750adba1f0d3f31d6ad4dd0ff06d42 *****

/var/www/html/lib/pool.js:124
return cnUtil.convert_blob(this.buffer).toString('hex');
^
Error: Failed to parse block
at Object.BlockTemplate.nextBlob (/var/www/html/lib/pool.js:124:23)
at Object.Miner.getJob (/var/www/html/lib/pool.js:264:41)
at handleMinerMethod (/var/www/html/lib/pool.js:486:28)
at IncomingMessage. (/var/www/html/lib/pool.js:736:17)
at IncomingMessage.EventEmitter.emit (events.js:92:17)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)

Better vardiff

Currently vardiff retargets on share submission. Each pool thread should run an interval which checks if any of the miners needs retargeting.

Pending balance increasing.

I have miners that are reporting no payments. Upgraded to latest code last night.
Atttached is one example where a miner has reported no payout in 2 days, and when I pull up his address it appears coins stuck in pending.

here is details for this one example.
http://mnt.extremepool.org
Miner address: 47V3xq2YYQRjZ4jUXf74G9Yy2rZeqxSKx86MQTFxFenYUXabfQjeTxfDWxbsjfxir1Mm1eMeiXr53Ww NE3YeeLwe6b1sgj8

http://i.imgur.com/WJ1CA0e.png

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.