Author

Topic: p2pool终极宝典 —胡乱优化篇 (Read 1189 times)

jr. member
Activity: 59
Merit: 10
May 19, 2014, 07:40:25 AM
#5
现在挖矿都是赔钱货了,不过X11的还行,收益好像挺高的
hero member
Activity: 490
Merit: 500
May 19, 2014, 07:31:55 AM
#4
这个应该转到挖矿子板去吧
newbie
Activity: 38
Merit: 0
May 19, 2014, 05:35:00 AM
#3
现在不流行挖矿了
newbie
Activity: 21
Merit: 0
February 27, 2014, 07:20:08 AM
#2
标题党!!!
newbie
Activity: 2
Merit: 0
February 27, 2014, 05:55:00 AM
#1
p2pool终极宝典
—胡乱优化篇

p2pool—最好的矿池(没有之一)

彪悍的帖子 不需要回复可见

苦逼的矿工 不要求大家贡献

注 大家最好自己架设矿池!如果手边没有闲置电脑,或懒得维护,可以到我的矿池挖矿!

我的矿池

      BTC(比特币矿池)

              地址         www.openmine.linkpc.net:9332

              用户名     你的钱包地址

              密码         自己写

      LITECOIN(莱特币矿池)

               地址         www.openmine.linkpc.net:9327

               用户名     你的钱包地址

               密码         自己写

qq交流群258910734

此文原则

1不仅讲然,而且讲所以然,以求触类旁通。

2尽量不用专业术语,以通俗易懂为原则。

此文权限

1此文挂到GPL下 (GPL第几版,随便),受益于Linux多年,也算为开源做点贡献。

2 随便转载,球才要版权。

此文是疯狂架设篇的续篇,先看疯狂架设篇!

优化主要分三块

Linux系统的优化

bitcoin网络的优化

p2pool网络的优化

Linux系统的优化(主要是安全方面)

1不要开放不必要的端口

2不要提供不必要的服务

3不要启动不必要的软件

4软件不要用源码编译安装

5专机专用

参考

http://www.debian.org/doc/manuals/securing-debian-howto/index.en.html

bitcoin的优化(主要是指命令行参数)

有两个方法设置命令行参数

1 命令行使用,参数之间用空格分开!

2 $HOME/.bitcoin/bitcoin.conf(除了-datadir和-conf)。一个参数一行!

如果同时在命令行和配置文件指定了同样的选项,则优先使用命令行的。

Options:

 -?                     This help message
 -conf=           Specify configuration file (default: bitcoin.conf)
 -pid=            Specify pid file (default: bitcoind.pid)
 -gen                   Generate coins (default: 0)
 -datadir=         Specify data directory
 -dbcache=           Set database cache size in megabytes (default: 25)
 -timeout=           Specify connection timeout in milliseconds (default: 5000)
 -proxy=       Connect through socks proxy
 -socks=             Select the version of socks proxy to use (4-5, default: 5)
 -tor=         Use proxy to reach tor hidden services (default: same as -proxy)
 -dns                   Allow DNS lookups for -addnode, -seednode and -connect
 -port=           Listen for connections on (default: 8333 or testnet: 18333)
 -maxconnections=    Maintain at most connections to peers (default: 125)
 -addnode=          Add a node to connect to and attempt to keep the connection open
 -connect=          Connect only to the specified node(s)
 -seednode=         Connect to a node to retrieve peer addresses, and disconnect
 -externalip=       Specify your own public address
 -onlynet=         Only connect to nodes in network (IPv4, IPv6 or Tor)
 -discover              Discover own IP address (default: 1 when listening and no -externalip)
 -checkpoints           Only accept block chain matching built-in checkpoints (default: 1)
 -listen                Accept connections from outside (default: 1 if no -proxy or -connect)
 -bind=           Bind to given address and always listen on it. Use [host]:port notation for IPv6
 -dnsseed               Find peers using DNS lookup (default: 1 unless -connect)
 -banscore=          Threshold for disconnecting misbehaving peers (default: 100)
 -bantime=           Number of seconds to keep misbehaving peers from reconnecting (default: 86400)
 -maxreceivebuffer=  Maximum per-connection receive buffer, *1000 bytes (default: 5000)
 -maxsendbuffer=     Maximum per-connection send buffer, *1000 bytes (default: 1000)
 -upnp                  Use UPnP to map the listening port (default: 1 when listening)
 -paytxfee=        Fee per KB to add to transactions you send
 -server                Accept command line and JSON-RPC commands
 -testnet               Use the test network
 -debug                 Output extra debugging information. Implies all other -debug* options
 -debugnet              Output extra network debugging information
 -logtimestamps         Prepend debug output with timestamp
 -shrinkdebugfile       Shrink debug.log file on client startup (default: 1 when no -debug)
 -printtoconsole        Send trace/debug info to console instead of debug.log file
 -printtodebugger       Send trace/debug info to debugger
 -rpcuser=        Username for JSON-RPC connections
 -rpcpassword=      Password for JSON-RPC connections
 -rpcport=        Listen for JSON-RPC connections on (default: 8332 or testnet: 18332)
 -rpcallowip=       Allow JSON-RPC connections from specified IP address
 -rpcthreads=        Set the number of threads to service RPC calls (default: 4)
 -blocknotify=     Execute command when the best block changes (%s in cmd is replaced by block hash)
 -walletnotify=    Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
 -alertnotify=     Execute command when a relevant alert is received (%s in cmd is replaced by message)
 -upgradewallet         Upgrade wallet to latest format
 -keypool=           Set key pool size to (default: 100)
 -rescan                Rescan the block chain for missing wallet transactions
 -salvagewallet         Attempt to recover private keys from a corrupt wallet.dat
 -checkblocks=       How many blocks to check at startup (default: 288, 0 = all)
 -checklevel=        How thorough the block verification is (0-4, default: 3)
 -txindex               Maintain a full transaction index (default: 0)
 -loadblock=      Imports blocks from external blk000??.dat file
 -reindex               Rebuild block chain index from current blk000??.dat files
 -par=               Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)

