GithubHelp home page GithubHelp logo

litch / p2pool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jtoomim/p2pool

0.0 0.0 0.0 3.11 MB

Peer-to-peer Bitcoin mining pool

Home Page: https://github.com/jtoomim/p2pool/

License: GNU General Public License v3.0

Shell 0.07% Python 94.77% C 1.41% Makefile 0.25% HTML 3.40% Dockerfile 0.10%

p2pool's Introduction

P2pool installation with pypy -- Windows

On Windows, pypy is only supported via the Windows Subsystem for Linux (WSL). P2pool on pypy on WSL is much faster than P2pool on CPython on native Windows. To install WSL, first follow the steps outlined here:

https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

Once you've done that, run bash and follow the rest of the steps below.

P2pool installation with pypy -- Linux and Windows

Copy and paste the following commands into a bash shell in order to install p2pool on Windows or Linux.

sudo apt-get update

sudo apt-get -y install pypy pypy-dev pypy-setuptools gcc build-essential git

wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo pypy sudo rm setuptools-*.zip

wget https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.3.tar.gz#md5=9ae3d24c0c7415deb249dd1a132f0f79

tar zxf zope.interface-4.1.3.tar.gz

cd zope.interface-4.1.3/

sudo pypy setup.py install

cd ..

sudo rm -r zope.interface-4.1.3*

wget https://pypi.python.org/packages/source/T/Twisted/Twisted-15.4.0.tar.bz2

tar jxf Twisted-15.4.0.tar.bz2

cd Twisted-15.4.0

sudo pypy setup.py install

cd ..

sudo rm -r Twisted-15.4.0*

git clone https://github.com/jtoomim/p2pool.git

cd p2pool

You'll also need to install and run your bitcoind or altcoind of choice, and edit ~/.bitcoin/bitcoin.conf (or the corresponding file for litecoin or whatever other coin you intend to mine) with your bitcoind's RPC username and password. Launch your bitcoind or altcoind, and after it has finished downloading blocks and syncing, go to your p2pool directory and run

pypy run_p2pool.py

**P2pool Dockerfile

The Dockerfile uses the build instruction above to create a Docker image.

Build Docker image named p2pool

docker build -t p2pool ./

Run p2pool from Docker image

docker run -it --rm p2pool --version

jtoomimnet vs mainnet

If you wish to use the original forrestv btc mainnet instead of jtoomimnet, then replace

git clone https://github.com/jtoomim/p2pool.git

cd p2pool

above with

git clone https://github.com/p2pool/p2pool.git

cd p2pool

Note: The BTC p2pools currently have low hashrate, which means that payouts will be infrequent, large, and unpredictable. As of Feb 2018, blocks are found on jtoomimnet on average once every 25 days, and blocks are found on mainnet on average once every 108 days. Do not mine on BTC p2pool unless you are very patient and can tolerate receiving no revenue for several months.

Miner setup

P2pool communicates with miners via the stratum protocol. For BTC, configure your miners with the following information:

URL: stratum+tcp://(Your node's IP address or hostname):9332

Worker: (Your bitcoin address)

Password: x

Mining to Legacy (P2PKH), SegWit/MultiSig (P2SH) and Bech32 addresses are supported for the following coins with the specified address prefixes:

Coin P2PKH P2SH Bech32
Bitcoin 1... 3... bc1...
Bitcoin Cash* 1... (test) bitcoincash:q... or q...
Bitcoin SV* 1... (test) bitcoincash:q... or q...
Litecoin L... M... ltc1...
  • Bitcoin Cash and Bitcoin SV uses cashaddr instead of Bech32

Only Legacy addresses (P2PKH) are supported for coins not mentioned above. If you use an address that p2pool cannot understand, then p2pool will mine to that node's default address instead.

If you wish to modify the mining difficulty, you may add something like "address+4096" after your mining address to set the pseudoshare difficulty to 4096, or "address/65536" to set the actual share difficulty to 65536 or the p2pool minimum share difficulty, whichever is higher. Pseudoshares only affect hashrate statistics, whereas actual shares affect revenue variance and efficiency.

Firewall considerations

If your node is behind a firewall or behind NAT (i.e. on a private IP address), you may want to forward ports to your p2pool server. P2pool uses two ports: one for p2p communication with the p2pool network, and another for both the web UI and for stratum communication with workers. For Bitcoin, those ports are 9333 (p2p) and 9332 (stratum/web). For Litecoin, they are 9326 (p2p) and 9327 (stratum/web). For Bitcoin Cash, they are 9349 (p2p) and 9348 (stratum/web).

p2pool's People

Contributors

forrestv avatar jtoomim avatar coblee avatar rav3npl avatar veqtrus avatar drazisil avatar kr1z1s avatar goblin avatar d0gzpaw avatar northern-lites avatar imaginaryusername avatar farsider350 avatar midnightmagic avatar maaku avatar grimd34th avatar iongchun avatar thrasher- avatar m0glie avatar spencerr avatar harukama avatar kevinxucs avatar krellan avatar roy7 avatar gmaxwell avatar gades avatar dmp1ce avatar cohibaa avatar squidicuzz avatar tadasvaranavicius avatar tierradelfuego 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.