Lotto: sync rpc part with upstream