当前位置: 首页 > 软件库 > Web3 > 开源货币/比特币 >

aeon-multi-pools

AEON multi-pools
授权协议 GPL-2.0 License
开发语言 Python
所属分类 Web3、 开源货币/比特币
软件类型 开源软件
地区 不详
投 递 者 干照
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

cryptonote-xmr-pool

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.

Table of Contents

Basic 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 orphanblock 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
  • Support for configuration using tls (https) in pool code to allowing the same for web frontend
  • Multiple modules can be started on command line instead of one or none.
  • Onishin's keepalive function https://github.com/perl5577/cpuminer-multi/commit/0c8aedb

Extra features

  • 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) validation
  • Five configurable CSS themes
  • Universal blocks and transactions explorer based on chainradar.com
  • FantomCoin support is not currently working after fixes to get node modules to work after Mar 23, 2016 fork.
  • MonetaVerde support not tested since changes for monero fork
  • Set fixed difficulty on miner client by passing "address" param with ".[difficulty]" postfix
  • Prevent "transaction is too big" error with "payments.maxTransactionAmount" option

Community / Support

Pools Using This Software

Usage

Requirements

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 toinclude bind 127.0.0.1 in your redis.conf file. Also it's a good idea to learn about and understand software thatyou 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:

sudo apt-get install git redis-server libboost1.55-all-dev nodejs-dev nodejs-legacy npm cmake libssl-dev

1) Downloading & Installing

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

git clone https://github.com/clintar/cryptonote-xmr-pool.git pool
cd pool
npm update

2) Configuration

Explanation for each field:

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

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

/* Minimum units in a single coin, see COIN constant in DAEMON_CODE/src/cryptonote_config.h */
"coinUnits": 100000000,

/* Coin network time to mine one block, see DIFFICULTY_TARGET constant in DAEMON_CODE/src/cryptonote_config.h */
"coinDifficultyTarget": 240,

