Post
Topic
Board Pools
Re: [3500 TH] p2pool: Decentralized, DoS-resistant, Hop-Proof pool
by
mahrens917
on 03/02/2015, 03:17:18 UTC
Well when recoding p2pool, It would be Nice to solve the "payload too long" issue as well.

Does somebody know how to deal with this?  Huh  

Please check this post: https://bitcointalk.org/index.php?topic=18313.msg10164796#msg10164796

 Roll Eyes

So doing some digging, the "payload too long" error comes about when a packet's length is greater than max_payload_length.  This can be seen in p2pool/util/p2protocol.py.

This is called from p2pool/bitcoin/p2p.py and p2pool/p2p.py where it sets max_payload_length to 1,000,000.

I am going to change the code to print out the packet size, as well as, change the max_payload_length to twice the size.  I will let the code run for awhile and see what happens and report back.


If I'm correct the 'maxblocksize' is hardcoded to 1MB into the Bitcoin protocol. So I guess changing the payload length does do the trick within P2Pool code (until the blocksize will be increased). Well it is still unclear to me what part of the code you have changed. Logically it had to do with Bitcoin Core which is responsible for "packaging" the block and verify the hash of it. It would be awesome if you still could update us with news. I've also updated my Bitcoin Core and I'm waiting for a long blocktime with lots of transactions to debug my new setup. So, I'll keep you guys posted! Thanks!



Yes, the block should not be coming into p2pool over 1,000,000 or perhaps it is sometimes coming in with a size of 1,024,000 (another meaning of MB).  Or perhaps p2pool or bitcoind is somehow corrupting it at certain times which is causing this issue.  We'll see and my logging should let us know a little better what is happening.


I am running two p2pool servers.  One crashed and one didn't (they usually crash at roughly the same time over this payload issue).  One node however had increased max_payload_length. 

In the logs it states:

Quote
p2pool.log:2015-01-24 13:55:07.867204 PAYLOAD sharereply 1088513
p2pool.log:2015-01-24 13:55:27.520303 PAYLOAD sharereply 1080454

The number represents the size of the payload which is over 1,000,000 and would of crashed my node.  So by changing maxpayload in the p2p.py files I resolved this issue (for now).

The lines I changed are in p2p.py
Quote
        p2protocol.Protocol.__init__(self, node.net.PREFIX, 2000000, node.traffic_happened)
and bitcoin/p2p.py
Quote
        p2protocol.Protocol.__init__(self, net.P2P_PREFIX, 2000000, ignore_trailing_payload=True)