A Robust Distributed Reputation Mechanism for Peer-to-Peer Systems