jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Feb 17, 2018 7:08 am

P2pool is software that allows for trustless pooled mining with no central pool servers or privileged admins. P2pool achieves this by using a blockchain to keep track of user share submissions -- a sort of blockchain-within-a-blockchain design. Miners try to mine blocks which pay existing users of p2pool. If they mine a near-miss (a "share"), they publish that share to other p2pool users, who then include that share in their payout calculations. Thus, each p2pool user gets paid each time an actual block is mined in proportion to how many near-miss blocks they mined within the last few days.

P2pool was developed by forrestv in https://github.com/p2pool/p2pool, and is currently being maintained by me (jtoomim) in https://github.com/jtoomim/p2pool. Active development is occurring in the 1mb_segwit branch.

P2pool can be used for many cryptocurrencies. Currently, there are large p2pool communities around BTC, BCH, LTC, and DASH. Two separate mining networks exist around BTC at the moment -- mainnet (p2pool/p2pool) and jtoomimnet (jtoomim/p2ool 1mb_segwit), with jtoomimnet having about 80% of the total hashrate. The BCH pool is currently in beta, but appears to be working right now, and has mined 6 blocks as of 2018-03-28. However, there were a couple bugs a few months ago that caused hashrate losses. While those bugs appear to have been fixed, miners should keep in mind that the successful track record for BCH is short.

The p2pool community is currently being subjected to excessive moderation in its previous home, https://bitcointalk.org/index.php?topic ... sg30452324. Specifically, the other board's moderators wish to separate any discussion of Bitcoin (BTC) p2pools from non-Bitcoin p2pools. This does not make sense, as the same p2pool codebase is used for all cryptocurrencies. This thread is intended to serve as a new home for the discussion without that separation.

P2pool is written in Python2, and can be run either using regular CPython or pypy. Use of pypy is strongly recommended, as P2pool is CPU-intensive (especially on BTC and BCH) and pypy is much faster than CPython. Installation instructions for pypy on Windows and Linux can be found in the following post.
Last edited by jtoomim on Wed Mar 28, 2018 1:21 pm, edited 3 times in total.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Feb 17, 2018 7:18 am

P2pool setup overview

P2pool is a pool server designed for local use within a single mining farm, but which will communicate with other people's mining farms in order to distribute mining risk and reduce reward variance. You will need a server or VPS on which to run the p2pool software in addition to any mining hardware you have. It is recommended to run your own p2pool server ("node") if you can, but if that is not an option for you, you may also use a public p2pool node. Your income will be somewhat higher if you set up a high-performance node on your LAN than if you use a public node, especially for the BTC and LTC networks. Performance is largely determined by single-threaded CPU speed, but network connectivity is also important.

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 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
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
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
git checkout 1mb_segwit
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

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

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.

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


Fees, default mining addresses, and other considerations

Zero-fee mining is possible and easy with P2pool, but it is not the default configuration.

By default, p2pool will include a 0.5% fee to forrestv, the inactive original developer of p2pool. If you wish, you may modify this percentage with the --give-author # command-line option.

You can set a default mining address for your node with the --address command-line option. This is useful if you want to give each miner on your LAN a separate worker name, but still all use the same address for your income. Setting a mining address is also a good idea for public nodes in case someone enters in an invalid address or worker name, as it prevents that revenue from being lost.

Public node operators can also set a fee for their node with the --fee option. When set, this percent of all revenue will go to the node's default mining address. If you are mining on someone else's public node, make sure to check that their fees are reasonable before you start mining there!

Transaction fees from mining are always distributed fairly among all miners.

P2pool also supports merged mining, but all merged mining revenue goes straight to the pool operator. It is not shared with the miners.

P2pool with currencies other than BTC

To mine Bitcoin Cash, install and run a Bitcoin Cash-supporting bitcoind (e.g. Bitcoin ABC, Bitcoin Unlimited, or Bitcoin XT) and then launch p2pool with "pypy run_p2pool.py --net bitcoincash".

To mine Litecoin, install and run litecoind and then launch p2pool with "pypy run_p2pool.py --net litecoin". Note that the default ports for litecoind's RPC and p2p interfaces conflict with Bitcoin p2pool's ports (9332 and 9333). It is recommended to move litecoin's p2p and RPC ports by adding the following to litecoin.conf:

rpcport=10332
port=10333

