RETENTION: A reactive trust-based mechanism to detect and punish malicious nodes in ad hoc grid environments