"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": "ddehi53dwGSBEXdhTYtga2R3fS4y9hRz4YHAsLABJpH75yUd5EDQmuL3yDBj1mG6MMeDfydY9vp4zFVVNQ99FTYq2PpsFJP2y"

    /* 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 very this % from target without retargeting
        "maxJump": 100 //Limit diff percent increase/decrease in a single retargetting
    },

    /* Set difficulty on miner client side by passing <address> param with .<difficulty> postfix
       minerd -u 4AsBy39rpUMTmgTUARGq2bFQWhDhdQNekK5v4uaLU699NPAnx9CubEJ82AkvD5ScoAZNYRwBxybayainhyThHAZWCdKmPYn.5000 */
    "fixedDiff": {
        "enabled": true,
        "separator": ".", // character separator between <address> and <difficulty>
    },

    /* 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
    }
},

/* 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
    "maxTransactionAmount": 0, //split transactions by this amount(to prevent "too big transaction" error)
    "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,
    "core": 0.1
},

/* 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
}

/* Monitoring RPC services. Statistics will be displayed in Admin panel */
"monitoring": {
    "daemon": {
        "checkInterval": 60, //interval of sending rpcMethod request
        "rpcMethod": "getblockcount" //RPC method name
    },
    "wallet": {
        "checkInterval": 60,
        "rpcMethod": "getbalance"
    }

/* Collect pool statistics to display in frontend charts  */
"charts": {
    "pool": {
        "hashrate": {
            "enabled": true, //enable data collection and chart displaying in frontend
            "updateInterval": 60, //how often to get current value
            "stepInterval": 1800, //chart step interval calculated as average of all updated values
            "maximumPeriod": 86400 //chart maximum periods (chart points number = maximumPeriod / stepInterval = 48)
        },
        "workers": {
            "enabled": true,
            "updateInterval": 60,
            "stepInterval": 1800, //chart step interval calculated as maximum of all updated values
            "maximumPeriod": 86400
        },
        "difficulty": {
            "enabled": true,
            "updateInterval": 1800,
            "stepInterval": 10800,
            "maximumPeriod": 604800
        },
        "price": { //USD price of one currency coin received from cryptonator.com/api
            "enabled": true,
            "updateInterval": 1800,
            "stepInterval": 10800,
            "maximumPeriod": 604800
        },
        "profit": { //Reward * Rate / Difficulty
            "enabled": true,
            "updateInterval": 1800,
            "stepInterval": 10800,
            "maximumPeriod": 604800
        }
    },
    "user": { //chart data displayed in user stats block
        "hashrate": {
            "enabled": true,
            "updateInterval": 180,
            "stepInterval": 1800,
            "maximumPeriod": 86400
        },
        "payments": { //payment chart uses all user payments data stored in DB
            "enabled": true
        }
    }

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

Your miners that are Windows users can use cryptonote-easy-minerwhich will automatically generate their wallet address and stratup multiple threads of simpleminer. You can downloadit 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 topoint 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 startonly 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";

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

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

/* Contact email address. */
var email = "support@poolhost.com";

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

/* 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. */
var blockchainExplorer = "http://chainradar.com/{symbol}/block/{id}";

/* Used by front-end transaction links. */
var transactionExplorer = "http://chainradar.com/{symbol}/transaction/{id}";

/* Any custom CSS theme for pool frontend */
var themeCss = "themes/default-theme.css";

6) Customize your website

The following files are included so that you can customize your pool website without having to make significant changesto 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 updatethe 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

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 excellenttutorial http://moneroexamples.github.io/private-testnet/ to set up a private testnet. Should work with othercoins, 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:

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

Monero: 44Dx3bVEarKNGciPJSsD9BXFZASyooXpjCBCzhw3D8cANMzyyJn6PcyWbwaVe4vUMveKAzAiA4j8xgUi29TpKXpm3wUvH8Z

Bitcoin: 3Joc3kRGC233AHh3BQuUGxptggK8ScyUrZ

Aeon: Wmswvbsac7eZ7pZEbey9nmgoZPjtwBAwRh7Qgm1xHVwF6hcnH43r2vX3hLTKARSrvtH8g4wJtEXS9V3Axz1Y2m8P2uqXEZi51

Dash: XtKTCad86mpGmALqKhGqzqFTBkcb1ZzXrn

ZCash: t1Zum9bh2U6gWwbNyDeEFCSWUPAAbjvdNnJ

Tether: 1LVfoqGqoi8NSckgDgxR9WhqKEjVEHdts3

NXT: NXT-TPPJ-5QVY-LQWF-HXRQD

NEO: APgGg8kuWzzwcLBB3xR5NC3cmYg5dLrgjT

Litecoin: LdmyNUKE7dxuQLxBSDLe2hsUkGXrqwrin3

Lisk: 17746879737169256464L

Ignis: ARDOR-VX3A-UAFT-MVLK-HAE4M

Fantom Coin: 6qCZgyFKUY5RfGhZtJSUH95UN3EZaXTmTWen5CUBb9YZZowx1dV9VoZbyftABRVPdXbYRyBKfHd72H3XvUTr8Ht2Jry2BZU

Eth: 0x411f92b8e7cc11002919a02eb03fbe5e450ba50c

Dogecoin: DTQAjFTcV9ap96hoQsFEWwTpEXS13y55LX

Digitalnote: ddchiP79MK6UHe15Qaf7Q45bmF6r1HLtBeY2EXURC98R83aNg3Bc815QRrdbUBaLyQ9h4wtvggAcY3Way3t4cGoX1AUC9vS6v

Bitcoingold: GeMDC2kYzrBN245psHCWvfLnCbBRwXAjgK

Bancor: 0xb12b07140f5c6eab2c9a59b215bad46b72bf840a

Bytecoin: 23z7sC1bZ1DdNZ9gLPk4miUuB6x3YnSPvhVnypP1f5SRVXovvX72ydGKA32X5SrJuDPBgXTsSmQRoAbCzcDvM2d2PfYsxbY

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
  • BTC: 1667jMt7NTZDaC8WXAxtMYBR8DPWCVoU4d-
  • MRO: 48Y4SoUJM5L3YXBEfNQ8bFNsvTNsqcH5Rgq8RF7BwpgvTBj2xr7CmWVanaw7L4U9MnZ4AG7U6Pn1pBhfQhFyFZ1rL1efL8z
  • [clintar] (https://github.com/clintar) Updates to support nodejs >0.10 and continuing updatesLicense

Released under the GNU General Public License v2

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

  • 前面我们讲申请大于一个page size的时候用dma_alloc_coherent,如果小于一个page size,则可以使用DMA-coherent buffers. 在使用DMA-coherent buffers 之前首先要调用来create buffer.     struct dma_pool *     dma_pool_create(const char *name, struct

  • Vista Group和日本商业合作伙伴VINX Corporation达成了使用Vista电影管理和Movio数据分析软件的交易   新西兰奥克兰和东京--(美国商业资讯)--为全球电影业提供软件解决方案的全球领先供应商Vista Group International (NZX & ASX: VGL)与其在日本的首家客户Aeon Entertainment Co Ltd (‘Aeon’)签订了

  • 池是用于存储对象的逻辑分区。 当您首次部署集群而不创建池时,Ceph 使用默认池来存储数据。池为您提供: 弹性:您可以设置允许多少 OSD 失败而不会丢失数据。对于复制池,它是对象的所需副本/副本数。典型配置存储一个对象和一个附加副本(即size = 2),但您可以确定副本/副本的数量。对于纠删码池,它是编码块的数量(即在纠删码配置文件中m=2) Placement Groups:您可以为池设置归

  • 我们在定义Tables的时候,一般会加上TYPE-POOLS SLIS. slis应该是个Package.声明了它后就可以用它包括的函数、类、消息等。 SLIS_FIELDCAT_ALV 是控制ALV的列的信息,比如列宽、颜色、是否可修改等。 SLIS_LAYOUT_ALV 是控制整体的ALV的显示状态的,比如隔行显示不同的颜色,自动优化全部列的宽度,全部列可修改等等。 下面一个控制ALV单元格颜

  • 就个人理解,池表和簇表是表的类型,是一种逻辑存在,SAP中可对其象表一样的访问;表池和表簇是用来存放池表和簇表的,是一种物理存在,数据库中可以直接看到它们的结构 SAP这样的抽象是为了应用的需要,它们应用于不同的场合,以提高性能或降底复杂度 Table pools (pools) and table clusters (clusters) are special table types in th

  • 生产环境中有很多场景,是需要在指定的 OSD 设备上创建 Ceph Pool,或者说需要把pool限制在指定的OSD上。因为Ceph集群中允许使用混合类型的磁盘,比如一部分磁盘是SSD,一部分是HDD。如果针对某些业务需要高速磁盘SSD,而某些业务 HDD 就可以满足部署,在创建资源池 Pool 的时候可以指定它创建在某些OSD 设备上。或者为了不影响性能,通常一套ceph集群中需要RBD块存储和

  • #include "ort_prive.h" #include <stdlib.h> #include <stdio.h> ort_task_node_t* ort_task_alloc(void* (*func)(void *), void *arg) { if(arg != NULL)//任务函数参数非空,那么就返回此参数所在的任务节点 return *((ort_task_no

  • 使用对象池原因 在应用程序中,我们通常会频繁的使用一些对象,比如:StringBuilder,SpareArray,HashMap等。这些对象只在方法内使用,也是一些小对象。它们临时创建,及时销毁,生命周期非常短暂,可以说朝生夕死。但当使用这些对象的地方很多,频繁的创建和销毁对象,对应的是虚拟机频繁的分配对象内存和回收对象内存,这会成为一件消耗性能的事。 对象池Pools 在Android 中,提

  •  TYPE POOLS 的用法...     TYPE-POOLS: 方法1: 在ABAP Dictionary (T-Code: SE11 ) -> Type Group -> Display / Change / Create   方法2: 在ABAP Program : 用 TYPE-POOLS: NAME ,在程序中 双击 NAME ,如果有则display, 没有则Create 它。 T

 相关资料
  • Pool Design/Theory The nodejs-pool is built around a small series of core daemons that share access to a single LMDB table for tracking of shares, with MySQL being used to centralize configurations an

  • 7.1n-step TD Prediction The methods that usen-step backups are still TD methodsbecause theystill change an earlier estimate based on how it differs from a later estimate. n-step return:If t+n≥T(if the

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • 描述 (Description) 它通过将data-multi-expand为true,一次打开多个手风琴窗格。 例子 (Example) 以下示例演示了在基础中使用multi-expand accordion - <!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-co

  • Multi-OTP 是一个PHP类,用来进行基于 OTP 一次性密码的用户 token 的强认证和管理。可创建、更新、删除 token,用户数据存储在单个文件中。可使用多种算法进行用户检查,包括 Mobile OTP (MOTP), OATH/HOTP (RFC 4226), and OATH/TOTP HOTP Time Based (RFC 4226 extension). 兼容 (iPhon