To mine DASH, you will need to use this p2pool fork: https://github.com/dashpay/p2pool-dash

If your currency uses a hash function other than SHA256 (e.g. Litecoin's scrypt or Dash's X11), you will also need to compile support for the hash function. See https://github.com/jtoomim/p2pool/ (towards the bottom) for details.

P2pool can be used for many other cryptocurrencies than the ones listed here, but the process for setting up p2pool is not streamlined for these currencies. You may need to edit the source to add configuration files in p2pool/bitcoin/networks/(mycurrency).py and p2pool/networks/(mycurrency).py.

To solo mine with p2pool or to start a new network for a new currency, set PERSIST = True in p2pool/networks/(mycurrency).py

Last updated 2018-02-17
Last edited by jtoomim on Sat Jun 02, 2018 10:17 pm, edited 1 time in total.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Feb 17, 2018 8:31 am

Information detailing the differences between jtoomimnet and mainnet will go into this post.

bitlock
Posts: 5
Joined: Sat Feb 17, 2018 7:03 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Feb 17, 2018 8:11 pm

Thanks for creating this alternate forum topic.

What speed / type processor are you using for you p2pool BTC server - I may be upgrading mine computer soon. Swapping my AMD CPU helped but I am still only in the 80% efficiency range.

thanks!

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 18, 2018 4:28 am

I use an i7 4790k for most of my p2pool servers. I have one BTC p2pool on an i3 2120, and it works okay, but clearly not as well as the 4790k.

Core count doesn't matter, but IPC and GHz do. Pypy makes a bigger difference than a CPU upgrade, so make sure you're using pypy and not CPython.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 18, 2018 4:17 pm

I created a channel of p2pool news in Telegram Messenger https://t.me/p2pool_news
You can join it, jtoomim.
I publish news only in Russian there . There is no one to publish news in English.
You can download telegram for desktop from https://desktop.telegram.org/

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Mon Feb 19, 2018 6:55 am

It looks like there was a bug of some sort on the BCH p2pool, causing effective hashrates to fall by a factor of about 100x. In my logs, I saw a lot of errors like this one:

2018-02-18 16:44:28.121106 Worker 139rsyPJwpqkmix2zTHyF4PDE9oNJmWifk submitted share with hash > target:
2018-02-18 16:44:28.121124 Hash: afdfa3abaa9c26715df8d7f432debf9011219b81065b0ad550359279
2018-02-18 16:44:28.121132 Target: a7c9ea61c71f78000000000000000000000000000000000000000000

After restarting my node, the problem went away. Has anyone else seen a similar issue?

I noticed that a Litecoin p2pool node I had running on the same machine also manifested problems at the same time, but not as severe. The problems on the Litecoin node went away when I restarted my BCH node. This suggests that the BCH node was using enough resources (CPU or bandwidth) that it was preventing the Litecoin node from working properly. The rest of the Litecoin p2pool network appears to have continued to work fine, but the rest of the BCH p2pool seems to not be working fine.

I suspect this bug was an issue with the difficulty adjustment/assignment code which resulted in more shares being submitted to p2pool than p2pool could process, which in turn caused p2pool to not see all the hashrate it was getting, which then made p2pool lower its difficulty even further, etc. I will try to rewrite the pseudoshare difficulty setting code to suck less when I get a chance.

quinten
Posts: 2
Joined: Mon Feb 19, 2018 7:33 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Mon Feb 19, 2018 7:49 am

I've noticed some differences in Share Difficulty when connecting to P2Pool using CCMiner to mine Vertcoin.

In particular, it is noticeable when connecting to the low hashrate node. If the minimum share difficulty is around 75, my miner (and others but not all) will sit around 575. This is slightly variable (i think based on the global pool hashrate). There are usually two hashrates visible on most nodes, those at or around the minimum Share Difficulty and those that are a multiplier of the minimum.

I've tried to force a difficulty by using stratum+tcp://address/0 however this seems to be ignored or at least make no difference to the Share Difficulty of my miner.

The only key piece of information that I have discovered that may be relevant is the type of graphics card, in this case apparently this happens, increased difficulty, with NVidia cards.

The impact is the long lead time till initial predicted payout. This has impacts when dealing with unstable mining nodes and pools.

Questions:
1) Does this make sense and is it intended?

