Lotto: rpc codes, and update server/client