Will your shares be lost if you restart p2pool before the payout? Will your shares be lost if you restart p2pool before payout, or is there a way to change the pool setting without takng it down?

I'm not sure about the wallet address and I want to change it.
You can restart p2pool at any time without losing your shares, because your shares are recorded in p2pool's share chain and permanently associated with your payout address.

From the wiki:


  Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network's difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while.


Please note that this also means that you cannot change the payout address of the shares you've already found - you can only change the payout address for future shares. Additionally, this architecture means that you will be able to collect payouts from your previous shares without p2pool running at all!