2) If not, then a hint on where to look in the code would be appreciated (I've never used Python but I've got plenty of dev experience - and I'm going to pick up Python anyway)

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Mon Feb 19, 2018 12:30 pm

Check p2pool/work.py. Search for "desired_share_target =". The line with the comment saying "limit to 1.67%" is what causes p2pool to mine shares higher than the p2pool minimum difficulty. I've never tried GPU mining with p2pool, so I can't help you with more than that.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Tue Feb 20, 2018 5:18 am

It looks like there was a bug of some sort on the BCH p2pool, causing effective hashrates to fall by a factor of about 100x. In my logs, I saw a lot of errors like this one:

2018-02-18 16:44:28.121106 Worker 139rsyPJwpqkmix2zTHyF4PDE9oNJmWifk submitted share with hash > target:
2018-02-18 16:44:28.121124 Hash: afdfa3abaa9c26715df8d7f432debf9011219b81065b0ad550359279
2018-02-18 16:44:28.121132 Target: a7c9ea61c71f78000000000000000000000000000000000000000000

After restarting my node, the problem went away. Has anyone else seen a similar issue?
Yes, this is on all SHA256 nodes. But I always thought it was a hash problem on a particular ASIC.
And on my knots they did not lead to a fall hashrate

I'm wondering why, for the same values of BLOCK_PERIOD on BTC and BCH
BLOCK_PERIOD = 600 # s
https://github.com/jtoomim/p2pool/blob/ ... oin.py#L22
https://github.com/jtoomim/p2pool/blob/ ... ash.py#L22

You made different values of SHARE_PERIOD on BTC and BCH
https://github.com/jtoomim/p2pool/blob/ ... oin.py#L10
https://github.com/jtoomim/p2pool/blob/ ... ash.py#L10

SHARE_PERIOD = 30 # seconds
SHARE_PERIOD = 60 # seconds -- one minute


jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Tue Feb 20, 2018 8:58 am

BCH block found (#518175):
https://blockchair.com/bitcoin-cash/blo ... de46907db9

Even though most of the other miners on BCH have not been active since the BCH bug (please restart your BCH nodes ASAP! You're losing revenue!), most of their shares have not yet been flushed from the share chain and so they still got paid.
I'm wondering why, for the same values of BLOCK_PERIOD on BTC and BCH
BLOCK_PERIOD = 600 # s
You made different values of SHARE_PERIOD on BTC and BCH
SHARE_PERIOD = 30 # seconds
SHARE_PERIOD = 60 # seconds -- one minute
The target block period is determined by Bitcoin and Bitcoin Cash. It's 10 minutes for Bitcoin (Cash) and 2.5 minutes for Litecoin. P2pool has no control over that.

The share period is determined by P2pool. P2pool can choose any share period it likes as long as all miners on that p2pool network agree. Forrestv set the share period for BTC. I set the share period for BCH. Low values result in less share variance (more shares being found) at the expense of greater CPU load and higher orphan/DOA rates. High values result in better fairness. I thought that fairness and CPU load were more important than share variance, so I set the share period higher for BCH. I almost set it to 120 seconds, but decided that 2x higher was maybe enough for now. I would like to increase the share period for BTC and LTC too, but that would involve another p2pool hard fork, and I haven't had time to organize and code that.
Please make a p2pool for LitecoinCash
https://github.com/litecoincash/Litecoi ... r/litecash
I don't think it's a good idea to spend development time on minor coins like Litecoin Cash while there are more serious issues outstanding, like the BCH bugs and the jtoomimnet/mainnet separation.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Tue Feb 20, 2018 4:23 pm

I have gotten fed up with the instability of the machine that was previously running our LTC and BCH nodes, so I've spun up nodes on a different machine:

ml.toom.im:9348 BCH
ml.toom.im:9327 LTC

These are open for public use, and hopefully should be much more stable than the woff.toom.im:93?? nodes have been.

quinten
Posts: 2
Joined: Mon Feb 19, 2018 7:33 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 12:04 am

Out of curiosity, what was making your the nodes unstable?

I've noticed that quite a few of the nodes I have been connected to have stability issues, which is what led me to setting up my own P2Pool node.

I'm not connecting to it at the moment as my hashrate is low and I wasn't sure how publicize it as a public node.

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 6:16 am

Glad the forum finally moved. I plan on doing an updated video soon on p2ool setup, specifically getting p2pool jtoomin 1mb_segwit running PYPY on LTC net. Jtoomim, what minimum memory requirement would you suggest for nodes running your fork with pypy? I thought I remember reading you say that PYPY uses a bit more memory, but uses less CPU. I've been recommending 8GB to most people that ask. But I think based off my system resource usage, 4GB might work? For smaller nodes? Just want to get the right info before I do the video.

So far, my LTC P2Pool node has been over 100% efficiency on average running Jtoomim 1mb_segwit fork since release. Currently at 102% with ~10GH local. Rock solid, all day. Rig is i7 3770 with 16gb memory on a business class pipeline. Just to give anyone an idea of what I run, if curious.
http://cyberdyne-mining.io:9327/static/ for those that like it raw
http://cyberdyne-mining.io:9327/static/UI/ visual appeal

Sawa, do you plan on releasing the p2pool LCC fork that you are currently running?

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 6:22 am

Out of curiosity, what was making your the nodes unstable?
Bad hardware.
I'm not connecting to it at the moment as my hashrate is low and I wasn't sure how publicize it as a public node.
The amount of hashrate on your node mostly doesn't matter. P2pool was designed so that even very small nodes (e.g. with one S9) can contribute effectively to the pool. While there are some fairness issues that crop up, they aren't significant until your node comprises > 20% of the pool, and they're much smaller on the BCH p2pool than on the BTC or LTC p2pools due to the slower share rate I chose for BCH.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 6:30 am

I'm getting close to fixing the BCH intermittent hashrate loss issue. I think I will probably have a fix within a day or two.

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 6:43 am

Jtoomim, what minimum memory requirement would you suggest for nodes running your fork with pypy? I thought I remember reading you say that PYPY uses a bit more memory, but uses less CPU. I've been recommending 8GB to most people that ask. But I think based off my system resource usage, 4GB might work?
Memory usage is dependent on the Litecoin transaction throughput, and is not dependent on the node's hashrate or user count. I think the highest I've seen my LTC node get to with pypy is about 2 GB. That means that 4 GB would probably be enough until LTC either gets popular or gets spammed, at which time a 4 GB pypy node would likely crash. 8 GB is much safer. Of course, a 4 GB node running CPython would probably also crash (or slow to a crawl) during a spam event due to CPU usage, so if you only have 4 GB, pypy is almost certainly a better choice. If you're building a new node, choosing 8 GB or more is a good idea. If you're using a VPS and will be paying close attention, you can probably get away with starting with 4 GB and upgrading to 6 GB or 8 GB if a spam event on LTC ever happens.

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Wed Feb 21, 2018 3:53 pm

I made LitecoinCash p2pool based on source code from jtoomim p2pool

LCC p2pool nodes:
http://crypto.mine.nu:5055
http://siberia.mine.nu:5055

LCC p2pool source code:
https://github.com/ilsawa/p2pool-lcc

LitecoinCash Home page https://litecoinca.sh/

KyrosKrane
Posts: 1
Joined: Thu Feb 22, 2018 12:06 am

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Feb 22, 2018 12:12 am

I'm running a BCH p2pool node, and I'm seeing the following error crop up occasionally. It happens several times in a row (with no intervening output), followed by a period with no errors.

Code: Select all

Unhandled Error Traceback (most recent call last): File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks self._runCallbacks() File "/usr/local/lib/pypy2.7/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks current.result = callback(current.result, *args, **kw) File "/home/USER/jtoomim-p2pool/p2pool/p2pool/util/deferral.py", line 256, in gotResult it(res2) File "/home/USER/jtoomim-p2pool/p2pool/p2pool/util/deferral.py", line 233, in it res = gen.send(cur) # external code is run here --- <exception caught here> --- File "/home/USER/jtoomim-p2pool/p2pool/p2pool/util/deferral.py", line 284, in _worker self.func(*self.args, **self.kwargs) File "/home/USER/jtoomim-p2pool/p2pool/p2pool/util/expiring_dict.py", line 109, in <lambda> self._expire_loop = expire_loop = deferral.RobustLoopingCall(lambda: self_ref().expire()) exceptions.AttributeError: 'NoneType' object has no attribute 'expire'

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Thu Feb 22, 2018 1:22 am

I have pushed a commit to 1mb_segwit that should fix the intermittent hashrate loss issue by undoing the commit that increased the pseudoshare frequency. I recommend that everyone on BCH do a git pull immediately.

The "'NoneType' object has no attribute 'expire'" error is nothing to be worried about. It does not indicate a loss of functionality. It's an old and minor bug from the forrestv days.

bitlock
Posts: 5
Joined: Sat Feb 17, 2018 7:03 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Feb 23, 2018 3:32 am

Just curious - is everyone mining on the same P2Pool Litecoin branch - shown here:
http://p2pool.jir.dk/litecoin/

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Feb 23, 2018 7:18 pm

Sawa, when running your dgb-scrypt fork, it seems whatever node has the most hash, has the most efficiency share wise and other nodes miners struggle. Example being the dgb-scrypt node that has 90% of the hash, has 2% bad shares submit, while mine and yours are around 52%. Have you noticed this?

Total: 250 (Orphan: 111, Dead: 16) = 52% BAD on crypto.office | Total: 3997 (Orphan: 58, Dead: 39) = 2.4% bad on http://dgb.miningrooms.com:5025/static/ | Doing a test on mine last night, I was around 50-60% bad submits myself.

**edit** i did a git pull as well

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Fri Feb 23, 2018 9:26 pm

Sawa, when running your dgb-scrypt fork, it seems whatever node has the most hash, has the most efficiency share wise and other nodes miners struggle. Example being the dgb-scrypt node that has 90% of the hash, has 2% bad shares submit, while mine and yours are around 52%. Have you noticed this?

Total: 250 (Orphan: 111, Dead: 16) = 52% BAD on crypto.office | Total: 3997 (Orphan: 58, Dead: 39) = 2.4% bad on http://dgb.miningrooms.com:5025/static/ | Doing a test on mine last night, I was around 50-60% bad submits myself.

**edit** i did a git pull as well
Yes, I noticed.
I increased the period of shares from 15 to 25 seconds, but this did not help much.
https://github.com/ilsawa/p2pool-dgb-sc ... byte.py#L4

sawa
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 20
Joined: Sat Feb 17, 2018 10:15 am

Donate BTC of your choice to 17Vq6qwfE1epzsgEfSw81pQX3gXo9ZN4ET

Contact: Telegram

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sat Feb 24, 2018 4:28 pm

It looks like there was a bug of some sort on the BCH p2pool, causing effective hashrates to fall by a factor of about 100x. In my logs, I saw a lot of errors like this one:

2018-02-18 16:44:28.121106 Worker 139rsyPJwpqkmix2zTHyF4PDE9oNJmWifk submitted share with hash > target:
2018-02-18 16:44:28.121124 Hash: afdfa3abaa9c26715df8d7f432debf9011219b81065b0ad550359279
2018-02-18 16:44:28.121132 Target: a7c9ea61c71f78000000000000000000000000000000000000000000

After restarting my node, the problem went away. Has anyone else seen a similar issue?

I noticed that a Litecoin p2pool node I had running on the same machine also manifested problems at the same time, but not as severe. The problems on the Litecoin node went away when I restarted my BCH node. This suggests that the BCH node was using enough resources (CPU or bandwidth) that it was preventing the Litecoin node from working properly. The rest of the Litecoin p2pool network appears to have continued to work fine, but the rest of the BCH p2pool seems to not be working fine.

I suspect this bug was an issue with the difficulty adjustment/assignment code which resulted in more shares being submitted to p2pool than p2pool could process, which in turn caused p2pool to not see all the hashrate it was getting, which then made p2pool lower its difficulty even further, etc. I will try to rewrite the pseudoshare difficulty setting code to suck less when I get a chance.
There is a similar problem on the LCC p2pool - the hashrate disappears simultaneously on different nodes.
http://crypto.mine.nu:5055
http://siberia.mine.nu:5055
http://37.29.116.122:5055
https://lcc.crabs.pro

And these messages:

2018-02-24 21:01:48.999419 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!
2018-02-24 21:01:49.062871 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!
2018-02-24 21:01:49.267250 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!
2018-02-24 21:01:49.326541 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!
2018-02-24 21:01:49.512888 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!
2018-02-24 21:01:49.902110 > Worker CRcciwXnnbfysDTBLHPyzG9PCEWuAqkb24 submitted share more than once!

I do not think that such messages cause failures in the hash rate
On the classical p2pool I also often observed them, especially if I rent a power from mrr or nicehash.

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 25, 2018 3:44 am

Jtoomim,
I recently noticed that one of my miners and at least one other user's wallet on p2pool LTC that went from around .01 predicted payout, to having no shares in the chain at all. My miner was on my node running your fork, and the other miner that reported this was on another node running your fork as well. Seems odd that all the shares just fell off so abruptly?

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 25, 2018 5:14 am

Someone is mining invalid blocks on LTC p2pool. It seeems they are calculating fees incorrectly for some reason. I guess I need to add fee checking code to p2pool. Not fun.

Code: Select all

bch@feather:~/ltcp2pool$ grep 137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 -C 5 ~/.litecoin/debug.log 2018-02-22 13:44:10 ERROR: ConnectBlock(): coinbase pays too much (actual=2511629881 vs limit=2511272981) 2018-02-22 13:44:10 InvalidChainFound: invalid block=137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 height=1373311 log2_work=70.057888 date=2018-02-22 13:43:58 2018-02-22 13:44:10 InvalidChainFound: current best=c30bc3be3604808e2456ee14dda6d2283b2954b0c2dc811f4395bb6a6a9cb1d8 height=1373310 log2_work=70.057863 date=2018-02-22 13:42:14 2018-02-22 13:44:10 ERROR: ConnectTip(): ConnectBlock 137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 failed 2018-02-22 13:44:10 InvalidChainFound: invalid block=137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 height=1373311 log2_work=70.057888 date=2018-02-22 13:43:58 2018-02-22 13:44:10 InvalidChainFound: current best=c30bc3be3604808e2456ee14dda6d2283b2954b0c2dc811f4395bb6a6a9cb1d8 height=1373310 log2_work=70.057863 date=2018-02-22 13:42:14 2018-02-22 13:44:11 ERROR: AcceptBlockHeader: block 137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 is marked invalid 2018-02-22 13:44:11 Peer 10 sent us invalid header via cmpctblock 2018-02-22 13:44:11 ERROR: AcceptBlockHeader: block 137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 is marked invalid 2018-02-22 13:44:11 Peer 14 sent us invalid header via cmpctblock 2018-02-22 13:44:14 ERROR: AcceptBlockHeader: block 137949cecc261593cc3e2423f84a31c71c10c7577e8c42023b45ccbd9fe22360 is marked invalid 2018-02-22 13:44:14 ERROR: ProcessNewBlock: AcceptBlock FAILED 2018-02-22 13:44:49 UpdateTip: new best=7f3817c6619ee41b4a6b329dd5f39eb758d4b881ad96115ff97d20a6e54f08df height=1373311 version=0x20000000 log2_work=70.057888 tx=21664794 date='2018-02-22 13:44:38' progress=1.000000 cache=45.6MiB(11831tx)
If you are LZzzELrQifCah5oafpNuCA6dLiyacVJNDa, please contact me. I want to know what code you're running and want to try to figure out how this error happened.

Edit: This appears to be a repeat offender. LZzzELrQifCah5oafpNuCA6dLiyacVJNDa has mined invalid blocks before.
https://bitcointalk.org/index.php?topic ... sg28865313
Last edited by jtoomim on Sun Feb 25, 2018 7:06 am, edited 1 time in total.

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 25, 2018 6:19 am

This has caused quite a bit of invalid blocks lately. Could we upgrade to reject all versions that != 1mb_segwit and call it a day? You have >50% of the pool hashrate usually and most of the active people will upgrade their nodes accordingly. Just a thought

jtoomim
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 124
Joined: Fri Nov 06, 2015 7:46 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 25, 2018 7:42 am

For every complex problem there is a solution that is at once clear, simple, and wrong. Nodes should be excluded based on their behavior, not their reported version number.

Kiefff
Nickel Bitcoiner
Nickel Bitcoiner
Posts: 18
Joined: Sun Feb 18, 2018 8:13 pm

Re: P2pool: Decentralized, DoS-resistant, trustless, censorship-resistant pool.

Sun Feb 25, 2018 7:03 pm

Could we just start another sharechain until code is added to punish the shares that miscalculate transaction fees? Jtoomimnet LTC p2pool? This wallet ID has caused many invalid blocks now that I think of it, and with the amount of invalid blocks that they have caused, it has scared away a decent amount of miners I know of.

Return to “Pools”

Who is online

Users browsing this forum: No registered users and 1 guest