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

Upgrade to Python3 #25

Open
wants to merge 34 commits into
base: 1mb_segwit
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e8bb4fb
Update the seed nodes.
Sep 14, 2018
84d704e
Bech32 + P2SH Mining Address support
spencerr Jun 9, 2018
cefeabd
Update litecoin_testnet for v0.16.
Sep 20, 2018
476dc51
Update the Share upgrade warning message and README for mining to P2SH
Sep 20, 2018
d2060c7
Added cashaddr support.
Oct 3, 2018
b3dced4
Changed the shares to use the address instead of the pubkey hash since
Oct 4, 2018
176161d
Fix P2SH segwit addresses.
Oct 9, 2018
247bff3
Update unittest for fixed segwit script2.
Oct 9, 2018
c85d0cf
Fix the dest calculation.
Oct 10, 2018
875ea66
Update block explorer for bitcoincash testnet.
Oct 10, 2018
27f4727
Fixed bugs in the cashaddress code. All cashaddress types are now
Oct 13, 2018
a3ecde9
Enable the DONATION_SCRIPT to be a multisig script.
Nov 17, 2018
8665276
Update the seed nodes.
Sep 14, 2018
38f4224
Bech32 + P2SH Mining Address support
spencerr Jun 9, 2018
b98fa34
Update litecoin_testnet for v0.16.
Sep 20, 2018
e2e5d69
Update the Share upgrade warning message and README for mining to P2SH
Sep 20, 2018
b00b07c
Added cashaddr support.
Oct 3, 2018
ae2a2f6
Changed the shares to use the address instead of the pubkey hash since
Oct 4, 2018
5a51aa6
Fix P2SH segwit addresses.
Oct 9, 2018
8212ef8
Update unittest for fixed segwit script2.
Oct 9, 2018
2bc60ef
Fix the dest calculation.
Oct 10, 2018
331df87
Update block explorer for bitcoincash testnet.
Oct 10, 2018
1c48060
Fixed bugs in the cashaddress code. All cashaddress types are now
Oct 13, 2018
f2905d9
Enable the DONATION_SCRIPT to be a multisig script.
Nov 17, 2018
d484515
Merge branch 'p2pool-fixes' of github.com:rldleblanc/p2pool into p2po…
Dec 28, 2018
ca654dc
More address fixes around the web interface.
Dec 28, 2018
1bcbc44
Prelimary changes to remove TXs from the share chain.
Dec 28, 2018
d9a32fd
Fix share version check in block submission.
Dec 28, 2018
e8ec9b0
A few transaction fixes.
Dec 29, 2018
fdf5852
Clear out the TX cache when a new block has been found.
Jan 5, 2019
878b2f1
Optimized calculate_merkle_link and achived an ~90% reduction in
Jan 11, 2019
82e02f5
Migrated to Python3. Works with pypy3.
Jan 16, 2019
94e6457
Cleaned up the build process. Removed the old stuff that wasn't working
Feb 20, 2019
e6dd0da
Fixed bug where installing systemwide and run as a regular user could
Apr 20, 2019
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
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
*.pyc
*.pyo
*~
.*.swp
*.so

/data/
/litecoin_scrypt/build/
/_trial_temp*
Makefile.local
.cache/
.pkglist
.pyenv/
.coverage
build/
ltc_scrypt.so
MANIFEST
VERSION
dist/
tags
*.egg-info
File renamed without changes.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include README.md
include VERSION
include p2pool/pow/*
include web-static/*
119 changes: 0 additions & 119 deletions Makefile

This file was deleted.

64 changes: 33 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,24 @@ Copy and paste the following commands into a bash shell in order to install p2po
>sudo apt-get 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

>git checkout 1mb_segwit


Download dependencies, build required modules and install P2Pool. You can
install it system wide, in your home directory or in a virtualenv.

>(python3|pypy3|/path/to/virtualenv/bin/python3|pypy3) setup.py install [--user]


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

> run_p2pool.py

or

>pypy run_p2pool.py

Expand Down Expand Up @@ -100,10 +80,19 @@ P2pool communicates with miners via the stratum protocol. For BTC, configure you
>Password: x


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


The mining address must be a regular P2PKH address. Segwit, multisig, and bech32 addresses are not supported. That means an address starting with a 1 for Bitcoin or Bitcoin Cash or an L for Litecoin. If you use an address that p2pool cannot understand, then p2pool will mine to that node's default address instead.
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...` |
|Litecoin |`L...` |`M...` |`ltc1...` |
* Bitcoin Cash 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.
Expand All @@ -113,3 +102,16 @@ If you wish to modify the mining difficulty, you may add something like "address


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).

**Credits**

Original P2Pool written by:
* Forrest Voight <[email protected]>

Contributions by:
* Jonathan Toomim <[email protected]>
* Robert LeBlanc <[email protected]>

Maintained by:
* Jonathan Toomim <[email protected]>
* Robert LeBlanc <[email protected]>
Loading