A resilient leader election algorithm using aggregate computing blocks