My understanding so far is that you want to double the p2pool share size and increase mempool, fixing this will fix the issue you identified with p2pool producing blocks smaller then Bitcoins available mempool?
Right now p2pool shares can contain up to 50 kB of new transactions, plus an unlimited amount of previously-shared transactions. The way p2pool works is that it takes a block template from bitcoind, then iterates through the transaction list. It adds each transaction to the share one-by-one, noting whether that transaction has been included in previous shares or not, until 50 kB of the transactions in the share are being included in a share for the first time. Once the 50 kB limit has been reached, p2pool stops adding transactions to the share, and truncates the block that would be mined. This means that it takes about 20 shares (or around 10 minutes) before p2pool is capable of mining a 1 MB block.
If we use the current 50 kB limit on new transactions per share, and if Antpool mines a block, then we mine 3 non-block shares followed by a block (i.e. about 2 minutes after them, what we'll see in our share sizes is something like this:
1. Antpool block (clears out our mempool)
2. 50 kB share mined (50 kB new)
3. 100 kB share mined (50 kB new)
4. 150 kB share mined (50 kB new)
5. 200 kB share mined (50 kB new) -- block!
6. 50 kB share mined (50 kB new)
7. ...
When I say "100 kB share mined", I mean that the block for that share would have been 100 kB, not that 100 kB of data were sent over the network. Network messages are much smaller than block sizes.
If we allowed 100 kB and increased the mempool size, we might see something like this:
1. Antpool mines a block (partially clears out our mempool)
2. 400 kB share mined (100 kB new, 300 kB reclaimed from mempool)
3. 520 kB share mined (100 kB new, 20 kB reclaimed from mempool)
4. 640 kB share mined (100 kB new, 20 kB reclaimed from mempool)
5. 760 kB share mined (100 kB new, 20 kB reclaimed from mempool) -- block!
6. 120 kB share mined (100 kB new, 20 kB reclaimed from mempool)
7. ...
I want to either get rid of the limit entirely or increase that limit to 1000 kB of new transactions, which means we would see something like this:
1. Antpool mines a block (partially clears out our mempool)
2. 990 kB share mined (690 kB new, 300 kB reclaimed from mempool)
3. 990 kB share mined (20 kB new, 970 kB reclaimed from mempool)
4. 990 kB share mined (20 kB new, 970 kB reclaimed from mempool)
5. 990 kB share mined (20 kB new, 970 kB reclaimed from mempool) -- block!
6. 990 kB share mined (890 kB new, 100 kB reclaimed from mempool)
7. ...
While the second scenario is an improvement over the status quo, I consider it still broken. I think miners have an obligation to users to mine blocks with as many transactions as feasible, and the second scenario does not do that. A 100 kB limit might result in something like 1/4 of our blocks being under 990 kB.
As I believe that I am ethically bound as a miner to process as many user transactions as possible, I personally am not willing to continue mining under scenarios 1 or 2. I think that p2pool truncating a block template from bitcoind is simply unacceptable.
The third scenario is the only one that would ensure that every block mined by p2pool is as large as the node trying to mine it wants it to be. This scenario means that the first share after each new block is published will include a relatively large number of new transactions, which means that the network size of the share might be large. This could cause propagation delays for that share, and might increase the disparity in share orphan rates between nodes with different hashrates or different hardware speeds.
However, I suspect most of the network data will be transmitting transactions between the node's bitcoind's p2p port (localhost:8333) and p2pool, or sent in advance of the share as a transaction announcement via p2pool's p2p network. If I understand the network protocol correctly, share messages over the network are just a set of hashes, which means that a 990 kB share with 890 kB of transactions in it that were being included in a share for the first time should have close to 0 transactions that hadn't already been shared over the p2p layer. If I'm right, the network message size of such a share should be on the order of 32 bytes * 2500 transactions = 80 kB. If this is true, then raising the limit to 1000 kB won't change typical orphan rates much or at all. I intend to do some packet sniffing after I hard fork and increase the max new share size to see how big the network messages actually become.