Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2pool hardfork to 35 protocol #50

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 0 additions & 112 deletions README

This file was deleted.

151 changes: 65 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,112 +1,91 @@
Requirements:
-------------------------
Generic:
* Bitcoin >=0.11.1
* Python >=2.6
* Twisted >=10.0.0

Linux:
* sudo apt-get install python-rrdtool python-pygame python-scipy python-twisted python-twisted-web python-pil

Windows:
* Install Python 2.7: http://www.python.org/getit/
* Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads
* Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0
* Install python win32 api: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
* Install python win32 api wmi wrapper: https://pypi.python.org/pypi/WMI/#downloads
* Unzip the files into C:\Python27\Lib\site-packages
**P2pool installation with pypy -- Windows**

Running P2Pool:
-------------------------
To use P2Pool, you must be running your own local bitcoind. For standard
configurations, using P2Pool should be as simple as:

cd lyra2re-hash-python
git submodule init
git submodule update
sudo python setup.py install
cd ../
python run_p2pool.py --net vertcoin
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:

Then run your miner program, connecting to 127.0.0.1 on port 9171 with any
username and password.

If you are behind a NAT, you should enable TCP port forwarding on your
router. Forward port 9346 to the host running P2Pool.
https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

Run for additional options.

python run_p2pool.py --help
Once you've done that, run bash and follow the rest of the steps below.

Donations towards further development:
-------------------------
1HNeqi3pJRNvXybNX4FKzZgYJsdTSqJTbk

Official wiki:
-------------------------
https://en.bitcoin.it/wiki/P2Pool
**P2pool installation with pypy -- Linux and Windows**

Alternate web frontend:
-------------------------
* https://github.com/hardcpp/P2PoolExtendedFrontEnd

Notes for Litecoin:
=========================
Requirements:
-------------------------
In order to run P2Pool with the Litecoin network, you would need to build and install the
ltc_scrypt module that includes the scrypt proof of work code that Litecoin uses for hashes.
Copy and paste the following commands into a bash shell in order to install p2pool on Windows or Linux.

Linux:
>sudo apt-get update

cd litecoin_scrypt
sudo python setup.py install
>sudo apt-get install pypy pypy-dev pypy-setuptools gcc build-essential git

Windows (mingw):
* Install MinGW: http://www.mingw.org/wiki/Getting_Started
* Install Python 2.7: http://www.python.org/getit/

In bash type this:
>wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo pypy
>sudo rm setuptools-*.zip

cd litecoin_scrypt
C:\Python27\python.exe setup.py build --compile=mingw32 install

Windows (Microsoft Visual C++)
* Open visual studio console
>wget https://files.pythonhosted.org/packages/84/21/80cdc749908ebf2719a9063eddcc02b668fbc62d200c1f1a4d92aaaba76b/zope.interface-5.2.0.tar.gz
tar zxf zope.interface-5.2.0.tar.gz

In bash type this:
>cd zope.interface-5.2.0/

SET VS90COMNTOOLS=%VS110COMNTOOLS% # For visual c++ 2012
SET VS90COMNTOOLS=%VS100COMNTOOLS% # For visual c++ 2010
cd litecoin_scrypt
C:\Python27\python.exe setup.py build --compile=mingw32 install

If you run into an error with unrecognized command line option '-mno-cygwin', see this:
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o
>sudo pypy setup.py install

Running P2Pool:
-------------------------
Run P2Pool with the "--net litecoin" option.
Run your miner program, connecting to 127.0.0.1 on port 9327.
Forward port 9338 to the host running P2Pool.
>cd ..

Litecoin's use of ports 9333 and 9332 conflicts with P2Pool running on
the Bitcoin network. To avoid problems, add these lines to litecoin.conf
and restart litecoind:
>sudo rm -r zope.interface-5.2.0*

rpcport=10332
port=10333

Sponsors:
-------------------------
>wget https://files.pythonhosted.org/packages/4a/b4/4973c7ccb5be2ec0abc779b7d5f9d5f24b17b0349e23240cfc9dc3bd83cc/Twisted-20.3.0.tar.bz2

Thanks to:
* The Bitcoin Foundation for its generous support of P2Pool
* The Litecoin Project for its generous donations to P2Pool

License:
-------------------------
>tar jxf Twisted-20.3.0.tar.bz2

[Available here](COPYING)
>cd Twisted-20.3.0

>sudo pypy setup.py install

>cd ..

>sudo rm -r Twisted-20.3.0*


>git clone https://github.com/vertcoin-project/p2pool-vtc


You'll also need to install and run your vertcoind, and edit ~/.vertcoin/vertcoin.conf with your vertcoind's RPC username and password. Launch your vertcoind, and after it has finished downloading blocks and syncing, go to your p2pool directory and run


>pypy run_p2pool.py


**Miner setup**


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


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

>Worker: (Your bitcoin address)

>Password: x


For Litecoin, replace 9332 with 9327. For Bitcoin Cash, use 9348.


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 |
|---------------|-------|-------|-------------------------------|
|Vertcoin |`V...` |`3...` |`vtc...` |


If you wish to modify the mining difficulty, you may add something like "address+1" after your mining address to set the pseudoshare difficulty to 1, or "address/10" to set the actual share difficulty to 10 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 Vertcoin, those ports are 9346 (p2p) and 9171 (stratum/web).
Loading