Block creation options:

 -blockminsize=      Set minimum block size in bytes (default: 0)
 -blockmaxsize=      Set maximum block size in bytes (default: 250000)
 -blockprioritysize= Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)
 -mintxfee=        Minimum  fee-per-kilobyte to qualify as fee-paying (default: 0.0001)

SSL options: (see the Bitcoin Wiki for SSL setup instructions)

 -rpcssl                                  Use OpenSSL (https) for JSON-RPC connections
 -rpcsslcertificatechainfile=  Server certificate file (default: server.cert)
 -rpcsslprivatekeyfile=         Server private key (default: server.pem)
 -rpcsslciphers=                 Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)

UI options:

 -lang=           Set language, for example "de_DE" (default: system locale)
 -min                   Start minimized
 -splash                Show splash screen on startup (default: 1)

Many of the boolean options can also be set to off by specifying them with a "no" prefix: e.g. -nodnseed.

p2pool的优化(主要指命令行参数)

只可以在命令行使用,参数之间用空格分开!

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --net {bitcoin,litecoin}
                        use specified network (default: bitcoin)
  --testnet             use the network's testnet
  --debug               enable debugging mode
  -a ADDRESS, --address ADDRESS
                        generate payouts to this address (default:                         requested from bitcoind>)
  --datadir DATADIR     store data in this directory (default:                         run_p2pool.py is in>/data)
  --logfile LOGFILE     log to this file (default: data//log)
  --merged MERGED_URLS  call getauxblock on this url to get work for merged
                        mining (example:
                        http://ncuser:[email protected]:10332/)
  --give-author DONATION_PERCENTAGE
                        donate this percentage of work towards the development
                        of p2pool (default: 0.5)
  --iocp                use Windows IOCP API in order to avoid errors due to
                        large number of sockets being open
  --irc-announce        announce any blocks found on
                        irc://irc.freenode.net/#p2pool
  --no-bugreport        disable submitting caught exceptions to the author
  --disable-upnp        don't attempt to use UPnP to forward p2pool's P2P port
                        from the Internet to this computer

p2pool interface:
  --p2pool-port PORT    use port PORT to listen for connections (forward this
                        port from your router!) (default: bitcoin:9333,
                        litecoin:9338)
  -n ADDR[:PORT], --p2pool-node ADDR[:PORT]
                        connect to existing p2pool node at ADDR listening on
                        port PORT (defaults to default p2pool P2P port) in
                        addition to builtin addresses
  --max-conns CONNS     maximum incoming connections (default: 40)

worker interface:
  -w PORT or ADDR:PORT, --worker-port PORT or ADDR:PORT
                        listen on PORT on interface with ADDR for RPC
                        connections from miners (default: all interfaces,
                        bitcoin:9332, litecoin:9327)
  -f FEE_PERCENTAGE, --fee FEE_PERCENTAGE
                        charge workers mining to their own bitcoin address (by
                        setting their miner's username to a bitcoin address)
                        this percentage fee to mine on your p2pool instance.
                        Amount displayed at http://127.0.0.1:WORKER_PORT/fee
                        (default: 0)

bitcoind interface:
  --bitcoind-address BITCOIND_ADDRESS
                        connect to this address (default: 127.0.0.1)
  --bitcoind-rpc-port BITCOIND_RPC_PORT
                        connect to JSON-RPC interface at this port (default:
                        bitcoin:8332, litecoin:9332                         password not provided>)
  --bitcoind-p2p-port BITCOIND_P2P_PORT
                        connect to P2P interface at this port (default:
                        bitcoin:8333, litecoin:9333                         password not provided>)
  BITCOIND_RPCUSERPASS  bitcoind RPC interface username, then password, space-
                        separated (only one being provided will cause the
                        username to default to being empty, and none will
                        cause P2Pool to read them from bitcoin.conf)

Jump to: