Rewrite of ervwalter's p2pool.info's backend in Python